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

Comments for K_O_P HeliGame

Return to K_O_P HeliGame

A new version of this scenario was uploaded on Wed Apr 11 19:49:42 UTC 2012
RazzoRazzo

2012/4/11

Pretty good :D Could you help me out with the Gravity. How did you get it so smooth? How?! I demand answers :D
RazzoRazzo

2012/4/11

Love the health bars by the way!
K_O_PK_O_P

2012/4/12

mhh... the gravity... Well first I created a double parameter, that saves the y position (called yPosition and one, that saves the y-Speed (called ySpeed). then i rewrited the setLocation method to: setLocation(int x, double y){ super.setLocation(x,(int)y); yPosition=y;} and I added a method double getYPosition(){return yPosition;} and in my act-method is written: setLocation(getX(),getYPosition()+ySpeed); Then all I have to do for the gravity is raising ySpeed for 0.1 And if the up-key is pressed, I subtract 0.2 If you although want an x-move you have to do the same with x.
K_O_PK_O_P

2012/4/12

Hope that answered your question... :) If not, pls tell me! :)
Busch2207Busch2207

2012/4/12

Well done!
USBestUSBest

2012/4/14

Wow! The collision check is perfect. How you made this?
K_O_PK_O_P

2012/4/15

I'm using a code, Busch has written: http://www.greenfoot.org/topics/find/1590#post_1590
CarjadosCarjados

2013/5/25

Nice made! I just got bored when I had ~1500 points, so I let the enemy shoot me down. Maybe you want to add this: When two bullets (or missiles?) hit each other, they vanish. With this, you can block enemy bullets and he can block yours. I'd like it, just think about it. ;)
K_O_PK_O_P

2013/5/27

Sorry, but I can't find the source code any more...
JetLennitJetLennit

2013/5/30

Try decompiling this www.greenfoot.org/4770/applet_attachments/0001/2681/greenfoot363371785502048599.jar