Skip to content

Classic grid-based snake game with SDL3 library.

License

Notifications You must be signed in to change notification settings

iozsaygi/c-snake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Classic Snake

Grid-based snake game, which was created during a small Saturday (March 2, 2025) game development challenge within several hours. I used MinGW to compile this for Windows, but it should require minimal effort to port this to other compilers, such as MSVC.

This is also possible thanks to a wonderful lecture that is available on the internet, which explains the details of the grid-based snake game amazingly.

Gameplay footage

There are still QoL improvements that I need to ship, such as a better random number generator and several other minor gameplay bugs.

Configuring gameplay

If you wish to play around with several crucial aspects;

  1. You can update the simulation speed however you want; visit game.c and play around with simulationRate
  2. Current keybindings are W, A, S, and D, but you can modify it however you like. Refer to the game.c
  3. You can also experiment with different grid sizes by visiting grid.h

Building

Windows

MinGW

  1. Download and install CMake
  2. Download and install MinGW
  3. Add MinGW to path
  4. Run win32-build.bat

License

MIT License