0
101 Jan 29, 2012 at 09:07

Hello,

I want to have a go at creating a 3d space simulation game but not sure which engine is the right choice.

All i need to know is which decent game engine (not graphics engine) with a free version available has the biggest usable world size limit?

I know that because of some floating point inaccuracy thing, once you get out of a certain distance, things begin to shake and become unstable. I have
experienced this before myself.

So yeah, which of the engines out there has the biggest world size that can be used without problems arising and do you know how big in kilometers or meters it is?

#### 2 Replies

0
145 Jan 29, 2012 at 10:31

You don’t worry about that, any engine will do.

What you do is use your own coordinate system.

I use a 64 bit integer for each coordinate, then when you actually want to display something you call a method on the coordinate class which returns a 3d vector or null. In this method you subtract the camera’s location from the object’s location and check if the result fit’s in a 32 bit float. If not, return null.

If it is null, then the object you are trying to render is beyond visible range.

Using this system you can map more space than you could explore in a lifetime on any engine, and if that isn’t enough for you, swap to 128 bit int’s

There is a freeware space exploration thing out there that uses this system, can’t remember the name of it at the moment, someone here will though.

0
101 Jan 31, 2012 at 10:03

Well, just make sure that your engine supports 64-bit floats (doubles). Remember, a lot of the newer CPU’s floating processing instructions actually operates with 64 bits, even on 32 bit floats, so the performance difference would be very small. But! If the engine are using SIMD instructions for math, there might be som eperformance penalties when operating with 64 bit floats, as a Vector4 (4 x 64 bit) won’t fit into a 128 bit register anymore, which is the case with SSE as far as i know. A good approach would be to make your own custom coordinate type with an x and y integer for section coordinate and x and y for local coordinates. Another good approach for space games are by using a Octree for seperating sections of the world to smaller pieces, making it easier to handle by the engine.