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

spaceblue's Comments

Back to spaceblue's profile

Thanks, I'll be looking into that. =) Next update won't be for awhile; I'll be out of the city for a few weeks.
You're supposed to die, but its not implemented yet.
About the FPS, when you press pause and then press run, the FPS measurement sudden dips down low, but it comes back afterwards. So if quality control is turned on, the quality goes down.
Okay so even with the motion blur off and the quality at 0, the FPS is still at 5 for me.... Maybe my computer's not having a good day.
FPS is at 5...
So this is my modification of the code: public suicidebaby(boolean ini) { parachute = ini; hitpoints = 300; if (parachute) { setImage("suicidebabyparatroop.png"); } } ... else if(parachute == true) { platform vipr = (platform) getOneObjectAtOffset(0, (getImage().getHeight()/2), platform.class); if(vipr == null) { setLocation(getX(), getY() + 1); } if(vipr != null) { setImage("suicidebaby.png"); parachute = false; } } So basically, the initialization of the suicidebaby class takes care of the image, and later, the computer does not continuously set the image as the parachute thing., but sets the landing image when the baby has landed.
Also, you can save those images as greenfootimages, so that Java doesn't have to continuously create an image from the same file.
I think i found the problem. When the babies fall from the sky, the game lags, and i think this part of the code in the suicidebaby class has to do with it: platform vipr = (platform) getOneObjectAtOffset(0, (getImage().getHeight()/2), platform.class); if(vipr == null) { setImage("suicidebabyparatroop.png"); setLocation(getX(), getY() + 1); } if(vipr != null) { setImage("suicidebaby.png"); parachute = false; } That was found in the act method, so basically, when the baby is falling, the computer continuously assigns it the same image. So maybe you can have some type of initialization to set the parachute image first so that it isn't set continuously.