Skip to content

yerminal/snakeSDL2

Repository files navigation

snakeSDL2.exe | simple snake program made with SDL2 using C

  • When I decided to make this game (for exercise), I challenged myself not to look up any information about the "snake" algorithm, and it took me 5 hours to find out the algorithm.
  • My code is not a good example because of redundant lines and declaring variables too much.
  • Furthermore, I didn't explain anything in the source code because it's really hard to explain for me.

To run the program properly :

  • Download zip, extract it and run snakeSDL2.exe

WARNING :

  • It may crash if you won't deactivate the antivirus. (Since most antiviruses do not allow unknown programs to use GPU.)
  • Run snakeSDL2.exe with "SDL2.dll", "SDL2_image.dll", "SDL2_mixer.dll" and "Effects" folder in the same location.

To move the snake :

  • UP : press W
  • DOWN : press S
  • LEFT : press A
  • RIGHT : press D

To exit :

  • Press SPACE or ESC.