   What size is your 3D space?
  When defining your 3D world boundaries, what coordinates are you using?Whether it's a board game or an FPS there must be an optimal size for 3D worlds which minimises rounding effects due to the floating point math.Or am I just over thinking things again... [rolleyes]   
Quote:Original post by Racky1275Whether it's a board game or an FPS there must be an optimal size for 3D worlds which minimises rounding effects due to the floating point math.[rolleyes]No, actually. The nature of floating point numbers is precisely that it doesn't matter. What matters to floating point accuracy is not absolute magnitudes, but relative magnitudes.   ;  I think you're just over-thinking things again.For most applications, the accuracy and precision (not the same thing) of floating point are going to be quite enough.Floating point takes exponents 10^-37 to 10^+37, which is a pretty good range in any units.When you might run into trouble is when you challenge the number of significant digits. E.g., you want to examine molecules in a solar system size world.Consider: Maybe you have a terrain comprised of 1 square degree (60 naut. miles on a side). With 7 significant digits, you'll have little trouble using locations accurate to a few inches.If you do run into problems, use double precision. You may have to define your own vector class (D3DXVECTOR3 uses floating point) but, if you need that precision, it's probably an extensive application anyhow.;Thanks for the input guys. I think what you are trying to say is that I should stop procrastinating and write some damn code! [oh]At least I've stopped obsessing about what I deem to be the front of my world.(Since you are dying to ask, I've decided that its the faces viewed from a position on the negative Y axis, looking towards the origin. Not that it really matters.)Ok, Back work! Oh, must go get another coffee first.Think my tyres/tires need some air... better check. [smile]   ;  There is actually one thing you can do to get optimal precision - make sure 0,0,0 is in the middle of your world, and not at the edge. That doubles the precision because you get an extra bit of accuracy from the sign bit.Although you can use any units without too much trouble, In most cases I'd recommend using metres as your world units. That's mostly because it'll make things like physics calculations easier to handle.   ;Thanks for the tips Adam, makes a lot of sense.I think I've decided that my world is going to be constructed inside a grid ranging from -512 to +512 along the X and Y axis. I just feel safer with powers of two!   