PhysMax Example

Community Forums/Showcase/PhysMax Example

Oddball(Posted 2006) [#1]
Hi all. As some of you may know I have been working on a physics module for a while now in Blitz Max for a future project. Progress has been slow for varies reasons as readers of my worklog will have no doubt seen. But I feel now the module is finally coming together, and it is about time it was tested on a PC other than my own. For this purpose I have put together a very simple demo of PhysMax in action. It's just a few objects tumbling down some slopes, but I'd appreciate any feed back on how well it runs.

The Screen Shots - Click to enlarge


The File - 325kb
Example02.zip

Feed Back
The gauge at the top is color coded depending on how long the physics updates take. The colors are |GREEN|YELLOW|ORANGE|RED.

I'm only interested in the physics performance at the moment and I just need to know which color different spec machines max out at.

Thanks.


Chroma(Posted 2006) [#2]
I'm speechless. This is great GREAT stuff. Looks easy to set up too!!! How is the release going to be handled??

It ran perfect too.


Stevie G(Posted 2006) [#3]
Nice demo .. reminds me of bouncers ( I think ) old blitz 3d one. Assume you're using verlet integration here?

I got 46 bodies, Physics time was in the middle of the first zone.

Just a thought but you'd get far more accurate info if you had a millisecs/ FPS update time for the physics rather than a bar which means nothing to anyone other than you. Also, to stress test add a button which allows you to manually add a new body.

P4 3.0ghz, gfx440mx, 512mb ram, XpPro

Stevie


LineOf7s(Posted 2006) [#4]
Very nice. When it got to 45 bodies, it was pretty much just on the start of the yellow.

Of course, as great as it was, it's kind of an odd test. As Stevie says, it might make a lil more sense test-wise to (perhaps) not have bodies fall off the bottom of the screen, but to have them pile up slowly so we can see at what point our systems start to 'choke'. ??

Regardless, it was nice and smooth and great. :o)


jkrankie(Posted 2006) [#5]
wow, thats fantastic! went yellow after about 50 bodies.

I agree that it would be better to have a more sressful demo though...

Are you going to be releasing tthis as a module?

Cheers
Charlie


Dreamora(Posted 2006) [#6]
Was unable to get into the yellow. Even with 50 bodies (was unable to get higher, is there a key to spawn additional bodies? :) ) it was still 15-20% to go to even reach yellow :)

Rendering bar was never visible at all.
Great module :)

Core T2500 (2x 2Ghz), 7600 Go


skn3(Posted 2006) [#7]
Excellent.

Will this module be available. Free ? , at a price ?

I managed to get to 50 entities and only half way into green.


JoeRetro(Posted 2006) [#8]
Very impressive demo! I want it.....now :)

I got about 47 bodies...

XP, 1 gig, AMD64 3200+, GeForce GT6600 oc


BlitzSupport(Posted 2006) [#9]
Brilliant. Stays in the green for me with 40+.


fredborg(Posted 2006) [#10]
Superb. I only have a green bar, it never turns yellow.


Genexi2(Posted 2006) [#11]
Never went yellow here, but the highest I could get onscreen was 43 objects, and that was with it about 8/10'th towards yellow.

1.52ghz AMD64 3600+
2gb DDR RAM
256mb GF6800 GT



I'm curious for a stress test as well, to see how it handles once it breaks yellow and all, as I assume each additional body would make the bar climb higher than the previous one as stress-point.


tonyg(Posted 2006) [#12]
Very nice.
38 objects and all in the green.


altitudems(Posted 2006) [#13]
Great job! Can't wait to see more.
It took about 5 min. to get a build up of about 50 objects and a yellow bar.


ashmantle(Posted 2006) [#14]
60 something, far under yellow.

very impressive stuff.. sign me up for a copy :D


Boiled Sweets(Posted 2006) [#15]
Amazing


tonyg(Posted 2006) [#16]
sign me up for a copy :D

Same here. Not sure I need a physics module but I do WANT one.
Seems there are few interesting Bmax modules in the works again.


SillyPutty(Posted 2006) [#17]
excellant stuff, so ... how much ? :)


TartanTangerine (was Indiepath)(Posted 2006) [#18]
Why does it show say 30 bodies when there are only 2 on screen?

I consider the most important part of a physics simulation to be how motionless objects are dealt with. For example, If I had a stack of boxes and they are motionless the physics simulation should be aware of that and factor out those bodies from the simulation - until such a time that they become part of the simulation again.

How do you deal with that?


LineOf7s(Posted 2006) [#19]
Why does it show say 30 bodies when there are only 2 on screen?


Just to insult your intelligence for a moment, you do know the 'test area' is bigger than the screen and you can scroll up and down with the arrow keys, right? :o)

Apart from that, I shrug unhelpfully. And a little curiously, if it's not that.


Oddball(Posted 2006) [#20]
Thanks for the positive comments guys. The module has been in the works for a long time, but I've not really shown it off much. Just to answer those that want to see a stress test. I wanted to make sure it worked on other PC's first before trying to break the simulation. I'll be posting more demo's for testing too and there'll be a stress test amoung them.

Nice demo .. reminds me of bouncers ( I think ) old blitz 3d one. Assume you're using verlet integration here?
Good spot. When I first decided to make this module Bouncer's physics stuff was what came to mind, so that's the style I want for.

Just a thought but you'd get far more accurate info if you had a millisecs/ FPS update time for the physics rather than a bar which means nothing to anyone other than you.
To be honest I didn't want to get bogged down by lots of numbers. I thought if people just wrote Green, yellow, etc. I could get a quick understanding of which systems were slow or fast. Plus the bar is easier to read than a number that changes 60 times per second. I suppose I could have put both in. I'll know better for the next demo.

Why does it show say 30 bodies when there are only 2 on screen?
As LineOf7s points out the simulation area extends down further than the screen, and can be viewed by using the arrow keys.

I consider the most important part of a physics simulation to be how motionless objects are dealt with. For example, If I had a stack of boxes and they are motionless the physics simulation should be aware of that and factor out those bodies from the simulation - until such a time that they become part of the simulation again.

How do you deal with that?
I couldn't agree more. Culling un-needed collision checks is extremely important, and at the moment my module doesn't time out at rest objects. Rest assured however I have a lot more optimizations to make and that is certainly on the list.

Will this module be available. Free ? , at a price ?
I discussed this at length in another topic. I'll dig out the url at some point, but it basically boiled down to the fact that this is for a personal project, and if I feel I'm able to support a public release I will, but if not this will stay in house, so to speak.

Thanks to all those that tested. I'm at work all weekend but I'll put together a stress test if I get time.


xlsior(Posted 2006) [#21]
Looks pretty nice!

On my machine it just hits yellow at 48-49 objects. (AMD Athlon 2800+, Radeon 9600 Pro)


Stevie G(Posted 2006) [#22]
@ Oddball,

No need to constantly update the FPS ... use this bit of code. Not sure who's it is but work well...

Global FPSlastupdatetime
Global FPSframecount
Global FPSlastcount#

Function FPS(frequency=200)

	time=MilliSecs()
	FPSframecount=FPSframecount+1
	elapsed#=time-FPSlastupdatetime
	If elapsed>=frequency
		FPSlastcount=FPSframecount/elapsed*1000.0
		FPSframecount=0
		FPSlastupdatetime=time 
	EndIf
	Return FPSlastcount
	
End Function 


I'm curious to know how you handle the body / body collisions. Assume you're using initial bounding sphere checks then a simple convex hull for checking intersections between the constraints?

Stevie


TartanTangerine (was Indiepath)(Posted 2006) [#23]
Scrolling, lol - no I did not think of that - how dumb of me!


skn3(Posted 2006) [#24]
I discussed this at length in another topic. I'll dig out the url at some point, but it basically boiled down to the fact that this is for a personal project, and if I feel I'm able to support a public release I will, but if not this will stay in house, so to speak.


Can I come stay at your house then ? lol.

I think the community/ blitzmax would really benifit from this. If you were not willing to release a supported version at a cost, why not release it to the public domain ? Obviously a large amount of work has gone into it, but it could be what the community project has been looking for! Who knows, it might even end up getting optimized for yourself by other people.

Just suggesting it, because it would be a shame if this or an alternative 2d physics module didnt arrive for blitzmax, preferably shipped with blitzmax!


BlitzSupport(Posted 2006) [#25]
While respecting people's right to do what they want with their own hard work... what he said! ^^^


kochOn(Posted 2006) [#26]
Really impressing! The gauge keeps green with more than 40 bodies.

Bravo!!!


LarsG(Posted 2006) [#27]
sweet.. got to about 48 bodies before it turned yellow...


Panno(Posted 2006) [#28]
you Freak ... ;)

cool module


smilertoo(Posted 2006) [#29]
most i can get is about 46 but its only around half way to yellow.


Oddball(Posted 2006) [#30]
I think the community/ blitzmax would really benifit from this. If you were not willing to release a supported version at a cost, why not release it to the public domain ? Obviously a large amount of work has gone into it, but it could be what the community project has been looking for! Who knows, it might even end up getting optimized for yourself by other people.
Well the module is far from the finished article just yet. So we'll have to wait and see what kind of mood I'm in when it's all polished up. You never know I might be so sick of it by then that I just throw it in the bin :) Here's my previous thread on the subject, http://www.blitzbasic.com/Community/posts.php?topic=63273#706615

It seems my demo was a walk in the park for everybody's systems. I'm very pleased as there are still a few more optimzations to go in, and so hopefully more speed to be had. If someone could test it on a very low spec machine I'd be interested to see how well it performed.


JoeRetro(Posted 2006) [#31]
Well, hopefully you will be in a good mood because many users here (including myself) would love to see this thing released :)


Jason W.(Posted 2006) [#32]
Impressive!! I really enjoyed your example, Oddball!!

Thanks.


Jason


tonyg(Posted 2007) [#33]
Oddball, I've been keeping an eye on the worklog for this.
Please say it's something you're still interested in releasing.


slenkar(Posted 2007) [#34]
Ive got a low spec machine but I need the demo to be 800x600x16, with opengl and directx versions because one of them doesnt work for some reason.


Oddball(Posted 2007) [#35]
Oddball, I've been keeping an eye on the worklog for this.
Please say it's something you're still interested in releasing.
Thank you for the interest and sorry for the lack of information. Basically January has been a very bad month for me and my personal circumstances have change quite dramatically. The status of PhysMax as a stand alone project is that it's on hold. I only have so much free time and have decided to spend it on making a game using PhysMax, after all that as the reason I started the PhysMax project. The module is still being updated, but now only as and when I need extra features. Hopefully things will turn around for me sooner rather than later, and I'll be able to work on PhysMax more. In the mean time you can always check out my game project. [plug] Here's the thread.

Ive got a low spec machine but I need the demo to be 800x600x16, with opengl and directx versions because one of them doesnt work for some reason.
The demo runs in windowed directX mode. I'll see if I can dig out the code and compile an openGL version.


tonyg(Posted 2007) [#36]
Sorry to hear things might not be going to well. Good luck and feel free to release the source if it would help in any way >:-)


Jake L.(Posted 2007) [#37]
Great demo! Can't wait to see a official release (shared or to buy) one day...

Jake


Jeremy Alessi(Posted 2007) [#38]
Get 'er done, I could use this!


The Caffeine Kid(Posted 2007) [#39]
Yeah I would love to play with this too. :D


Dock(Posted 2007) [#40]
Sorry to hear your have real-life problems right now Oddball, I hope everything settles down for you soon.

Best of luck with your game and the physics module - I would definitely pay money for something like this.


unlikely(Posted 2007) [#41]
Just... awesome. :)

The demo got up to about 48 bodies and was still well in the green on a 2.66ghz P4.

I'd totally pay for something like this.


Paul "Taiphoz"(Posted 2007) [#42]
Cant recall the last time I posted anything on this site, to be honest I have not coded anything in years with Blitz, its not that I don't want to simply a lack of time.

Have to say, this is Nice, and I will echo what the others have said, I hope you release it, Public domain would be best since I am skin and couldn't buy it hahahaha..

Anyway nice job, and well done on making something worth a reply.