Skip to content

cptharris/space-invaders-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Space Invaders

Space Invaders was a 1978 arcade game based on other shooting games of the time, as well as movies like Star Wars. This is my version of Space Invaders, written in Java. I have a spinoff version on my website, but it deviates significantly from the original gameplay. For this version, I attempted to recreate the gameplay while also adding in nicer graphics and some different touches.

Gameplay

A spaceship at the bottom, based on the x-wing from Star Wars can travel from left to right. A group of aliens travels left to right as well, descending toward the player. The player and aliens shoot at each other. The player's goal is to stay alive as long as possible and prevent the aliens from reaching the bottom of the screen.

Powerups, such as ammo charges and hearts, travel from the left side of the screen. The player can shoot the ammo charges to reduce their reload time and the hearts to regain health (to a maximum of 10 hearts).

How to Play

  • space to shoot
  • left arrow or right arrow to go left or right
  • ESC to restart
  • shoot the aliens to destroy them
  • shoot ammo charges to reduce reload time
  • shoot the hearts to regain health

Entities

name image
aliens
player
ammo charges
hearts
blast bolts

Entity Versions

Some entities have versions that they cycle through on a timer or due to game interactions. The player's xwing, for example, gains blast scoring as it is hit. The aliens' arms move up and down on a timer.

name image
alien type-0
alien type-1
player