Just thinking about it, can a dPad be used for just about any type of games? I think not. I am an old school gamer and for me the games used to be about QAOP [space] then the cursor keys, so to go left, I would use O and to go up, Q, but to go up and left, it would be both O and Q, with dPads, it is not the same because you cannot simply stop pressing a particular direction. Plus if you had a virtual keypad with the QAOP [space] combination, would it be easy to hold the device and press the combinations?? where if you look on the keyboard, the left hand is supposed to press Q or A, where as the right hand is supposed to press the O or the P and with either thumbs you can press space.
Now hold your phone and try to press the combo of UP + RIGHT + FIRE, it is impossible. So how could one make a game that requires a bit of skill in pressing buttons with a dPad.
The issue is that if you set the dPad to fire events on MOVE, you have to constantly keep moving the finger to fire the events, if you set a timer to fire the last event (till you release or change) that will not work either, so what do you do? What's the best way out on this?
P.S. do not come up with, don't play such old games
Comments
by dPad you mean Direction pad navigation? then yes probably with timers it could be done, but will need to experiment more to understand.
Are you thinking about adding controller support for your games?
QAOPN was the standard layout (pre-PC times), the PC brought in the Cursor keys and WASD, which looks like the cursor layout and was used for two players.
The other combinations were the number keys 56 89 and 0 also called the cursor keys (atleast on the Spectrum)
Another layout for two players were the MNOP for Player2 and QAXC for player1 with G or H as pause and abort game. Enter was used for the key for other things, like grenade launching (used occasionally).
I am working on a couple of directions, which include
GAME
CONTROLLER
< secret >
< secret >
stuff, and not necessarily in that order.
I tried with timers, the problem is that if you skip alternative ticks on the timer, then the movement is jerky, if you update on every frame, the movement is simply too fast. I need to experiement with dT (delta time) so rather than use a frame based system, use a time based system (as most games should). Need to check how accurate and granular the timer is.
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps