Log In  


Is there any method to map and use the additional buttons on a single controller to the player two buttons without the use of additional software like joytokey?

Is there a peek function or something I'm missing?



not sure to get it but btn accepts a player id and stat can return keyboard presses.


As far as I'm aware, no. Not in regular Pico-8 or the BBS, at least.

In terms of an actual, physical controller, maybe you could do something by modifying SDL in an exported cart? @gate88 managed to figure something out for the Itch.io version of Heat Death, and I'm assuming it does something along those lines.

You could also just take an approach like the BBS version of Heat Death, and just kinda use both controllers with the keyboard, but that's not going to work with an irl controller without joytokey.


Thanks Spaz48. That's exactly what I was looking for...twin stick. Now if I can only figure how @gate88 did it. Perhaps player 2's buttons can also be used.


keyconfig lets you rebind things, but that might not be exactly what you need


I believe keyconfig only configures the keyboard keys not the controller buttons.


1

This may be of help, @superkahuna for your Pico-8 joystick problem. It says you can use it past registration date. Perhaps merely nagware ?


1

Hey @superkahuna / @Spaz48 / whoever else is interested:

My implementation of dual-stick controls in p8 ONLY works when exporting to HTML.

Basically, I made modifications to this github project here: https://github.com/codl/pico-nfig to 1) remap default controls 2) fix styling issues I was seeing with the default PICO-8 HTML export in this version, and 3) add dual stick support.

Since PICO-8 supports 8 players total but my game only supported 4, I used the extra players' directional inputs for the right stick. Player index 0 directional controls = left stick, player index 4 directional controls = right stick. Likewise for the rest of the players (left,right) = (1,5)(2,6)(3,7).

Again, I could only get this to work in the HTML export. I wasn't able to find a way to do it in PICO-8 itself, in .exes, or on the BBS.

When playing single player, I do let you use the second player's directional inputs for the right stick controls as a backup. I find this works fine on keyboard in the PICO-8 executable where you can remap keyboard controls for player 1 and 2, but the default controls on the BBS aren't great for supporting this. There does not seem to be a way to remap gamepads to provide inputs to 2 different players at once in the executable or on the BBS.

Some documentation for my process and all my source code for the game is available here: https://github.com/Gate88/heat-death/

It's not in the most reusable state, but if you're able to leverage it in some way or clean it up for more general use, you're free to do so!

The place you might want to start are the default bindings here: https://github.com/Gate88/heat-death/blob/master/js/nfig_dualstick.js#L40-L86



[Please log in to post a comment]