Inspiration

I always loved to play games from childhood. Games are one of those things that always brought happiness in me and I used to spend hours playing different games while competing with computers or other players. As I grew older, the curiosity of what's behind a game became stronger. But I never really got the chance to learn game development (partly because my mother didn't support me in developing games and there was no one to guide me). About an year ago, I learned about Roblox Studio and as I used to play games on the platform, I decided to learn how to create one. But due to not understanding where to start(and the result was that I watched different videos and got it all confused), I dropped in the mid-way. A month back , I started learning Python and wrote some cool codes and all, my first project was the Snake, Water and Gun logic which helped return my interest in game development. I made a few more games using basic python, but they were not actually games. I was using logic to print code onto terminal with the help of user given inputs (I also made some utilities at this point, like Morse Code converter). And I was still curious how actual games are made. That curiosity motivated me to finally start learning game development.

What it does

The project is based on the Classical Snakes that we all have played. It supports a Graphical user interface. The basic idea is to help the snake eat fruits spawning at random locations, which will then help increase the snake length. And to avoid running outside the playing area and also not to collide the snake with its own body. It also has a home page, tutorial and cheats section. Cheats include changing the color and speed of snake and changing the fruit. It then records the score in a text document and determines if the current hi-score has been broken(the initial value is 0). If the user breaks the initial hi-score, it displays a message after game over on the screen for new best.

How I built it

The most appealing thing behind learning python was that it's general purpose. I used the python's pygame module to build the game(primarily because it helped me create a gui for the user to interact to). I used rectangles to create the head and body of the snake and took images from google for fruits. I also used the cursor detection feature in pygame to create interactive buttons. Designing the home page, game over page, etc also took some time.

Challenges I ran into

One of the things that troubled me was that I was not much taught of vectors at this point and thus understanding the logic behind game development using pygame was a little hard. But I had the basic idea so I somehow managed it. The second challenge was the obvious one, I was new to game development and I needed guidance, which I finally got from a good teacher. Determining where to put buttons and text was a bit tedious as I used trial and error method repeatedly to correct the positions according to the needs.

Accomplishments that I am proud of

This became my fist ever 'actual' game. It took me some time but I am feeling proud that I was able to complete the project.

What I learned

I learned about the basic idea to develop a game and about vectors that helped me create Snakes. I also learned about interfaces and the basic idea of how to interact with a graphical interface. I also learned a little about databases(Though I haven't used an actual database in the project, at least for now).

What's next for Classical Snakes

I am not fully satisfied with the game and will never be. I will continue to work on existing features and add new ones if I can get some free time on weekends. Currently, I am thinking about a global leaderboard feature(I need a lot more understanding of databases to do that). I also thought about some Player vs. Player here, but I am not sure if I can implement it or even if that's possible in this case.

Built With

Share this project:

Updates