Skip to content

Alien Attack, pygame which I created which is similar in nature to Space Invaders

Notifications You must be signed in to change notification settings

MCoffey1129/Pygame

Repository files navigation

Alien Attack Pygame (similar to Space Invaders)

Summary

Please find attached pygame code for running a game I created called "Alien Attack." The game is quite similar in nature to "Space Invaders."
The purpose of creating this code is to try and train a Neural Network to play the game and get a higher score than the 5 random scores I got when playing the game.

For anyone interested please feel free to take my code and create your own game. The code is quite heavily commented but I am happy to answer any questions you may have. Please note it would not have been possible to create the game without the following excellent website - http://programarcadegames.com/index.php?lang=en.

How to play the game

Set up

Save the code and each of the attached files to the same location on your drive, import the required packages and run the code. If this does not work please let me know.

Controls

Mouse - Shoot
Left arrow - move left
Right arrow - move right
Up arrow - move up
Down arrow - move down

Scoring

The aim of the game is to maximise your score within the 3 minute time-limit (or until your life/health decreases to zero). You score points by shooting the aliens.

There are 3 types of aliens:

Blue aliens
These move down the screen at a regular speed. You get 100 points for each alien you hit.
Green aliens
These move horizontally across the screen very quickly. You get 300 points for each green alien you hit.
Pink aliens
These move down the screen twice as fast as the blue alien. You get 500 points for each pink alien you hit.

Life

Your health is 100 at the start of the game. Each time you collide with an alien your health/life decreases by 10. When your life falls to zero the game is over.

About

Alien Attack, pygame which I created which is similar in nature to Space Invaders

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages