RandomityGuy / MBHaxe

A Haxe port of Marble Blast Gold, Platinum and Ultra with 99% identical physics and cross platform multiplayer, runs on Windows, Mac, Web and Android!
MIT License
71 stars 8 forks source link

MBP - Add gamepad support #9

Closed thearst3rd closed 1 year ago

thearst3rd commented 1 year ago

This adds support for playing MBHaxe with a gamepad. I tested it with an XInput controller, but according to the docs it should support dualshock as well (and maybe others through SDL).

While in game, it handles pretty well. Navigating the menus on the other hand is pretty awful, you're still gonna need to use a mouse and keyboard to do most things. But a few button mappings were added to the menu at least.

Tested in both hashlink and js. For some reason, in js, the start button stops working in my configuration. Gonna look into it

thearst3rd commented 1 year ago

Hmm, encountering an issue with mobile touch controls combined with a gamepad loaded. Don't merge this yet

thearst3rd commented 1 year ago

Things should be fixed now. Mobile still has issues getting the correct mapping, but the mappings were the same as opening https://gamepadviewer.com/ on mobile so I don't think it's an issue with MBHaxe. At least it doesn't crash like it used to. I also got the start button working as intended on js.

RandomityGuy commented 1 year ago

Are you going to update it for MBG as well?

thearst3rd commented 1 year ago

Yes I was planning on backporting to the MBG branch as well :+1: