Sign in to follow this  

A question about Tokamak Dynamics Engine

This topic is 4747 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all! For the past couple weeks or so I have been searching the net and the forums for a free Physics engine that is most suited for my game purposes. The selection fell onto the Tokamak engine, and I find it perfect for I want to do with it. Well, almost perfect. I have one big concern: While reading the documentation for it and looking at the example source codes I saw that when you are initializing the engine you have to specify the maximum number of bodies you will have ( neSimulatorSizeInfo::rigidBodiesCount and animatedBodiesCount). So, if I initialize the engine to support 10 rigid bodies (10 boxes for example) and in the game I try to add the 11th box, the engine will malfunction? But, if I initialize the engine to support 1000 rigid bodies, and I only use 11 boxes, there will be a massive waste of memory and a drop in performance? To me, the fixed predefined size for the number of bodies is very very limiting. Am I missing something here? Or is there a way to overcome this problem? Do ODE and Newton have these limitations? Thank you for any help. Rados

Share this post


Link to post
Share on other sites
I have looked at Novadex, but it is only free for non-commercial use. I don't want to use it and get used to it because I might decide to go commercial with this project :P

I took another quick look at ODE and it seems that it is less complete (a few included examples crashed after a while of running) and has less features "out of the box" (like the particle rigid body, or the terrain callbacks). I am sure if I tweak the source code a bit I could get the same, and maybe even better functionality for my needs than other engines, but I simply would not want to spend any time doing what I don't know much about (aka, physics in games).

But, I will look into ODE a bit more. And maybe see the Newton engine, but I heard it can't handle a huge terrain due to its accuracy>performance policy.

Thanks again for your time.

Rados.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Actually the Newton engine can handle unlimited terrains with the used define mesh collider. The SDK even comes with a height field implementation of a terrain that include ray casting, all with source.
The engine does not have limits on the number of objects in the scene, and it self manage the memory. It is also extremally stable.
Here is a site with a collection of demos showing some of the features the engine has to offer.
http://www.delphigl.de/eng_index.html

Share this post


Link to post
Share on other sites
I did a test using one of my tokamaksimulations.
I allocated 1000 rigidbodies and 1000 geometries.
Checking the used mem I saw that one rigidbody + one geometry allocated about 2600 bytes of memory.
So thats about 2,5 Mb of memory.

Now 1000 bodies is very extreme and I doubt that you'll ever used that amount of rigidbodies in your game.
I'd guess a maximum of 300 would do(I think even that number is a bit extreme)
But let's say you allocate a max of 300 bodies & geomtries.
That will use approx 780 Kb of memory. I don't consider that a massive waste of memory.
regarding performance...
The simulation performance will not be affected by how many bodies you allocate memory for.
I allocated a maximum of 5000 bodies & geometries and the speed of my simulation didn't change at all.

Share this post


Link to post
Share on other sites
Thanks Sweenie! That is great info. I was actually looking for something like that. I think I will go with Tokamak for now. I don't need anything more advanced.

Thanks again for the replies.

Rados.

Share this post


Link to post
Share on other sites
Also, I haven't been able to try the recently upgraded Newton yet, but from my experience Tokamak can handle a "lot" more rigid bodies than newton or ODE with no apparent slowdown whatsoever. I once had 2000 objects in my scene and was still running at 58 fps.

Share this post


Link to post
Share on other sites

This topic is 4747 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this