I am working on putting together a gaming accessibility event locally on 1/20. I plan to have participants build a DIY analog joystick connected to a DIY interface that emulates a gamepad. We will be using Makers Making Change’s Forest Hub for this purpose. This event is geared towards families and health professionals who would like to introduce adaptive gaming to persons with disabilities. Given that many commercial games are very complex to a novel player, I would like to also introduce Arcade as an option of creating custom and more simple games to develop these skills.
With that in mind, I’ve been having problems getting the analog joystick to register on the simulator. I’ve confirmed that the system does work on the web. Here is a video of the setup working on a web page running the Kaboom gaming library. The Arcade editor also worked with my Bluetooth-connected xBox controller both for the dpad and analog joystick. See the video with both setups.
This leads me to think there might be something in the firmware of the Forest Hub that is preventing the simulator from registering the analog joystick and button press events. I’m not sure if anyone can take a look at the firmware code (written for Arduino) and ID a possible solution?
I think Arcade is a wonderful platform for this event and I would love to make this happen if possible. Any ideas or support are most appreciated!
This sounds like something that we might need @mmoskal to help with! It’s possible that @richard or @UnsignedArduino might have some information for you, too. Most of the team won’t be back until next week, but hopefully they can help before your 1/20 deadline.
Hmmm, looking at the description of the Forest Hub, it says that in USB mouse mode, it emulates the mouse and left/right click. I presume that does the correct actions on a computer without a game open? Even if so, that won’t work with Arcade since Arcade relies on WASD / arrow keys and space and enter for A and B. I assume that USB gamepad mode should work, since an Xbox controller works…
Maybe you could upload modified firmware to change the “USB mouse” mode to “USB keyboard” mode and change it to send keyboard inputs…
Thank you so much for the reply over the holidays I finally have time over the break to dig into this a bit so wanted to get the post out before getting sidetracked. Fingers crossed there is a solution.
Oh that’s an idea! I’ll see if I can figure out how to do that for this event but in general it would be nice to keep the mouse emulation functionality since a switch user would find mouse control more functional than set keyboard keys. This group is not familiar with flashing Arduino code to revert back to mouse control in case they want to keep the Forest Hub. Thanks!
Creative project and would be nice with an update about how everything worked out for you in the end, @loretod!
It seems like @UnsignedArduino’s suggestions about keyboard and joystick/gamepad modes, as an alternative to your chosen mouse mode, might be on to something about the challenges facing your setup.
But I also have similar experiences as you, regarding DYI (HID) game controllers working in other (web)games and online gamepad testers in the browser, but not for MakeCode Arcade games in the simulator, or not anymore in the MCA simulator, since v1.12.43.
I am not sure if this helps your exact case, but it is relevant enough for this topic - “DIY Analog Joystick on Web Editor(simulator)” - and especially because this is the result of a recent breaking change from when the simulator was updated between MCA v1.12.43 and v1.12.44.
For more information, please see this GitHub issue, and I am hoping @KIKIvsIT could also bring this to the attention of the same mentioned idividuals, @mmoskal, @richard, @UnsignedArduino or other responsible members of the great @MakeCode team(like @eanders):
Thanks @Vegz78 for the words of support. Yes, your issue is the same one I’m having and it would be great to be able to support more custom user-made controllers. I have limited technical knowledge in understanding what the underlying issue is but would be happy to make changes on the custom controller end if there was guidance on what needs to be done.
As for the build, I took up @UnsignedArduino 's idea (thanks for that!) and tweaked the original firmware to send keyboard events in relation to analog readings from the joystick and it worked! Here is the modified file in a Github Gist. Again, this is a very rudimentary patch. I sent the code along to the MMC engineers and perhaps if they have time will be able to have a more elegant solution.
And yes, I too want to thank all the wonderful people at MCA for making such a great platform and being so incredibly dedicated and responsive! You all are amazing!