Skip to content

gallottino/Caterpillar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Caterpillar - A Snake clone

Caterpillar is a game written in C++ to test the SFML library. All resources has been drawn by myself in pixel Art. The Caterpillar asset is the smallest possible. Every rotation of asset is calculated in a single access to a matrix in which are stored the n times of 90 degrees rotation: the magic Matrix has on i index the direction of previous snakeBlock and on j index the direction of nest snakeBlock

Magic Matrix:

{
      {1,1,0,2},
      {3,2,2,0},
      {0,0,3,3},
      {0,0,1,0}
};

Preview

Follow a simple screen with the final Result:

Caterpillar

Assets

snake-asset

Usefull Links

SFML LIBRARIES: https://www.sfml-dev.org/

About

A Snake Game in C++ using SFML

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published