Tokamak, Performance, and alternatives

Blitz3D Forums/Blitz3D Userlibs/Tokamak, Performance, and alternatives

Shifty Geezer(Posted 2005) [#1]
Hi all,

I've tried my Tokamak based program on a slow machine (266 MHz K6). It's too slow, obviously. However, estimations put decent performance at 800 MHz, whereas my target audience really needs to be around 500 MHz.

To get realistic gravity, gravity's set high with 3 samples. I'm wondering if the new Tokamak has fixed the need for high samples? Development's on a temporary hold so can't try it myself at the mo'. If not, is there an alternative physics engine that runs on a much faster solver?

I've got practically zip money to spend, to free is good. I also don't need any fancy features. Sphere, boxes, custom static scenery meshes to collide with. Tokamak has so far been very simple for me and great. The only reason to consider a change is better performance. How do Newton and ODE rate, pricewise and performance wise (don't care for features!)

cheers


KuRiX(Posted 2005) [#2]
Perhaps you don't need a physics library. Gravity is a very easy to implement physic law. And Blitz3D Collisions are pretty simple and fast.

What do you think?


Sweenie(Posted 2005) [#3]
It was a while since I worked on the wrapper but during that time Tokamak was one of the fastest.
Release 1.2 introduced a bug which caused bodies to interpenetrate with static geometry.
But with release 1.2.1 which was released recently this issue should have been fixed.
Have you tried your app at 1 iteration/subsample with this new release?

If you want to run your physics-simulation at very low framerates without worrying about missed collisions you should take a look at true axis. ( www.trueaxis.com ).
This engine make use of swept collision tests which make sure that a collision is never missed, regardless of the objects velocity.

It's free for non-commercial use but will cost you some bucks if you want to use it for a commercial project.
The author mentioned something about an "indie/hobby" developer license though, so it might be worth contacting him for details.
True Axis seems to include a "Blitz-friendly" dll so you should be able to use it by simply making a Declsfile for it.


Shifty Geezer(Posted 2005) [#4]
KuRiX - the program is specifically a physics simulator, with requirements for friction, restitution, etc. so an engine of some sort is required.

Sweenie - No, I haven't had chance to look at the new, improve Tok. My computer's heading up the swanny until I get to reinstall everything, development's on hold. I'll give 1.2.1 a try before looking for other solutions then.

BTW : has anyone got realistic gravity working with low subsamples? In Tok I found a gravity of I think 35 was about right for the speed, and 3 samples. Ordinarily physics based code seems to run in 'slow motion' and I haven't seen anything running more or less at real-world speeds.


Sweenie(Posted 2005) [#5]
Sometimes it may seem that a simulation is running in slowmotion but quite often this is because you don't get a correct sense of scale.

It's quite common that some users create a box with a dimensions of 1x1x1 units and a mass about 1-10 and then expect it to drop and tumble around like a dice(If gravity is set to 9.8) but a solid 1-meter block with a weight 10 kg won't tumble around like a dice.