New games every week!
Redefine : Part One Blog
12th December 2017
It's taken quite a while to get up to this point, but I now have the engine half-doing a "Which button is pressed" function.

I can push a keyboard button, or tap a button on a connected controller, and the engine says "This button!"
There's a slight issue, whereby if a button is held, it takes control.
For example, if you're playing on the keyboard, but your gamepad's lying on the floor, and the thumbstick is prodded to the side, then no matter what button you try to hit, it always says "Joystick Axis 1"..
Over and over and over.

I need to fix that, somehow. I'll have to setup some kind of "ignore" list or something.
Not sure.

But the button pushes are working, and the values are being returned, and I ask it "What's the name of the button" and it works a treat.
I'm fairly confident that this will make for a great set of functions to go with the redefinable key stuff.

That was a busy day of number wrangling, I can tell you!!
Views 67, Upvotes 15  
2018 Framework
New games every week!
Site credits : Site built from the ground up, in php, using Programmer's Notepad 2, and a very bored Jayenkai.
(c) Jayenkai 2023 and onwards, RSS feed 4

Blog - Redefine : Part One - AGameAWeek