About Store Forum Documentation Contact



Post Reply 
Esenthel and double floats
Author Message
panz3r Offline
Member

Post: #1
Esenthel and double floats
I am interested in making a space game in which the universe moves around the ship and i would use double for objects matrix/pos . (i know double is not big enough but still way better than just floats).
Can you tell please if there is a way to make the engine use by default doubles for it's pos/rotation matrixes for objects ? I know that at rendering phase it will switch to floats anyway due to hardware constrains.
12-03-2014 03:20 PM
Find all posts by this user Quote this message in a reply
Rubeus Offline
Member

Post: #2
RE: Esenthel and double floats
VecD // Vector 3D (double precision)
MatrixD : MatrixD3 // Matrix 4x3 (orientation + scale + position, double precision)

Keep in mind that AFAIK, the physics engine(PhysX) does not support double precision. You would need to work out some kind of translation system to fool the physics into behaving, or use a custom implementation of physics. Maybe you could force Bullet or some other physics engine that supports double precision.
12-03-2014 07:38 PM
Find all posts by this user Quote this message in a reply
Zervox Offline
Member

Post: #3
RE: Esenthel and double floats
I suppose this would be a good read.
http://www.udellgames.com/posts/size-mat...ision-too/
12-03-2014 08:00 PM
Find all posts by this user Quote this message in a reply
panz3r Offline
Member

Post: #4
RE: Esenthel and double floats
Thank you for your answers.
Esenthel, can you tell please if it would be possible to use bullet and double floats in engine in order to have a space bigger than 100km ? ( float limitation) ?
12-03-2014 11:24 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #5
RE: Esenthel and double floats
Hello,

To use Bullet you can look into "headers.h"
Code:
// Physics - Define "PHYSX2" macro to use PhysX 2, "PHYSX" to use PhysX 3, or no macro to use Bullet

To use double in Bullet you'd need to look into the Bullet sources.
12-04-2014 12:10 AM
Find all posts by this user Quote this message in a reply
panz3r Offline
Member

Post: #6
RE: Esenthel and double floats
Thank you for the fast reply. I think for now i will start with normal floats and down on the road i will switch to doubles. Is good to know that the engine will allow me.
There are very few engines that can use double precision. Maybe if is not too much work for you, you can make it an advertised feature (even if not out of the box).
12-04-2014 12:46 AM
Find all posts by this user Quote this message in a reply
Post Reply