In Episode 3 of the Snake Rewind devlog we finally give our snake something to chase: food. This episode introduces the core gameplay loop: moving, eating and growing; and makes the game feel alive for the first time.
What We Covered
- Implemented a simple Food system that spawns randomly on the grid
- Ensured food only appears on empty (non snake) tiles
- Checked for head-to-food collision during the update step
- Triggered snake growth when food is eaten
- Refactored movement to support dynamic length
This introduces the feedback loop that makes Snake a game: player makes a move, something happens and the game state evolves.
Design Insights
- Food spawn logic uses a retry loop until it finds an empty tile (simple and effective)
- Snake growth is handled by increasing its length, allowing it to retain more of its trail
- Grid based collision checking is fast and intuitive with our tile system
- This sets up the perfect path for spawning clones in the next episode
Implementation Highlights
Food
struct stores position and tile value- Collision check is done right after
SnakeDoStep()
- Snake
tiles
controls growth (no need for timers or delayed flags) - Food respawns instantly after being eaten
Acknowledgements
Snake Snake Snake - Original idea of a Snake clone
What’s Next?
In Episode 4 the past catches up - literally. We’ll implement clones that retrace your exact path, adding challenge and strategy to what was once just survival.