Chapter 4. Snake

Snake was one of the first video games to be released in arcades during the mid 1970s and it became a worldwide classic once Nokia included a version of the game in its phones.

In the game the player controls a snake, typically represented with a sequence of dots or characters, that moves in a maze and must pick up food while avoiding its own body and the walls. When the snake eats food, its body becomes longer, making it more difficult to move around the maze without hitting himself. The player can move the snake in four directions (up, down, left, and right) but cannot stop it. Once the snake hits its own body or a wall, it's game over.

In this chapter you will create a fully working Snake game, learning these concepts:

  • Adding ...

Get Flash Game Development by Example now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.