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

Report as inappropriate.

papasmirf presents ...



took me forever to get it right and i will add other features like more bullets and maybe levels i dunno.

4261 views / 744 in the last 7 days

3 votes | 0 in the last 7 days

Tags: game with-source

open in greenfoot
Your browser does not support the canvas tag.


i like the balistic effect and the ground (if destroyed) hmm, there are game like this, in the BASIC version


Good work. Maybe you could cut a bit of the green off at the bottom so that it is less tall and fits on the screen better. And maybe you could allow 'space' for fire as well.


this is a nice game. I like how it teaches about angles. Is there a way for both players to go at the same time, not take turns? I'm trying to find a simple example of a 2 player game.
A new version of this scenario was uploaded on Sat Dec 20 16:23:42 UTC 2008


There's always a way ;) I'm not sure it'd be best however - though I guess that's mainly down to personal preference. delmar's suggestions would be good - the green at the bottom seems a bit excess at the moment and (seemingly my most common gripe) because of that it doesn't fit on my laptop screen! Also, if I attempt to move whilst the bullet's moving an error arises - might be something you want to look at!


As to's question (not sure how to respond to him best) u can simply comment out the cose in the fire button about taking turns and u'll also have to remove the checks inside of Tank and OtherTank with the keypress checks (I call the methods relating to turns in both). For mjrb4: I tried what u said and i didn't get an error on my screen. Yes for the moment I realize there is a bit of excess green but that is a small change i can do if i ever have time to work on it more =/


That's odd, does anyone else get it? The error I get is: java.lang.IndexOutOfBoundsException: X is out of bounds. It was: 1000 and it should have been smaller than: 1000 at greenfoot.GreenfootImage.getRGBAt( at greenfoot.GreenfootImage.getColorAt( at OtherTank.onGround( at OtherTank.checkFall( at OtherTank.act( at greenfoot.core.Simulation.runOneLoop( at


I don't get an error, but when I do that, the game freezes
A new version of this scenario was uploaded on Tue Dec 23 20:47:11 UTC 2008


Chances are you probably are getting that error then, but you haven't got the java terminal window enabled ;)

See all comments

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

Who likes this?

programmer qnanqing