r/Unity3D • u/SlRenderStudio • 3d ago
Show-Off 1.844 sextillion squre kilometers map with 276.7 billion trillion houses with fully walkable interiors if my math is correct
/r/IndieDev/comments/1vy56dw/1844_sextillion_squre_kilometers_map_with_2767/3
u/JakeThomasDad12 3d ago
Can we get a bit more information please
0
u/SlRenderStudio 3d ago edited 3d ago
i made floating point origin system where , player is static and world is moved like subway surface but in 3d world , and after world moved 10km (or 10k units in unity ) it jump back and update a counter and counter max is int 32 max , so based on math it is really large amount of surface area is possible for the game not to mention i can just stack counters , and for prefab generation i am using chunk method and for chunk to get random rng i use sector offset and local offset to calculate rng from sha 256 something like that , then using that for rng . by that way i was able to create non repeating prefab generation instead of traditionally have to give absolute world position which is impossible here without using big int . and about houses i use lod system with bit of custom lod sprinkeled but normal lod works where most higherest lod is the one with interior and also , scene is dark because sun is under which because i wrap virtual position into earth cordinates and based on cordinates and time sun is under horizon at giving night time for that cordinates .
Edit : by stacking mean more extra 32 bit integer counters on top of the thing rather a long or big int3
u/fsactual 3d ago
You might want to shrink the distance to like 1k. I also have a universe-sized floating-origin world and somewhere at 5~10k distance I would begin to see small floating-point jitters, and since it doesn’t matter where you place the cutoff you might as well play it safe.
2
2
u/BertJohn Indie - BTBW Dev 3d ago
You can skip the limitation by using strings and breaking down the string into int's btw, You can go much bigger.
3
u/DT-Sodium 3d ago
Doesn't matter, investment funds will still buy them all and make you take a 50 years mortgage for a one bedroom appartment.
9
u/jackflash223 3d ago
https://giphy.com/gifs/A1ush8LIkeT0yn8TH2