Git Product home page Git Product logo

alien_invasion's Introduction

Alien_Invasion

A 2D game based on Pygame. You will control a spacecraft to defend against the alien attack.

Dependencies: Python 3.6.3 + Pygame 1.9.4

GUI Design

  • The window size is of 1300 * 700, with full screen display.
  • The top right corner of the window shows the player's current score and current level respectively.
  • The highest ever record is directly above the screen.
  • The top left corner shows the remaining game opportunities.
  • The middle of the window are the aliens, which will keep moving left and right.
  • The bottom is the player-controlled spaceship, which can move horizontally.

Control

  • Use the following command to execute the alien_invasion.py file, enter the game.
    python alien_invasion.py
  • Press button Play to start the game.
  • Press Q to exit the game whenever you want.
  • Use A, D or โ†, โ†’ to move the spacecraft.
  • Use Space to shoot.

Rules

  • There can only be a maximum of three flying bullets on the screen at the same time, so you have to find the right time to fire.
  • When all the aliens on the screen are eliminated, the difficulty level will increase by one, and the overall speed of the game will be accelerated and the score will be higher.
  • When the ship collides with the alien or the alien reaches the bottom line of the screen, you lose one chance, and the game ends when the remaining chance is 0.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.