Skip to content

keelus/spaceInvaders

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

spaceInvaders

Space Invaders

Fan game made by kelus for CS50 Final Project

Python Build Status

Welcome to my final project

For my CS50 final project, I decided to create a game in python, inspired by the retro videogame called Space Invaders, from 1978.

Gameplay

Space Invaders by kelus - CS50 Final Project

Technology

For this project, I used python, along with the pygame package. For the art part, I used some sprites and sounds from the original videogame, but also created other's myself. To reduce the file sizes and structure, I decided to put them all together into a spritesheet.

For the alien wave, I made used a 2 dimentional array, which has each alien's position, life management, animations,... in it. You can create your own alien wave by changing MATRIZ variable in the code, like in this example:

MATRIZ = [11,[["C0"],["C1"],["C1"],["P"],["P"]]] would create the following:

While, for example, MATRIZ = [5,[["P"],["C1"],["C1"],["C1"],["C1"]]] would make the alien wave look like this:

-IMPORTANT: Any non empty matrix will work, as long as it's not too wide and too long, which would make the game instantly crash because of the limited space of the window canvas.
-Also, the game is programmed to work in a 800x900 (width x height) window. Changing this could make the game look and work incorrectly. 

Language features

I really wanted to translate this game into some different languages (it's originally in English, but since it has few words, I decided to translate it). To make the process easier, I used Polyglot Gamedev Project's Language master sheet, which was very helpful. I finally translated the game into:

Spanish, English, French, German, Italian, and Portuguese/Brazilian

Requeriments & execution

As I said before, you will obviously need Python in your computer, along with pygame package, which is already included in the download.

To play the game, go to the game's folder location "spaceInvaders - by kelus", and execute: python CS50_spaceInvaders_kelus.py

How to play

Controls:

  • Left & Right arrows (also A & D keys) - Moves player

  • Space - Shoots a laser

  • You start with 3 lives.
  • If you get hit by a laser you will lose 1 life.
  • If the aliens get very close to you, the game will be over.
  • You get points from killing aliens. The score for each one is:
    • + 10 POINTS
    • + 20 POINTS
    • + 30 POINTS
    • + ?? POINTS
  • Your objetive in this game is to get the highest amount of points possible.
  • If you kill all the aliens, you will continue playing with a new wave, repeatedly until the game is over (once you lose all lives).

Screenshots & video

Tools & other sources

Thanks for checking out my project. 😀