So I am editing the platformer tutorial.
I want to make the character have two moves.
It jumps when you tap the screen
It speeds up when you swipe the screen.
Is this possible to pull off with EXACT timing?
This is the dilemma: Once I start a touch input, how do I know to begin speeding up, or begin jumping? It would seem I would have to wait a few frames or so to verify it is a touch or swipe to begin with.
Once I read the action if the action is action.pressed, I am not sure what to do. Do I begin jumping?
Or do I wait until action.released?
I don’t want to begin a jump, and then result as it speeding up. I also don’t want it to feel like there is a lag between the tap and the display…or is that how apps usually operate?
If you need the tap and swipe to trigger on the same part of the screen (i.e. you can’t distinguish them by screen coords), it’s impossible to get perfect responsiveness. You basically have to spend a certain amount of frames to decide which one it is. The amount of frames will dictate what the lag is for jumps, and the sensitivity in detecting swipes. To obfuscate the lag, you can immediately change the appearance of the character (like triggering an animation), that works for both speeding up and jumping. It doesn’t fix anything but can make the game seem a bit more responsive.
2 Likes
Thank you. I instead rethought the control scheme, as nobody would want lag when jumping. I never considered that mobile games had this problem.
1 Like