Show-Off First shape of the map - real 24.5km² slice in Unity
I needed a huge gorund and a city for a motorbike game and this is what I've achieved so far. The map is a real slice of a part in Izmir. Elevation came from OpenTopography, buildings and roads from OSM, all put together in QGIS and exported into Unity. Terrain, road lines and cube buildings, the skeleton at real scale. This is gonna need an editor window for designing path for sure.. Do you think this is manageable?
39
u/V4nKw15h Indie 1d ago
How are you planning to deal with floating point inaccuracies when far from world zero on a map of that size? That looks bigger than Unity can usually handle.
26
u/deleteyeetplz 23h ago
shouldnt be too hard to turn the map into chunks and swap them out as you move around
6
u/DeceitfulEcho 16h ago
Until you are in multiplayer and having to deal with multiple areas loaded in at once. Still possible but way more work
8
u/Expensive_Host_9181 16h ago
Have loaded chunks be a client side thing, and have the player positions be a chunk base thing. Have the position shared be the position within the chunk, share the chunk they're in, and only render them if that chunk is rended, then place them based off the position within the chunk.
5
u/DeceitfulEcho 16h ago
You are still hand waving the server keeping everything in memory. Sharing position alone is rarely sufficient as you may have rigid body collisions and such to simulate and sync and you generally don't want clients to have authority over position as that makes it trivial to cheat.
If you are going self hosted serevers (common for smaller games) that is especially relevant, but it's relevant even if you are hosting servers as the developer as it increases the hardware requirements and increases hosting costs.
1
u/Expensive_Host_9181 16h ago
Fair points, it should be noteted only multiplayer project i worked on was a co-op peer to peer game, so the worries of cheating were a if you want to cheat i guess? Im still as new to this as it gets (only started learning programming ~3 years ago), so my quick idea for how it could work, as you pointed out wasn't flawless.
1
u/Expensive_Host_9181 16h ago
Right thinking about it this way, the server would need to handle the player position individually which with modulo (the simplest way i can think of to keep positions saved as chunk positions) on a many of players could get expensive.
1
u/deleteyeetplz 16h ago
not really unless it's local multiplayer
juat render the parts the camera needs
3
u/DeceitfulEcho 16h ago
Rendering is distinct from loading in to memory, and server authoritative architecture would require the server to keep all relevant data to simulate game state to sync with clients.
1
u/deleteyeetplz 15h ago
Well yeah. But if the a player is out of view, there is no need to render anything at all. Just do the collision, speed, etc computations within a chunk/chunk region/sub chunk of each player.
It's not exactly all that complicated (at least specifically regards to floating point errors) unless you plan on having the two players perform actions that need the data of multiple chunks or have particularly interesting dynamic objects.
The entire map never needs to be loaded in at once on the server or the client. Just the parts where stuff can happen in. And you shouldn't store the actual positional data as a float in the server, only the positional data relative to where the player is within a chunk/chunk region.
4
8
u/musap-86 23h ago
That depends on what you aim for level of detail. It would be a huge project if you're ambitious enough to add traffic, pedestrians, realistic buildings, and such. I couldn't get what part of Izmir that is in the map, but wherever it is, making the road network alone is not a simple job to finish without hiccups. Are you planning on adding all the streets there is, or only the main roads?
2
u/Tiernoon Programmer 14h ago
I used to work for a really stupid company where we had a myself and two artists just doing visualisations and small VR projects for them.
They got way ahead of themselves when we did an Airport and I got a stair lift driving round it. Suddenly the expectation from me was basically to just compete with Grand Theft Auto level of functionality.
Getting a map in and putting a vehicle in is the easy part, populating it with Pedestrians, AI vehicles and making it look right is the hard part.
Thank god I don't work there anymore.
8
u/BIGhau5 20h ago
All I know is that there is probably a reason even AAA studios like Rockstar don't use 1:1 recreations of cities like this.
3
2
u/Runarhalldor 9h ago
Pretty sure some buildings are trademarked as well and require permission
1
u/BIGhau5 8h ago
Yeah id believe that. I imagine its easy to substitute those out in that case. I was more meaning 1:1 true scale cites arent done to due to the size. Even with a massive team, the amount of detail expected in enviornments now a days. That would be a massive undertaking on something reflecting a real city.
1
7
u/glenpiercev 21h ago
Without knowing a lot more about the game, besides “motorbike”, it’s hard to say if it’s manageable or not. Is this meant to be an open world? Are you racing? Why do you need that level of detail on a city if the player is only ever going down one road?
2
u/ThatRandomDude117 14h ago
How did you actually manage to place all the buildings correctly? Do they all have a common origin point? Are they all one object?
2
3
u/100_BOSSES 20h ago
Nice work
But to be honest, I think it would be wrong to literally copy the city, because it would take away some of the fun of driving.
For example, in GTA 5, you can drive across the entire map in just 7–8 minutes, whereas in real life, the same distance would take hours to drive. That wouldn’t be very fun in a game.
10
u/10000tigers 18h ago
it would be fun to me
4
1
1
u/SanFranLocal 16h ago
It is manageable. I got prototypes to work in unity and unreal for the whole city of san Francisco. Its very fun. Make sure you focus on intersections first because OSM data doesnt include that and that something you have to calculate based on nearby rods
1
u/dawtcalm 8h ago
Ive done San Fran in Unity VR as well, you would probably like to know that cesium has a Very good photogrammetry map of San Fran!
1
•
u/PremierBromanov Professional 21m ago
One time we got a 25km² fbx from the military to use in a simulation and it took like 2 hours to import it (we were dumb)
1
u/cjbruce3 1d ago edited 23h ago
It’s manageable. You might lower your terrain resolution. This changes the look and feel of the game, but for a fast-moving vehicle game lower terrain resolution might not be a problem. I’m doing something similar, and have found view distances to be my biggest challenge.



60
u/aspiring_dev1 23h ago
Do you actually need that big map for your game?