In the final part of the tutorial series food is added for the snakes to eat.
This is the final part of the LoonRide tutorial series on creating a game like Slither.io in Phaser. In part 7 they discus adding food that snakes can eat: "Our food sprites will be tiny hexagons. These sprites will have circular physics bodies. When a food sprite collides with a snake head, a constraint will be created that makes it look like the food is gravitating in towards the head center. Once the food is at the center of the snake's head, it will be destroyed, and the snake will increase in size. "
The first book on the creation of HTML5 cross platform games using Phaser 3 and other free software.
- By Emanuele Feronato
- 155 Pages
- 28 Source Code Examples
- Build a complete game from start to finish
- Cross Platform
- Scaling for devices