This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

fishwaffles1337
fishwaffles1337 presents ...

2012/2/16

Not Quite Space Invaders

It's up to you to defend the bottom half of the screen.
Space to shoot, arrow keys to move, you can take three hits.

3462 views / 21 in the last 7 days

Tags: space game with-source invaders

open in greenfoot
Your browser is ignoring the <APPLET> tag.
danpostdanpost

2012/2/16

What is happening is this, you have in the Bullet act() method two method calls, each which could remove the bullet from the world. If the first one removes the bullet, then there is no world to check location of it, or any other object. Probably best to check collision of bullet with invader in the invader class, and just check for worldedge in the bullet class.
A new version of this scenario was uploaded on Thu Feb 16 23:50:08 UTC 2012 I fixed the error now I just need to get the Invaders moving.
A new version of this scenario was uploaded on Mon Aug 13 23:22:34 UTC 2012 I added invaders, shooting doesn't break the game, the invaders shoot back, and you have three lives.

Want to leave a comment? You must first log in.

Who likes this?

No votes yet.