This game was made during the #ImersaoGameDev week powered by Alura.
Vulpes is a fox that had his forest invaded by hunters, so he flees in search of a
new forest. On the way, he needs to face some monsters from an enchanted forest and the
hunters.
The game's engine consists of Vulpes jumping over enemies as they come to meet him. Press or to jump. The game has some power ups: chicken, gives you a 30 second shield without taking damage, and bunny, gives you extra life.
The game ends when Vulpes reaches 10,000 km of distance covered.
Play the game in: https://3salles.github.io/FoxGame/
This game was made using the P5.js library. To animate the sprites, the movement must be in a single image. Inside the helper.js
file, there is a function called geradorDeMatriz. It is used to take any sprite image and read the position of each one, without having to make calculations. The order of the parameters are: ** number of lines **, ** number of columns **, ** width of the individual image of the character ** and ** height of the individual image of the character **.
To know the height and width of the character's image, just take the height of the image and divide by the number of lines; and the width of the image and divide by the number of lines.
- Desktop game
- Endless mode
- Mobile game