You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think there's a need for a change for how controllers are handled in TIC-80.
Currently, only the buttons ABXY & arrow keys are mapped in the api. This is fine and all, but leads to some problems with some controllers, which I'll explain in the final paragraphs. So at the moment, you can't assign anything to RB,RT,LB,LT,START or BACK (or the analog sticks & their buttons L3 & R3). I get the reasons for this design from the fantasy console perspective - to keep things limited and such! However, as a game developer, this restriction has led to some issues, where some controllers work better, some worse. This gave me a thought that maybe it would be nice to have more control over the buttons.
So - could those other buttons be accessible in the TIC-80 api as well? If not through btnp(id), then maybe something akin to the keyp(id) for the keyboard. gamep(id)? For comparison, you can already assign an action to (almost) every keyboard key, so using the controller for playing TIC-80 games feels like an inferior option atm. Why not have a similar approach for a modern standard controller?
Then into the technicalities. I'll gather my controller-related issue comments here:
Firstly, I've detailed my worries about the start menu in the issue Configuration of the game menu for exporting. I'm for the possibility for hiding the "Close game" option. Also, pressing ESC twice should return to the game, instead of jumping to the console that's inescapeable without a keyboard.EDIT: this was fixed by Nesbox recently.
Secondly, I found out that in 0.80, PS4 controller's dpad does not work anymore, which I mentioned here in the related issue Dpad does not work in web export. (All the dpad buttons acted as an ESC key!) I glanced at the source code, and found the reason for this. In the stable branch, all the buttons from index 5 onwards are mapped to the ESC key. In master, this is already addressed: only the button 7 is mapped to ESC, which seems to be a temporary solution for the issue. (In the PS4 controller, button 7 is the L3 button!)
If it's not possible for TIC-80 to recognize which controller is in use, and make adjustments to the mapping accordingly, another possible solution could be having all the buttons of a standard XINPUT controller usable in the TIC-80 api. Then, if there are some differences between different controllers, you can give the player an option in the menu to change the mapping e.g. between XINPUT and PS4. And regarding the start menu - maybe either BACK or START could still be mapped to ESC key, but it seems it needs to be reassignable if we want to be able to support different kinds of controllers.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I think there's a need for a change for how controllers are handled in TIC-80.
Currently, only the buttons ABXY & arrow keys are mapped in the api. This is fine and all, but leads to some problems with some controllers, which I'll explain in the final paragraphs. So at the moment, you can't assign anything to RB,RT,LB,LT,START or BACK (or the analog sticks & their buttons L3 & R3). I get the reasons for this design from the fantasy console perspective - to keep things limited and such! However, as a game developer, this restriction has led to some issues, where some controllers work better, some worse. This gave me a thought that maybe it would be nice to have more control over the buttons.
So - could those other buttons be accessible in the TIC-80 api as well? If not through
btnp(id)
, then maybe something akin to thekeyp(id)
for the keyboard.gamep(id)
? For comparison, you can already assign an action to (almost) every keyboard key, so using the controller for playing TIC-80 games feels like an inferior option atm. Why not have a similar approach for a modern standard controller?Then into the technicalities. I'll gather my controller-related issue comments here:
Firstly, I've detailed my worries about the start menu in the issue Configuration of the game menu for exporting. I'm for the possibility for hiding the "Close game" option.
Also, pressing ESC twice should return to the game, instead of jumping to the console that's inescapeable without a keyboard.EDIT: this was fixed by Nesbox recently.Secondly, I found out that in 0.80, PS4 controller's dpad does not work anymore, which I mentioned here in the related issue Dpad does not work in web export. (All the dpad buttons acted as an ESC key!) I glanced at the source code, and found the reason for this. In the stable branch, all the buttons from index 5 onwards are mapped to the ESC key. In master, this is already addressed: only the button 7 is mapped to ESC, which seems to be a temporary solution for the issue. (In the PS4 controller, button 7 is the L3 button!)
If it's not possible for TIC-80 to recognize which controller is in use, and make adjustments to the mapping accordingly, another possible solution could be having all the buttons of a standard XINPUT controller usable in the TIC-80 api. Then, if there are some differences between different controllers, you can give the player an option in the menu to change the mapping e.g. between XINPUT and PS4. And regarding the start menu - maybe either BACK or START could still be mapped to ESC key, but it seems it needs to be reassignable if we want to be able to support different kinds of controllers.
Beta Was this translation helpful? Give feedback.
All reactions