Code Monkey home page Code Monkey logo

space-invaders-pygame's Introduction

Space-Invaders-Pygame

HitCount

A pygame Implementation of the popular Classic Atari and NES Arcade games

This is a part of a series of Classic Arcade Games implemented in Pygames. list of games in this collection:

  1. Space Invaders (my version)
  2. more coming soon . . .

Space Invaders

The classic Space Invaders was the first blockbuster arcade video game, responsible for starting the golden age of video arcade games. It also sets the template for the shoot 'em up genre, and influences nearly every shooter game released since then.

The classic Space Invaders 1978 was created by Tomohiro Nishikado and was released by Taito Corporation in the year 1978.

Concept

In my Implementation of the game, the concept remains the same, i.e the player spaceship shoots the aliens or monsters and in doing so gain points followed by level ups and increase in game speed and difficulty.

What differs from the classic implementation and the features are are listed below:

  • In each level, the number of enemies equals the level number, unlike the classic version in which there are 55 enemies each level.
  • After a certain number of kills, the difficulty goes up, resulting in a speed increase of the aliens.
  • The enemy keeps on respawning and will never die completely.
  • The enemy may shoot a laser beam depending on random chance or probability.
  • The random chance or probability of the enemy shooting you goes up as level increases.
  • The score is incremented on a successful kill and the value is based on the level number and difficulty number.

Features

The features of the game is as follows:

  • The player can be moved left or right using the Left Arrow and Right Arrow keys.
  • The game can be paused (v1.1.2 onwards) with Enter key or Esc key.
  • The player levels up with increase in number of enemies and a level up sound (v1.1.1 onwards)
  • The game has a background music (the classic Space Invaders music) which changes and becomes more intense with increase in difficulty.
  • The game pause has the classic sound effect
  • Each game object and every Interactions has sound effects.
  • The game has key logging feature and every input is logged into the console
  • The game also has FPS Tracking and Each Frame Render time in miliseconds and displays it in the game.

Gameplay

Here is a short gameplay of the game at Level 01 Difficulty 01:

gameplay L01D01

A demo of in game pause feature in action at Level 05 Difficulty 03:

pause demo

A look at Game Over Screen:

gameover

Logging KeyStrokes and Game states on the console:

logging

Installation

On windows:

Just double-click the runner.bat file to launch the game, if you already have python and pip on your machine.

You can also manually install and run the game by following the manual process below:

  1. ensure that you have python and pip on your machine. If not, install it from here.
  2. clone the repo to a local directory or download it as zip and un-zip it.
  3. open windows command prompt (cmd) and enter the following commands:
  4. create a virtual environment py -m pip install --user virtualenv
  5. py -m venv env
  6. activate the virtual environment .\env\Scripts\activate
  7. install the game dependencies from the requirements.txt file using the command pip install -r requirements.txt
  8. navigate to main.py and launch the game using the command cd Space Invaders && python main.py

you can skip creating a virtual environment if you wish and ignore steps 4-6 but it is not recommended.

On Linux or macOS:

Navigate to main.py and run python main.py, if you already have python and pip on your machine.

If not, get python and then run the main to launch the game!

References and Resources

All the resources used are mentioned below:

Images:

Music and Sounds:

space-invaders-pygame's People

Contributors

mratanusarkar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

reustac1

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.