Small rigid physics demo

Talk about your favorite PC games, Steam and building awesome custom rigs!

Moderator:Moderators

Post Reply
User avatar
marshallh
Moderator
Posts:2986
Joined:Sat Sep 10, 2005 2:17 pm
360 GamerTag:marshallh
Location:here and there
Contact:
Small rigid physics demo

Post by marshallh » Fri Sep 26, 2008 4:14 pm

I've always wanted to do some sort of physics sandbox to mess around with my own code. Well, the past few days I've written this program which simulates rigid point collisions and gravity.

Keys:
Insert - Add lots of balls
Delete - Remove balls
Arrow up - increase gravity
Arrow down - decrease gravity

Click anywhere in the window to spawn a new ball.

http://retroactive.be/physics.zip

Image
Image

User avatar
grossaffe
Posts:1450
Joined:Thu May 29, 2008 11:54 pm
Location:USA
Contact:

Post by grossaffe » Fri Sep 26, 2008 5:03 pm

psh, that's nothing. Look into a program called phun. that's a full-blown 2d physics engine that allows you to do simple stuff like make circles and squares and free-hand shapes, but also does advanced stuff like hinges, springs, motors, liquids... a whole world of opportunity.

edit: oh, so you wrote this yourself? what language did you use?
do you plan on adding more to it with time?

User avatar
omegabullit
Posts:132
Joined:Sun Aug 08, 2004 9:19 pm
Location:poconos
Contact:

Re: Small rigid physics demo

Post by omegabullit » Mon Feb 16, 2009 7:45 pm

I'm interested in what you wrote this in as well. Do you mostly do your development in Windows? Also, I noticed in the show yourself thread you were in college. Where ya at, degree, year, that sort of thing?
<a href="http://www.stephanj.com"><img src="http://www.stephanj.com/pictures/benheckban.JPG"> </a>

User avatar
mmoshkowich
Posts:381
Joined:Tue Oct 07, 2008 6:52 pm
PSN Username:mikedacat
Location:Long Island, NY

Re: Small rigid physics demo

Post by mmoshkowich » Mon Feb 16, 2009 7:50 pm

its fun and addicting!

User avatar
jleemero
Posts:804
Joined:Mon Feb 19, 2007 3:12 pm
Location:Yay Desert.
Contact:

Re: Small rigid physics demo

Post by jleemero » Mon Feb 16, 2009 7:51 pm

It's a 5 month old thread!

User avatar
mmoshkowich
Posts:381
Joined:Tue Oct 07, 2008 6:52 pm
PSN Username:mikedacat
Location:Long Island, NY

Re: Small rigid physics demo

Post by mmoshkowich » Mon Feb 16, 2009 7:53 pm

somebody bumped it I didn't look at the first date. It was fun any way

User avatar
Skyone
Moderator
Posts:6390
Joined:Tue Nov 29, 2005 8:35 pm
Location:it is a mystery
Contact:

Re: Small rigid physics demo

Post by Skyone » Mon Feb 16, 2009 8:15 pm

Big bump I know, but you wouldn't happen to still have the source for this, would you marshall?

User avatar
omegabullit
Posts:132
Joined:Sun Aug 08, 2004 9:19 pm
Location:poconos
Contact:

Re: Small rigid physics demo

Post by omegabullit » Tue Feb 17, 2009 8:14 am

Hmm, sorry about that. I guess Development Center threads are checked very often, I didn't even notice how old it was.
<a href="http://www.stephanj.com"><img src="http://www.stephanj.com/pictures/benheckban.JPG"> </a>

User avatar
marshallh
Moderator
Posts:2986
Joined:Sat Sep 10, 2005 2:17 pm
360 GamerTag:marshallh
Location:here and there
Contact:

Re: Small rigid physics demo

Post by marshallh » Tue Feb 17, 2009 10:11 am

I ran it today and it ran at 400fps on my new beast graphics card. In literally less than 2 minutes I rigged a ghetto frame limiter to keep it from going too fast.

Dev-C++ to open the project and compile. The new binary is in there also.

http://retroactive.be/physics_src.zip
Image

User avatar
SjBishop
Posts:22
Joined:Mon Jun 01, 2009 9:38 pm
Location:Washington, USA

Re: Small rigid physics demo

Post by SjBishop » Wed Jun 24, 2009 1:38 pm

I dont want to be the one to super bump this, but i think it is pretty cool. I would love to see this little demo turn into some type of game :D
ZOMG Legend of Zelda ROCKS!

Nick12506
Posts:2
Joined:Sun Jul 19, 2009 4:16 pm

Re: Small rigid physics demo

Post by Nick12506 » Sat Jul 25, 2009 11:05 am

It closed out on me, here's the log,

Code: Select all

Balls: 1101   Frames done: 35
Balls: 1106   Frames done: 35
Balls: 1112   Frames done: 32
Balls: 1117   Frames done: 34
Balls: 1122   Frames done: 34
Balls: 1126   Frames done: 34
Ball
I the "Ball" at the end is what it was.

User avatar
Mario
Posts:1383
Joined:Mon Mar 05, 2007 7:20 pm
Location:Sunny California

Re: Small rigid physics demo

Post by Mario » Sun Jul 26, 2009 5:35 pm

SjBishop wrote:I dont want to be the one to super bump this, but i think it is pretty cool. I would love to see this little demo turn into some type of game :D
It's already been done: http://www.phunland.com/wiki/Home" onclick="window.open(this.href);return false;
Image

User avatar
Kurt_
Portablizer
Posts:5748
Joined:Thu Nov 24, 2005 10:32 am
Steam ID:kurbert
Location:Ontario, Canada
Contact:

Re: Small rigid physics demo

Post by Kurt_ » Thu Aug 27, 2009 11:00 pm

I got phun. It's fun. But I can't figure out how to connect hinges to two objects. I figure it's pretty simple.
Hey, sup?

Post Reply