This is an awesome feature, well done!
I'll share some thoughts as I try it with a few games.
– The automatic WASD/Arrow key option is a very good idea to include. (Although it didn't work for me until I set each key manually – possible bug? The directional keys showed as N/A in “View Mapping” until I changed all four separately.)
– It's a pity it doesn't work with mouse input. A good portion of games also require you to click to start the game so you can't use a gamepad right away (that's not a big problem), although there are games that require mouse interaction between levels (which is a bit trickier as you keep switching) or in dialogue (e.g. Coma has keyboard movement and mouse dialogue).
But that's more on each game to solve than on this feature. Getting old games to support gamepads at all is already a monumental achievement.
– I thought this is going to be fun with different keyboard layouts, and sure enough, the mapping displays (most likely) English QWERTY keys no matter the reality of the key you're pressing in your locale. So some users might be a bit confused when it shows a completely different key than what they pressed (especially if they revisit the mapping later, or inspect the default binding set by somebody else).
French AZERTY must be fun with their ZQSD instead of WASD when they see different characters in the default binding.
(For this reason, some game engines or libraries have been trying to do mapping using the more reliable physical key position instead of the specific letter in your locale.)
But it's probably not that big of a deal. People with foreign keyboard layouts (myself included) usually learn to keep the English keyboard layout to switch to when key rebinding isn't possible and the default layout seems weird.
– Trying to bind the 'Esc' key to go to the pause menu works, but it also closes the remapping window.
– It'd be nice if you could copy and paste the mapping as some form of code if you want to share it with other people (also for you here).
At 5/13/25 06:59 AM, TomFulp wrote:I think Josh has been considering an API call to check for a gamepad, although you might also need to check if someone turns on their gamepad mid-game as well.
That's definitely something you're going to want to support gamepads “properly”, especially if you display input prompts on screen so you can update them.
Often, there's something like "On Input Device Changed → Device Type" so you can tell somebody went back to mouse & keyboard (controller disconnected, or simply put controller down and started using keyboard again) or grabbed a different gamepad brand, so you need to change the input icons and gamepad pictures.
(But that's more about general gamepad support than about reacting to NG controller mapping events.)
What if the mapping changes mid-game, would you get a callback for that to potentially update your UI? Just food for thought.
At 5/13/25 06:59 AM, TomFulp wrote:If we got really crazy, html5 games could use our API for controller mapping, allowing end users to customize their mapping via NG instead of building an in-game system. Dunno if anyone would actually implement that if it was offered, though.
Handling rebinding keys is a pain, so it could save a lot of hassle if people recognize how it could help them, even though it's not as exciting as medals and scoreboards. Cloud saves for example are also an absolutely amazing feature, but I didn't see it used that much yet.
I can see it being used if it's flexible and sufficiently easy to set up (for example, bundled in the Newgrounds.io libraries). Mapping only as some layer in between, I wouldn't want to handle all input via Newgrounds.
---
(Going even crazier, it'd be nice to rebind keyboard out of the box as well. Speaking from years of experience with QWERTZ keyboard layout when all games out there assume QWERTY and use Z X C as action keys; it would be a great quality of life improvement – as I don't usually expect most smaller games around here to bother with supporting keyboard keys rebinding.)