Skip to content

My version of everybody's favorite snake game ๐Ÿ๐ŸŽฎ

License

Notifications You must be signed in to change notification settings

tanviroy/snake-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

19 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Snake Game ๐Ÿ๐ŸŽฎ

Date of completion: 30th March 2020

Description

The Snake Game is an iconic game that has a special place in my heart ever since I had first encountered it on a Nokia 3100. I was interested in building a simple game for a long time and so here's my attempt at making the famous snake game. I wanted to keep it as simple and close to the original game as possible. This is also my first CS project ever. I have a few months of experience with Python and no prior experience with Pygame. It took me a little over a day to code the entire thing.

Installation

The snake game works on Python 2.7+ and requires Pygame to be installed (can be done easily by pip). Additionally, sound effect files (.wav) can be downloaded if running the final version 'snakey.py'.

Game Rules

  • The snake (snakey) moves on pressing the 4 arrow keys of the keyboard
  • The aim of the game is to eat the red food particles by moving towards it
  • On eating a food particle, snakey gets bigger
  • Snakey should stay within the boundaries of the screen

Key Learnings

  • One of my biggest challenges was getting the movement of the snake right - it took a while to append the snake correctly and I had to run the code several times to understand how to change the coordinates
  • Understanding Pygame syntax
  • How to improve the game after getting the basic algorithm right - after having gotten the main part of the game right, it was much easier to do things such as creating boundaries, adding sound effects, etc.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Acknowledgments

I am constantly inspired by my really cool CS professor Debayan Gupta and my best friend "smol gurl".

About

My version of everybody's favorite snake game ๐Ÿ๐ŸŽฎ

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages