A pygame Implementation of the popular Classic Atari and NES Arcade games
This is a part of a series of Classic Arcade Games implemented in Pygames. list of games in this collection:
- Space Invaders (my version)
- more coming soon . . .
The classic Space Invaders was the first blockbuster arcade video game, responsible for starting the golden age of video arcade games. It also sets the template for the shoot 'em up genre, and influences nearly every shooter game released since then.
The classic Space Invaders 1978 was created by Tomohiro Nishikado and was released by Taito Corporation in the year 1978.
In my Implementation of the game, the concept remains the same, i.e the player spaceship shoots the aliens or monsters and in doing so gain points followed by level ups and increase in game speed and difficulty.
What differs from the classic implementation and the features are are listed below:
- In each level, the number of enemies equals the level number, unlike the classic version in which there are 55 enemies each level.
- After a certain number of kills, the difficulty goes up, resulting in a speed increase of the aliens.
- The enemy keeps on respawning and will never die completely.
- The enemy may shoot a laser beam depending on random chance or probability.
- The random chance or probability of the enemy shooting you goes up as level increases.
- The score is incremented on a successful kill and the value is based on the level number and difficulty number.
The features of the game is as follows:
- The player can be moved left or right using the
Left Arrow
andRight Arrow
keys. - The game can be paused (v1.1.2 onwards) with
Enter key
orEsc key
. - The player levels up with increase in number of enemies and a level up sound (v1.1.1 onwards)
- The game has a background music (the classic Space Invaders music) which changes and becomes more intense with increase in difficulty.
- The game pause has the classic sound effect
- Each game object and every Interactions has sound effects.
- The game has key logging feature and every input is logged into the console
- The game also has FPS Tracking and Each Frame Render time in miliseconds and displays it in the game.
Here is a short gameplay of the game at Level 01
Difficulty 01
:
A demo of in game pause feature in action at Level 05
Difficulty 03
:
A look at Game Over Screen:
Logging KeyStrokes and Game states on the console:
Just double-click the runner.bat
file to launch the game, if you already have python and pip on your machine.
You can also manually install and run the game by following the manual process below:
- ensure that you have python and pip on your machine. If not, install it from here.
- clone the repo to a local directory or download it as zip and un-zip it.
- open windows command prompt (cmd) and enter the following commands:
- create a virtual environment
py -m pip install --user virtualenv
py -m venv env
- activate the virtual environment
.\env\Scripts\activate
- install the game dependencies from the requirements.txt file using the command
pip install -r requirements.txt
- navigate to main.py and launch the game using the command
cd Space Invaders && python main.py
you can skip creating a virtual environment if you wish and ignore steps 4-6 but it is not recommended.
Navigate to main.py
and run python main.py
, if you already have python and pip on your machine.
If not, get python and then run the main to launch the game!
All the resources used are mentioned below: