Code Monkey home page Code Monkey logo

pynvaders's Introduction

Pynvaders

A simple space invaders clone written in Python using Pygame, made from the "Python Crash Course" (2nd edition) book.

Tag v1.0.0 is the final version of the game as it is in the book (with some mistakes from my part). From that point forward, all changes are my own experiments, features and improvements.

To run the game, install the dependencies and run the pynvaders.py file.

python -m pip install --user pygame

Controls

  • Use the arrow keys to move the ship left and right
  • Press the spacebar to fire bullets
  • Press the q key to quit the game

Features

  • Each row of aliens can move independently of the others (in the original game, all rows move together)
  • In the first 5 levels, only the row of aliens closest to the ship will move down
  • For the first 2 levels, only the green aliens will be present (the base alien)
  • For levels 3-5, there will be a 15% chance of a blue alien replacing a green alien
    • Blue aliens in the last 3 rows have a chance to do a kamikaze attack (they move directly towards the bottom of the screen)
  • For level 6 and forward, blue and orange aliens will have a chance to appear
    • Orange aliens have a chance to shoot a bullet
  • For the fourth level and forward, all classes of aliens will have a chance to have more HP
    • Each alien class have 3 possible HP values:
      • Green: 1, 3 and 4
      • Blue: 3, 5 and 7
      • Orange: 1, 2 and 3
    • An alien with a higher HP value will have a different, more "colored" sprite than the base class sprite. Upon getting hit, the sprite will change to a more "pale" version of the same color (to represent the alien's current HP value), and a hit sound will be played (instead of the explosion sound that plays when an alien is destroyed)

Credits

pynvaders's People

Contributors

ebiggio avatar

Watchers

 avatar  avatar

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.