Google dinosaur game develop in JavaScript.
Why?
I think that is a good way to improve my skills in JavaScript language.
Why google dinosaur?
Because your interface is simple (2D) and involve dynamics objects.
- Terrain
- Dino
- Scenery
- Obstacle
- Walk
- Jump
- Scenery Movement
The project using simple CSS interface in html to drawing the content, where is running the game.
Mechanics is responsible to interaction between the dinosaur and the elements in the game (cactus), your behavior and actions.
Collision is responsible to recognize when the dinosaur and the cactus are the same position.
Scenery Movement is the movement of objects and obstacle displayed.
I use the Canvas Element HTML for draw the images and TimeInterval to control the functions with different execution times. All develop was made for me learn the JavaScript code and improve my skills. You can use it for any propose.
The images were dimensionality in 50 x 50 pixels and the Canvas Element in 500 x 200 pixels.
The structure is compose for:
- Ground layer with 15 images
- Dinosaur with 4 images
- Cactus layer with 1 image
- Performance optimization and code reduction.
- Export the score for cloud.
- Put the pterodactyl (bird) in the game.