Skip to content

OliverWisn/alien_invasion

Repository files navigation

Alien Invasion

Motivation:

I made this game "Alien Invasion" because I learned the python language. I walked through the python language essentials + pygame and the sublime text editor. I show also my skills because I added to this programm my own code.

Rights:

This game was made on the basis of the book "Python Crash Course - A Hands-On, Project-Based Introduction to Programming" by Eric Matthes. The code is not the same like in the book. The autor of the book give me the right, I quote, "to share the code you wrote for the exercises in the book to show people what you have learned", but he give me one stipulation, I quote, "as long as you're not trying to create a learning resource based largely on the material from this book". So please don't create a learning resource from this material.

Requirements:

python 3.7 - rest in file: "requirements.txt".

Remarks:

I made this game so that the master branch had always the functioning code. To run the game you must run the file "alien_invasion.py". In addition, in the game files in the main directory I put the file alien_invasion_win10_64.zip. This file contains packed game files, which after unpacking will be in the alien_invasion_win10_64 directory. These files are the completely standalone package. In this directory you can find the file alien_invasion.exe that can be run on windows 10 64 bit computer. To run the game you must run the file "alien_invasion.exe". If you use files contained in alien_invasion_win10_64.zip, then you do not need to install any additional programs (e.g. set of python modules called pygame). This allows you to run the game on any windows 10 64 bit computer.

Game Summary:

In Alien Invasion, the player controls a ship that appears at the bottom center of the screen. The player can move the ship right and left using the arrow keys or keys a and d and shoot bullets using the spacebar or the left mouse button. When the game begins, a fleet of the aliens fills the sky and moves across and down the screen. The player shoots and destroys the aliens. If the player shoots all the aliens, a new fleet appears that moves faster than the previous fleet. If any alien hits the player’s ship or reaches the bottom of the screen, the player loses a ship. If the player loses three ships, the game ends.

Thanks:

I want to thank my niece Dominika (she is 10 years old) for the making of the images of the spaceships of the alien and the spaceship of the gamer especially for me and for this game. Thank you so much @pydim for the fixing of the problem with the game crashing when some keys were pressed.

Game Controls:

a or <-- (Left arrow key) : Moves ship towards left.
d or --> (Right arrow key) : Moves ship towards right.
Spacebar or left mouse button : To shoot bullets.
p or left mouse button clicked on the button Play : to start game (play).
q or Esc : to quit game.

Version:

This is version 1.2 of the game Alien Invasion.