Page 1 of 7

Work in Progress

Posted: July 21st, 2012, 6:37 am
by chili
Just faffing about with physics and classes.

Edit: added a new version, check it out. 8-)
Momentum.zip
(11.45 KiB) Downloaded 619 times
AngularMomentum.zip
(16.56 KiB) Downloaded 538 times

Re: Work in Progress

Posted: July 21st, 2012, 10:00 am
by Asimov
Hi Chilli,

That is really cool. I love the way your balls jiggle LOL.

Asimov

Re: Work in Progress

Posted: July 21st, 2012, 4:01 pm
by viruskiller
think this is more like a slow motion nuclear fusion animation lol,i ran it for like 3 min and 2 circles collided so hard they remained linked together lol:))

wish chili would post the source too:D that would be something interesting to look at:)

Re: Work in Progress

Posted: July 21st, 2012, 10:22 pm
by LuX
Way to go stealing chili's idea on the bouncy balls, heh-heh-heh. Anyways, I revised my collision code so that the balls bounce off each other realisticly as well as transferring kinetic energy properly.

So now if a ball hits directly in front, all the energy will transfer, and the hit ball will move forward. However, if a ball hits in an angle only some of the energy is transferred and both balls will carry on their way. So if they hit at 45 degrees for example, the energy will split, and both balls carry on on opposite ways like an "Y". Or at 90 degrees the hit ball will carry on at 90 with only little energy, while the other ball will continue at almost the same angle. ....You'll see.

To launch the ball hold over it and drag the "energy" bar. The ball will turn darker red, the more speed it has. When you release it will fly off. Note that at maximum speed it will sometimes ignore collision.

Also, just to get to the billiard feelin' press "S" to place the balls in a triangle. Or "R" for random motion.
RealisticBiljard.rar
(14.24 KiB) Downloaded 438 times
Small mod. Looks SOOO AWESOMEE! : -D
Electro Billard.rar
(24.83 KiB) Downloaded 431 times

Re: Work in Progress

Posted: July 22nd, 2012, 2:44 am
by chili
Lol, it's like you read my mind LuX.
I was thinking of posting a challenge to anyone to make a similar physics simulation. Pretty good work brah. You said that the new version has more realistic collisions; I didn't even notice that the only one didn't have that. :P

But I'm just getting warmed up. I'm working on something else (which was the real problem I was trying to solve), and hopefully I'll have it done in a couple of days or so.

Are you ready for round two? 8-)

Re: Work in Progress

Posted: July 22nd, 2012, 2:55 am
by Asimov
Hi Chilli,

I am afraid I am better at the graphics side than the maths side. I agonise over doing stuff like this and would probably spend weeks trying to make it work LOL.

I know that when two balls hit each other velocity would be momentarily increased, but I have no idea about how much.

Anyway back to my score system ahem ;)

Asimov

Re: Work in Progress

Posted: July 22nd, 2012, 3:39 am
by chili
No worries Asi, we all have our strengths and weaknesses.

I couldn't make a slick menu like you did for you game, nor could I make all those sweet CG game assets. :)

Re: Work in Progress

Posted: July 22nd, 2012, 9:06 am
by chili
Added angular momentum to the simulation. Check the post at the top of this topic for the new download.

Care to give it a shot LuX (or anyone else who's interested)? ;)

Re: Work in Progress

Posted: July 22nd, 2012, 9:52 am
by LuX
I'll give it a shot later. Already have a rectangle drawing function that can be rotated from the center, so I have a small head start.
chili wrote:You said that the new version has more realistic collisions; I didn't even notice that the only one didn't have that.
I deleted my older post, so dunno if you had a chance to try it out, but there the collision was not too realistic. Like this:
Collision1.png
Collision1.png (11.44 KiB) Viewed 7638 times
The new one, right now looks like this:
Collision2.png
(13.32 KiB) Downloaded 576 times

Re: Work in Progress

Posted: July 22nd, 2012, 11:33 am
by astr0
chili wrote:
AngularMomentum.zip
awesome