Phaser home
Phaser AE
Open source
Phaser 4
Download
Learn
Editor
Tools
Docs
Examples
News
Log in
Examples
/
Games
/
Snake
Phaser 4.1.0
Phaser 4 examples
Snake
7
examples
Examples
7
Snake Game - Part 7
A complete Snake game implementation featuring grid-based movement, screen wrapping, body growth, self-collision detection, and a system to spawn food only on unoccupied grid tiles.
Snake Game: Growth and Food Spawning
A comprehensive example of a Snake game featuring grid-based movement, body growth using ShiftPosition, and a system to spawn food only in valid empty grid locations.
Snake Game: Part 1 - Asset Loading
Initial setup for a Snake game, including game configuration and preloading image assets for the food and snake body.
Snake Part 2 - Movement and Wrapping
Implement grid-based movement with timed updates, screen wrapping, and directional controls that prevent reversing direction.
Snake Part 3: Movement and Screen Wrapping
Demonstrates grid-based snake movement with input validation to prevent 180-degree turns, screen wrapping via Phaser.Math.Wrap, and body segment tracking using Phaser.Actions.ShiftPosition.
Snake Part 4: Growth and Food Collision
Implementation of snake movement with grid-based screen wrapping, food collection, and growing the snake body using group actions.
Snake Part 5: Food and Growth
This example demonstrates implementing food consumption and snake growth mechanics, including speed increases and tail management using Phaser.Actions.ShiftPosition.