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

Comments for Gravity Engine

Return to Gravity Engine

A new version of this scenario was uploaded on Wed Nov 23 22:33:53 UTC 2011
A new version of this scenario was uploaded on Wed Nov 23 22:34:13 UTC 2011
darkmist255darkmist255

2011/11/23

This is very close to something I just made :D. But yours are a lot more bouncy. To the source!
AwesomeNameGuyAwesomeNameGuy

2011/11/24

Nice
uboizuboiz

2011/11/24

I like the Physics effect! Great!
A new version of this scenario was uploaded on Fri Nov 25 13:56:06 UTC 2011 Some small bugs fixed
A new version of this scenario was uploaded on Fri Nov 25 13:57:59 UTC 2011 Some small bugs fixed
A new version of this scenario was uploaded on Fri Nov 25 14:08:58 UTC 2011
K_O_PK_O_P

2011/11/25

Hey cool! This engine is pretty good!
MatazatMatazat

2011/11/29

reminds me of the time i found a dead body in a mcdonalds ball pit
A new version of this scenario was uploaded on Wed Nov 30 16:53:39 UTC 2011 A more accurate collision checking. Different balls with different settings
A new version of this scenario was uploaded on Wed Nov 30 16:55:24 UTC 2011
tylerstylers

2012/5/12

the balls get stuck on the walls
How have you made it that the balls bounce off? This means how can they know how the earth looks like where they are at the moment?
Busch2207Busch2207

2012/9/23

The method 'getMaterialAt(int x, int y)' returns the Material at the given Location. I initialized some points around the middle of the balls, that have to be checked for Material (In the constructor of tje class Points are the points setted with the method 'setOffset(int [] x,int [] y)'). And when a ball wants to move at a location where solid material is, I calculate the degrees it has to bounce of it.
Ok that sounds a little difficult but I'll try to use this. Thank you.
Gevater_Tod4711Gevater_Tod4711

2012/10/15

I need your help again: I think see where the balls bounce off (in the souce) but what I don't understand is how the balls bouce off with an angle different to the angle they had before. So, how can the balls know how is the angle of the earth?
A new version of this scenario was uploaded on Mon Oct 15 16:58:07 UTC 2012
Busch2207Busch2207

2012/10/15

First I work out the angle of the ground (from line 284-307). I go from the angle of incidence 180 degrees in both directions (+1 degree each check) and check if the object is in solid material at the given location or not. (line 287-294). If it's not in solid Material, I remember the Point and store him. (195-304) And then I calculate the new angle, with angle of incidence is equal to angle of reflection. (308-315)
Gevater_Tod4711Gevater_Tod4711

2012/10/17

Thank you. Now I understood. It was realy hard to integrate it into my scenario but now I've got it.
ROCKY_BALBOAROCKY_BALBOA

2013/6/7

can any on help me with the programing side of gravity
softwhizjxsoftwhizjx

2014/8/7

Thank you! Just what I needed!