My Space Invaders Game

edited in Projects
If you dont want to read the whole post and are thinking "Shut it! I just wanna play!" Then here is the link up front :)
https://drive.google.com/file/d/0B_ycyNuyuEDuQVhoOU8xV1J4Ymc/view?usp=sharing
Otherwise please do read on :)

Hey All,
My name is Elan. I am an engineering student at Stellenbosch University and I love programming. We had to make a game for our computer science course and my professor encouraged me to post it here.
So here it is! :D
I would appreciate any feedback like bugs, glitches, what you think I should add, what you think I should change or take out, what I should tweak, what should have been done better, what you think of it, anything :)
First off, you can control the ships movement with the keyboard (left is A, right is D) and you can choose how you control the rotation of the ship (by default shoot is the spacebar, rotate anticlockwise is Q and clockwise is E but you can go to the options menu and change the controls to “mouse” and then the ship will always aim at your mouse and you can click to shoot – you can hold click to shoot automatically).
Secondly, the objective is to shoot all the enemy ships before they touch the bottom, if they do it’s game over for you! You can take damage by getting shot by enemies but if you lose all your health you only restart the current level and lose a life, once you lose all your lives it is again game over. As the levels progress the game gets more difficult and you will need to upgrade your ship. You get a chance to do this after each level you complete. Upgrades can be bought with credits, you get credits based on your score for the last level.

The upgrades do the following:
Fire Rate: increases your rate of fire.
Bullet Damage: increases the damage done by your bullets.
HP: increases the amount of damage that you can sustain before losing a life.
Power-ups: increases the duration of the effects of power ups.
Multi-shot: each upgrade increases the number of bullets you shoot per click.
Upgrade-Bunkers: each upgrade makes your bunkers wider, able to take more damage and have a higher chance of your bullets phasing through them.
Warp Drive: each upgrade slows your enemies and their bullets.
Buy lives: with each upgrade you purchase 5 lives.

Things you will encounter in the game:
Power Ups: These are space invader icons glowing half blue and half red, to activate them you need to shoot them or move into them. Once activated they will affect the game in some way (read farther down to find out how).
Bunkers: These are the green floating platforms that block all enemy bullets (as long as the bunker still has health) and some of your bullets (upgrade them to reduce the amount of your bullets that are absorbed).
Bullets: Enemies can also shoot at you, they shoot two types of bullets, one that follows a fixed trajectory and one that adjusts its trajectory and tries to hit you (a “homing bullet”), this bullet similar to the others but is on fire!

What possible effects the power ups can have:
-increase fire rate
-shoot multiple bullets at a time
-slow time
-increase your damage
-shield to protect you from enemy fire
-and some combinations and variations of these

Known Glitches:
When you lose all your lives or an enemy gets to the bottom of the screen and the game restarts, your score, credits, upgrades and the enemy’s speed are supposed to reset. Some of these things don’t always reset, sometimes they all do, sometimes one does and sometime a few do. It’s frustrating and I am not sure why it happens but there you have it :P
Sometimes when you get the slow mo power up the enemies will crawl straight down along the screen.

Now some technical aspects, I have uploaded a .jar file so you should be able to just double click it but if that doesn’t work then you will need to either navigate your command prompt to the file and type in a command (I will give it later in this post) or simply save the command in a .txt and change the .txt file’s extension to .bat and double click on that. Another thing to look out for, my game uses fairly large sound files and since the java heap space is smaller than the size of my game you will need to increase the size of your heap space to prevent the sound in the game crashing (it just stops and you can still play the game so its ok really :P).
Both of the above problems can be fixed with the following command:
java -Xms256m -jar SpaceInvaders.jar
(I have put a run.bat in the zip file, this can simply be double clicked to play :D)

Also say whether you would like some screenshots or other images posted here so you can get a look before you download it, or a version without sound (it will be substantially smaller so less to download) :)

[EDIT:] I tried attaching it as a file but it seems not to be working but you can get it from my google drive here:
https://drive.google.com/file/d/0B_ycyNuyuEDuQVhoOU8xV1J4Ymc/view?usp=sharing
Also thanks for the quick feed back @Elyaradine :) I will get some screen shots up shortly :D

[EDIT2:] Here are some screenshots :) I should also mention that the graphics and sound arent mine, I got most of them off of royalty free sights.
image
image
image
image
image
image

That’s it! Hope you all enjoy :)

Comments

Sign In or Register to comment.