A day fixing gamepad issues...
I got a few new controllers today to test some stuff out. I've already tested it out on a PS3 controller, and now I was able to check it out on a 8BitDo Genesis style controller and an Xbox controller on the PC. I found a few issues with the way it does the button holding routine, for accessing spells, powering up weapons, etc. On some controllers it was only registering a press, not a hold. It registered a press, then nothing, then a release (it no longer showed it as pressed, but didn't show it as held or released either). It took a bit to track down what was causing it, because it first it just didn't seem to work when you hold down a button on the controller, but only on a gamepad, the keyboard was working just fine.
So I had to basically use some of my fun debugging tools I'd created, and was able to slowly track down the issue. The good thing is, once I realized it wasn't seeing it still being pressed, I just had to create an update poll that checked to see if it had been pressed at some point, say it was pressed even if the joystick polling wasn't saying it was pressed, and then keeping the internal value as pressed until the joystick polling said it was released. Really, once I figured out *why* it was doing what it was doing, it was a simple fix. But like 99% of bugs out there, finding out the way is the most time consuming part.
The good news is, while I was in there I added analogue input support for analogue sticks. Originally it was going to be just d-pad input only, but I figured, while I was messing around with the gamepad routines, might as well add in analogue support.
Really liking the genesis style 8bitdo- the genesis controller is one of my favorites, so it was great to test this out. Only thing I didn't like was that Love2d saw it as a PS4 controller, and not something else. Since I'm autochecking controllers to display which button does what, it did put a bit of a wrench in the works, but I think I might have some solutions.
Get Emberglass
Emberglass
A nonlinear action adventure platformer, inspired by Ico, The Legend of Zelda, Castlevania, and Shadow of the Colossus
Status | Released |
Author | Riddle Fox Games |
Genre | Platformer |
Tags | 2D, Action-Adventure, Exploration, Fantasy, Metroidvania, Open World, Pixel Art, Retro, Sandbox |
Languages | English |
More posts
- New bug fixes in the next few monthsSep 01, 2023
- Bug fixes for Windows coming soonFeb 17, 2022
- Updates coming up in a few weeks...Feb 21, 2021
- Steam is an absolute nightmare to useFeb 10, 2021
- A post mortem for EmberglassFeb 08, 2021
- Trailer is uploaded!Jan 14, 2021
- And the game is LIVE for purchase. 4.99$ for a week, than back up to 5.99$Jan 13, 2021
- Redid main pageJan 13, 2021
- IT IS DONE.Jan 10, 2021
- Price points...Jan 08, 2021
Leave a comment
Log in with itch.io to leave a comment.