In this post, we will start by creating an infinite runner game, a classic game genre on mobile devices; this game will have the following features:
- The player will have to avoid obstacles by jumping above them.
- Jumps will be performed when the player presses a key (for the web versions) or when s/he taps once on the right side of the device’s screen (for the Android version).
- The obstacles will come from the right side of the screen.
- If the player hits one of the obstacles, the game will be restarted.