How to make a huge map and no floating problem

Please forgive my poor English grammar.

I’m try to build a very huge Railway simulator, since I wanted to simulate reality as much as possible, I converted real-world distances to studs using mm/256, which resulted in the map radius now being at least over 20k+, and floating-point issues occurring once it exceeded 10k studs. However, half of the map is still not included in the game.

I’d like to ask if there is any way to improve my current situation? Thank you.

1 Like

Chunk generation is the only viable approach that I found if you want realistic scale. Keep the player near the center (0,0,0) and move the world instead of the player. That means:

Divide the map into chunks (tiles of track, scenery).

Only stream in nearby chunks. Unload distant ones.

Continuously re-center the player to avoid going too far from origin.

3 Likes

This would only work in a singleplayer game, right?

No. Chunk generation with recentering works in multiplayer too, but you must design it carefully.

2 Likes

Also the re-centering part tho?

Re-centering = shift the world so the player never strays far away from (0,0,0).

Mechanic:

  • Player walks forward. Instead of letting their position climb to 50 000 studs, you translate the surrounding chunks backwards so the player’s position stays near origin.
  • To the player it looks like they are moving forward forever.
  • Under the hood they are always within a safe precision zone.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.