Code Monkey home page Code Monkey logo

star_fighter's Introduction

Star Fighter

This is a vertically scrolling space themed shmup (or Shoot'em up) that I am creating using the Pygame module in Python. This is the first game I ever made and the first program I've written of this size and scope. I am continuously changing and adding to this game as I learn more.

To play Star Fighter you must have Python and Pygame installed.

I started learning Pygame using Clear Code's Tutorials and strongly recommend starting with The ultimate introduction to Pygame if you are interested in learning how to make games in Pygame.

How to Play

Your ship starts at the center of the screen. You can move in four directions and fire upwards. There is a short cooldown timer between each shot so aim carefully. You have three hearts and if you get hit by a laser or crash into an alien ship you will take damage and lose these hearts. If you lose three hearts it's game over and your score is reset. Try to get the high score.

Controls

  • WASD or Arrow Keys to move
  • Spacebar to shoot laser
  • Hold F key to move twice as fast
  • ALT + ENTER to toggle full screen
  • ESC to pause

Enemy Aliens

Each alien sprite behaves differently and is worth a different score value based on color:

  • Slow - 100 Points
  • Moderate Speed - 200 Points
  • Fast - Moves in a Zigzag Pattern - 300 Points
  • Very Fast and Rare - 500 Points

Personal Notes

Issues That Need to be Fixed

  • Player ship sprite can still move and shoot lasers briefly after death
  • Explosion animation sprites are not transparent?

Ideas for Future Changes and Additions

  • Add twin laser powerup
  • Display sprites of aliens on screen with how many points they are worth
  • Allow player to enter initials if they get the high score
  • Figure out how to use increasing score to increase rate of alien and laser spawn
  • Show controls in game (create images with WASD, Spacebar and arrow keys, etc)
  • Menu and options, allow player to change volume and difficulty
  • Get extra hearts, maybe items that float down or reward for high score?
  • Quit game option
  • Enemy animations
  • Bosses?
  • Multiple levels/stages?
  • Speed boost that uses energy?

Asset Changes to Make

  • Replace Galaga ship with original player sprite
  • Replace Space Invaders with original enemy sprites
  • Replace placeholder music with original music

Refactoring Changes to Make

  • Add timer class, remove this responsibility from GameManager
  • Include a state manager class to manage game_active status. Figure out how to integrate this with the game manager class

Misc Notes

  • Use channel_#.play(music, -1) to loop instead?
  • Try pygame.mixer.music instead of the sound class for music, gives more control like queue music.

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.