Log In  

Hello Pico8-community!
I recently bought myself a Pocket Chip and just finished making my first game on it.
Now I wanted to upload it to Itch.io (it's for the 1-button-jam), so I exported it as .html, renamed the exported .html-file to index.html and bundled it with the .js-file into a .zip witch I uploaded to Itch.io.
Now my problem is, that despite my game showing up and running on the website, it doesn't recognize any button presses at all. (Even tried it on different machines which normally run other Pico8 games on Ich.io just fine, but had no luck.)
One more thing to note might be that the page scrolls when using the arrow keys?

Is there anything specific I have to watch out for when uploading to Itch.io?
Anyone have an idea what to change in order for the controls to work?

P#27072 2016-08-19 03:46 ( Edited 2016-08-23 09:54)

Have you tried clicking the game window? If it starts responding after doing that, it's a focus issue.

The default .html export is pretty basic. You can add an 'onload="window.focus()"' to your <body> tag to fix that issue - this will request focus for your game when it's first loaded into an iframe by itch.io.

P#27073 2016-08-19 04:46 ( Edited 2016-08-19 08:46)

Thanks for the suggestion, but I did already try clicking on it,
and adding onload to the body didn't help as well. :(
Still no idea what causes/fixes it...

P#27077 2016-08-19 09:38 ( Edited 2016-08-19 15:26)

I'm having the same issue (no input being received in HTML5 ver). Example https://www.lexaloffle.com/bbs/?tid=4107

Any help would be much appreciated!

P#27201 2016-08-22 03:35 ( Edited 2016-08-22 07:35)

Ok I think I may have figured out what was causing the issue I was having. I only was calling update60 instead of update(). So adding the following before update60() seems to work

function _update() _update60() _update60() end
P#27202 2016-08-22 03:40 ( Edited 2016-08-22 07:40)

bntp() will register two frames in a row, add _update_buttons() :

    function _update() _update60() _update_buttons() _update60() end
P#27217 2016-08-22 13:23 ( Edited 2016-08-22 17:23)

I just figuired out that clicking any of the panels below the game (fullscreen, sound etc.) makes the HTML5 version gain focus (and therefore accept input).
This shouldn't be surprising, but it's a bit odd that clicking the game window itself (which I tried before) doesn't make it gain focus, especially since this method works with other pico-8 webgames on itch.io...

P#27242 2016-08-23 05:54 ( Edited 2016-08-23 09:55)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-29 08:16:22 | 0.010s | Q:19