Introduction: Snake Game
Today I'm gonna show you how to make a basic snake game in Python and amaze friends in this vacation. This is very simple you just need is python 3 and pygame install.
In this instructable I've added video on how to install pygame. After you install pygame, all you need is code the game, I've added sample code for it, I know beginners would just copy paste it, I would strongly not recommend it as it won't develop your programming skills, but if you don't know anything you can just copy and paste it.
After you are done with code, you are good to go and play with your friends and show them that you build a game yourself and amaze them.
For this you need 1) Python 3 2) Pygame
Step 1: Downloading Python 3
To get started with this you need is to install Python 3 in your PC.
To install Python 3 go to the following link- https://www.python.org/downloads/
Than click on Download Python 3.7.4
Step 2: Installing Python 3
1. After downloading Python 3 it's time to install it. Head to your Downloads and run the Python 3 apk. Click on Install now it will start installing the Python Program.
Click OK to install it.
Step 3: Coding in Text Editor
Once you have successfully installed Python 3 , it's time to code our game in python .
To code I strongly recommend to use a text editor like atom, notepad++, sublime or console like anaconda.
I've attached both PDF and text file you can use this as reference to code yourself or if you don't know coding you can copy it (Not recommended).
Step 4: Executing the Code
Now you are done with coding and it's time to execute it.
You can directly open it from your directory or you can run the game from command prompt.
1. To open it directly just head to the folder where you have saved it and just double click on it .
2. To run it from command prompt(cmd) just open your cmd and browse to your directory and type the name of the file with which you have saved it, say snake_game than after browsing to the folder in cmd type py snake_game.py and this will run your game and you are good to play.