Log In  

It doesn't appear as if there is a way to let players, playing within the web browser, to remap controls. I have gone through the manual a few times and experimented with this myself and did not find anything on this. Keyconfig() only lets the developer change it, during development, and when it gets published this is static, as far as I can tell.

If this feature does exist, could someone please help direct me on this?

I would really appreciate a feature being added to PICO-8 that allows players to remap their controls. Either through letting me, the developer, let players call keyconfig() if they press a certain button, or putting an option in the web browser to call keyconfig() (like mute or fullscreen).

This would do a lot for accessibility, by helping many physically disabled players play PICO-8 games who aren't currently able to, and I feel like that would be a really cool thing.

P#36167 2017-01-20 23:58 ( Edited 2017-01-22 13:48)

I did some testing and it looks like with the html output option you can get it to show up by following keymap() with stop(). Looks like you might be able to get it working by instructing the user to reset (if you have it self hosted .html) after saving the config. It looks like it does not save your configuration after a page reload. Looks like it may be a bit buggy by showing "null". Perhaps the developers could get this functionality working since it's almost there. Here is the example demo, released into the public domain:

Cart #36178 | 2017-01-21 | Code ▽ | Embed ▽ | No License

P#36179 2017-01-21 07:46 ( Edited 2017-01-21 12:48)

UPDATE: I've been talking to one of my friends about this for a few days, and they were able to come up with a script today that can be tacked on to exports of the game, which allows remappable controls through Javascript.


If the developers of PICO-8 are reading this, this code has been graciously made public domain, and you are more than welcome to implement this, or a modification of this, into the official code if you so desire.

Also, @bitJericho that's really interesting. It seems like most of the code required for official support is already there.

P#36182 2017-01-21 10:05 ( Edited 2017-01-21 15:05)

hey i'm the friend who made the script

hopefully zep can find the time to make keyconfig run cleanly in html exports in the future, until then this should do the job

let me know if you run into snags trying to use my thing. i might not check the bbs very often but i'm @codl on twitter

P#36186 2017-01-21 10:35 ( Edited 2017-01-21 15:35)

@codl: that's really great!

though it doesn't seem to work along with
krajzeg's gamepad support (https://www.lexaloffle.com/bbs/?tid=4100)
nor seleb's pico8 styler (https://www.lexaloffle.com/bbs/?tid=3834)
(the "carts" button is not overriden)

also the transparency is a little confusing over a running cart.

thanks a lot anyway!

P#36193 2017-01-21 12:36 ( Edited 2017-01-21 17:36)

I just pushed an update, it should now work with krajzeg's gamepad thing, and pico8 styler as long as you disable styler's gamepad support.

Unfortunately I can't hook into pico-8 styler's gamepad support, but conveniently enough if you combine krajzeg's script, styler without gamepad support, and nfig, they all work and you get both gamepad support and keyboard settings inside styler :)


I also fixed a handful of bugs throughout the day so if this didn't work for you yesterday, maybe give it another go?

also, sorry for hijacking your thread @enoshimaaa

e: forgot to mention that i also made the panel way less transparent

P#36270 2017-01-22 08:48 ( Edited 2017-01-22 13:49)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-02-25 11:50:32 | 0.025s | Q:23