In the final part of the tutorial series food is added for the snakes to eat.

Posted on 4th Sep 2017. Follow @phaser_ and get the Phaser World newsletter.

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

Learn to code and lead your intrepid crew on a mission to save The Cloud in TwilioQuest, a PC role-playing game inspired by classics of the 16-bit era. Free forever, and available now for Windows, Mac, and Linux.

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
Buy Now
$19