image

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. "

Read More