Giter Site home page Giter Site logo

tasdikrahman / spaceshooter Goto Github PK

View Code? Open in Web Editor NEW
503.0 28.0 233.0 2.81 MB

:video_game: The classic retro game recreated using Pygame and python

Home Page: http://tasdikrahman.me/2016/02/02/Making-of-space-Shooter-using-pygame/

License: Other

Python 100.00%
rpg-game python pygame linux windows

spaceshooter's Introduction

Space Shooter

The classic retro game recreated using Pygame and python.

Index

Demo

[Back to top]

Follow the youtube video to see how I fared on spaceShooter

Space Shooter Demo - Youtube

Screenshots

[Back to top]

Screen 1 Screen 2
Screen 3 Screen 4

Game Features

[Back to top]

  • Health bar for the space ship
  • Score board to show how you are faring so far
  • Power ups like
    • shield: increases the space ships life
    • bolt: increases the shooting capability of the ship by firing 2 to 3 bullets instead of one at time.
  • Custom sounds and sprite animation for things like
    • meteorite explosion
    • bullet shoots
    • player explosion
  • 3 lives per game
  • Fun to play :)

Controls

[Back to top]

Button
Move Left left
Move right right
Fire bullets spacebar
Quit game Esc

Installation

[Back to top]

For Windows

Linux/Debian based systems

Option 1: Download the zipped executable file

If your download was saved on the ~/Downloads folder

Press Ctrl + Alt + T to open the shell if you are on GNU/Linux based systems and type

$ unzip ~/Downloads/SpaceShooter-0.0.3.Linux.zip -d ~/Desktop
$ cd ~/Desktop
$ ## navigate to the unzipped file and change the file permissions for the executable
~/Desktop $ chmod +x spaceShooter
~/Desktop $ ./spaceShooter

This will unzip the file on your Desktop, you can replace it with the directory of your choice

NOTE : If it gives you an error, you probably don't have unzip installed in your system.

$ sudo apt-get install unzip

That should fix the error.

  • Run the executable named spaceShooter

A Similar process would be followed for OS X

Option 2: Build from source

You need to have pygame installed for this option.

For FreeBSD

$ sudo pkg install devel/py-game
Clone the repo
$ git clone https://github.com/tasdikrahman/spaceShooter.git
$ cd spaceShooter/
$ chmod +x spaceShooter.py
$ python spaceShooter.py

For Ubuntu/Debian

$ sudo apt-get install python-pygame
Clone the repo
$ git clone https://github.com/tasdikrahman/spaceShooter.git
$ cd spaceShooter/ 
$ python spaceShooter.py

For MAC OS X

You have to build from source to get it up and running on OS X. Reason? I don't have an OS X system to build the executable! So I would love for a Pull request on that one.

Building from source will do the trick though

$ pip3 install hg+http://bitbucket.org/pygame/pygame

Install Pygame specific dependencies

$ brew install sdl sdl_image sdl_ttf portmidi libogg libvorbis
$ brew install sdl_mixer --with-libvorbis
Clone the repo
$ git clone https://github.com/tasdikrahman/spaceShooter.git
$ cd spaceShooter/ 
$ python spaceShooter.py

Contributing

[Back to top]

This game was written in one day, so the coding standards might not be up the mark. Don't be shy to make a Pull request :)

For details, please refer the Contributing page

Contributers

[Back to top]

  • @bardlean86 for adding the third missile powerup and the main menu

To-do

[Back to top]

  • Add the windows executable file
  • Add main menu for the game
  • Fix bug which stops the background music from looping
  • Add support for WAV game music file as ogg format is not playable as described in #1
  • Add feature to pause to the game.
  • add feature to replay the game after all players die
  • Add OS X executable file as the Debian based one fails to execute on it

Issues

[Back to top]

You can report the bugs at the issue tracker

OR

You can tweet me if you can't get it to work. In fact, you should tweet me anyway.

Credits

The game is a fork of the video instructions given by KidsCanCode. I have made several additional enhancements to it. Do check out their Channel!

Similar

[Back to top]

License

[Back to top]

Built with ♥ by Tasdik Rahman(@tasdikrahman) under MIT License

You can find a copy of the License at http://tasdikrahman.mit-license.org/

License for them is in Public Domain

Donation

[Back to top]

If you have found my little bits of software being of any use to you, do consider helping me pay my internet bills :)

PayPal Donate via PayPal!
Gratipay Support via Gratipay
Patreon Support me on Patreon
£ (GBP) Donate via TransferWise!
€ Euros Donate via TransferWise!
₹ (INR) Donate via instamojo

spaceshooter's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spaceshooter's Issues

DeprecationWarning

text_rect.midtop = (x, y)

DeprecationWarning: an integer is required (got type float). Implicit conversion to integers using int is deprecated, and may be removed in a future version of Python.

ogg file cannot be played on mac

15:20 $ python spaceShooter.py
Traceback (most recent call last):
  File "spaceShooter.py", line 343, in <module>
    pygame.mixer.music.load(path.join(sound_folder, 'tgfcoder-FrozenJam-SeamlessLoop.ogg'))
pygame.error: Unrecognized music format

Cannot execute binary file

Ubuntu 14.04 32-bit

I got this error when I tried to run the binary:
bash: ./spaceShooter: cannot execute binary file: Exec format error

I guess this is because the game was designed for a 64-bit machine, and can't be executed on a 32-bit machine.

Could you update the README file to indicate this?

Score is not displaying after game ends.

When the game ends, the score should be displayed on the screen and an option should come which asks the user whether to play a new game or not. A new screen should come when the game ends and prompt the user whether he wants to play a new game or end the game.

Executable for mac should be built separately

$ ./spaceShooter
bash: ./spaceShooter: cannot execute binary file

My system is

$ uname -a
Darwin K2047 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53 PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64

$ system_profiler SPSoftwareDataType
Software:

    System Software Overview:

      System Version: OS X 10.10.5 (14F27)
      Kernel Version: Darwin 14.5.0
      Boot Volume: fibonacci
      Boot Mode: Normal
      Computer Name: fibonacci
      User Name: Senthil Kumaran (senthilkumaran)
      Secure Virtual Memory: Enabled
      Time since boot: 7:18

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.