A brand new game
for Windows, Linux, Mac, HTML5, 3DS Homebrew and more
every week,
unless exhausted!
About Games Tools Music Pixelart Poetry Home Patreon Suggest Scores JNKPlat Petit Switch
Blog
Controller Rewrite - Part One
  25th January, 2020
OK, I *think* I've got the controller code whittled down to a decent set of functions.
Part One is simply the One Player setup.
If you're feeling somewhat bored, open up Browsercade and give it a try.

-=-=-

Controllers should be ignored until you hit the A button, and should then spring to life.
Any/all controller buttons should work, but I've reduced my code down to just three buttons..

Primary button (Should default to A)
Secondary button (Should default to B)
and Start (Should default to... .. Start!)

The left thumbstick should work, but may be inverted. Let me know if yours is.. And what controller it is!

The DPad on a 360 controller should work. Any other controller's DPads, please let me know what happens, and again, what the controller is!

All other buttons on the controller will be any or all of the above, but should be "roughly" what you expect them to be.

*sigh*
The controller code is now an absolute mess, but is hopefully in a state where things work as expected, and where I *think* I can get a bit of Local Multiplayer stuff working, with a little more jiggery pokery.

.. I think!!


If you're reporting any issues/oddities, let me know.
1. Your controller
2. Your browser
3. The OS/Device you're playing on
.. Because any and all of those might be breaking things, due to the unique way that Javascript works!

Views 16, Upvotes 0
Browsercade , Controller
Site credits : Site built from the ground up, in php, using Programmer's Notepad 2, and a very bored Jayenkai.
(c) Jayenkai 2017 and onwards. RSS feed
Blog - Controller Rewrite - Part One - AGameAWeek