Dino Game - Game Dev
YouTube Tutorial:
Try the game here:
https://codingwith-adam.github.io/dino-game/index.html
(On a mobile device play in landscape orientation for the best experience)
In this exciting tutorial we are going to build a clone of the chrome dinosaur game with Javascript and a HTML Canvas. This version of the game can be played on a touch screen or with a keyboard. The game will scale to fit on any size screen.
The goal of the game is for the dinosaur to avoid the obstacles by jumping over them. As the dinosaur runs along the desert it will encounter cactuses. If you don't jump over them it's game over. Our dino can perform a low or high jump. A low jump is achieved with a quick tap of the screen or quick press of the space bar. A high jump requires taping the screen longer or pressing the space bar longer.
We will cover the following topics and more:
- Game loop
- Animation
- Collision detection
- Scaling a game to fit to any size screen.
- How to take into account different frame rates.
- Randomly generating enemy sprites(cactuses)
- and much more!
If you enjoy this tutorial please subscribe, like and share on YouTube.