Max world size without using physics (for a multiplayer game)?

Hello!

I am curious about how big the world (map) can be if you wouldn’t be using physics at all? I am testing out some 4x spacegame idea I have and I’m curious about this.
With physics the max map-size for multiplayer is 10km in each direction, this I know, but how large can the world be without using physics at all?

Looking forward to hear your thoughts on this. :slight_smile:

Cheers!

It’s not just physics, at a certain point the intervals between position values is too high and you can’t have smooth movement

Hmm for a 4x spacegame that wouldn’t be such a problem, because the units would be so small and I would fake the movement with a repeated position update.

You can simply see losing float precision with std::nextafter function.



1'000 => 1'001 : 16384 values
10'000 => 10'001: 1024
50'000 => 50'001: 256
100'000 => 100'001: 128
500'000 => 500'001: 32
1'000'000 => 1'000'001: 16


Could you explain this, I don’t really understand the concept of losing float precision.

Why not just shift world origin to the area of interest - the user can’t see what’s moving in a galaxy far, far away… May be quite applicable depending on how your 4x is supposed to work.

A floating point number loses accuracy as a number increase in size. The simplest way to think of it is imagine you only had 4 digits to write a number, but you could add a decimal anywhere. You could write from .0001 to 1000, but each time you move the decimal point back, you lose that level of precision.

Single point precision goes up to 2,147,483,647 and the data is stored in 32 bits.

With 3D, models, movement, physics, pretty much everything, gets weird once you lose too much accuracy.

Oh it’s costly, very much so. I only use it during zone transition with a static screen - masked as a *you’ve arrived safely menu. *It’s for a galaxy map and the origin shifts when you reach a cluster of stars which you can then explore freely with tracing not suffering from jittery floating point errors.

Never used it in MP, can’t comment on that, sorry. Chipped in because of float errors.