Hi
Background:
I am writing a game in a somewhat similar style to Minecraft, with the world made of voxels/cubes. In terms of the physics, it will contain a large number of static cubes with a smaller amount of moving objects, such as vehicles, the player, other players, etc, estimated to be around 10-50. The world itself will consist mainly of identical cubes, with a smaller amount of different shapes.
A rough estimate of the amount of cubes present on a given map is around 28 million, but this could be optimized to a far smaller figure through the use of octrees etc to reduce the amount of cubes before the data is given to the engine.
I would like to be able to run the game on a mid to high spec computer, but there will also be graphics and game logic overhead.
The question:
I have not had much experience with physics engines in general and so I would like to know if the Bullet physics engine could be suitable for this task, or, failing that, whether another physics engine might work. I am willing to write my own system that is designed for this task, but it will never end up with some of the nice Bullet features and will take far longer to implement.
Of course, the answer might well be 'Go out and experiment', but if anyone has an idea of how likely it is to work of fail, it would be very helpful.
Jake
Bullet Physics for Voxel-based World
-
- Posts: 3
- Joined: Thu Apr 25, 2013 7:07 pm
Re: Bullet Physics for Voxel-based World
I don't think it'll work out well.
Your world would be 99.99% static, it'll trash broadphase with lots of bodies that will never ever collide. However you could utilize Bullet for narrowphase, since it seems you don't want to reinvent anything yourself.
Your world would be 99.99% static, it'll trash broadphase with lots of bodies that will never ever collide. However you could utilize Bullet for narrowphase, since it seems you don't want to reinvent anything yourself.
-
- Posts: 225
- Joined: Wed Jan 07, 2009 11:43 am
- Location: London
Re: Bullet Physics for Voxel-based World
You might be able to do it using a dbvtBroadphase as that keep's separate trees for static and non-static bodies so you won't have too many un-necessary calculations. You'll probably want to disable aabb updates as well.
or you could just write your own broadphase and plug that in to bullet similar to what Zaoshi suggests.
or you could just write your own broadphase and plug that in to bullet similar to what Zaoshi suggests.
-
- Posts: 2
- Joined: Sun May 26, 2013 5:31 am
Re: Bullet Physics for Voxel-based World
That sounds exactly what I want. Thank you both for the advice.
Jake
Jake