Game Development Reference
In-Depth Information
to the old school nature of this classic game, we opted for old school graphics and
typefaces, as shown in following screenshot:
The image shows the look and feel of the game. When the game first starts, the
snake has a total body length of zero—only the head is present. At first, the snake
is randomly placed somewhere within the game grid, and is not given a starting dir-
ection to move towards. The player can control the snake with the arrow keys, and
once the snake starts moving in a particular direction, the snake cannot be stopped.
For example, if the snake is moving to the right, the player can move it up or down
(but not backwards). If the player wishes to move the snake to the left (once it is
currently moving to the right), the only possible ways are to first move the snake up,
then to the left, or down, then left.
Whenever there are no fruits on the game grid, one is randomly added to the grid.
That fruit stays there until the player eats it, at which point, a new fruit is added to the
grid. For added difficulty, we could make a fruit disappear, if the snake can't get to it
within so many seconds.
Search WWH ::




Custom Search