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

SPower's Comments

Back to SPower's profile

What makes the scenario slow down to a couple of FPS when jumping?
You might consider adding Greenfoot.start() at the end of the constructor of the world; that'll make the scenario start automatically (no more need to press the 'Run' button). Since you've got a menu and a start button implemented, Greenfoot's built in 'Run' button is unnecessary for you. Also, 70 :P
The move method in actor should do that. But for further Greenfoot questions, please create a discussion - that's how thing are kept tidy around here.
Though you don't necessarily need to change the code for actually moving it, but it would be easier in my opinion (plus, less CPU intensive: rotating, though you don't notice it here, can be costly).
Not bad! :) Though it'd be nice if pressing multiple keys at once would make it move diagonally (i.e. w + a --> towards the top left). You'll simply need to check all the keys in separate if-statements, instead of making it 'else if' clauses, and then use setLocation(getX() +something, getY() +somethingelse), depending on whether you're moving to the left, right, up or down.
For a first game made with Greenfoot, this is really not bad! It's only that the time doesn't seem to work: the end screen told me my time was 0, even though I did play for a longer time than that :)
My vote: I'd like to see it, and would check it out. (For some reason it says UserInfo is not available.)
A few things: perhaps you could use the UserInfo API to save how far a player has gotten, so that you don't have to start all over again after reloading the page. You won't need to save the positions of all the weapons: you could just calculate how much money the player would have at a certain wave, and let them rebuild their previous setup. And you can use Greenfoot.start() to start the scenario, so that you won't have to click 'Run' first each time :)
Very nice game! It's quite smooth, and the graphics look quite good as well, I think! Definitely a nice implementation.