Real World Cities to Roblox through JSON

So I got bored today and figured id do something cool with the Roblox engine that it wasn’t really meant for. Openstreetmaps will let you export a section of a map to an OSM file which in reality is in XML format. I took the XML and translated it to JSON and then changed the JSON formatting a bit so it worked as a LUA table, this LUA table is huge. The table contains “nodes”, and “ways”. Each node defines a point on the map, and then the “way” has a table within it defining which nodes are inside that “way”. So basically you come up with something like this:

From openstreetmaps of my university:


Nodes:

Ways connecting the nodes, along with color coordination:

Each of the ways has alot of information about that section inside it, it tells you if its a road, or a building, or a river, and its name, along with that if its a road it even has a place for speed limits. All of this information is inside the JSON, for this set above the JSON was about 27,000 lines long. I tried to do an entire city and the file was just way too big to handle, but I might figure out a solution. This can technically be used anywhere in the world and then direct import it into Roblox, pretty cool!

-Widgeon

19 Likes

This seems like one of those things that could be done if you optimized the hell out of the data to compress it. Maybe remove a few decimals, etc…

I’d love to see bigger and better.

1 Like

One of the devs here is going to make a massive adventure game with these really detailed city streets, all auto-generated using a system like this.

Super l8, but you could write a quick binary serializer depending on the complexity of your data. Might be slow to parse back in Lua.

Back when the “Make a place from real life in ROBLOX” event was running, I tried using Google’s APIs and other web APIs to grab elevation and world map data. Then I tried generating the world using smooth terrain.

Wellllll - it went… fine? But hell, millions and billions of data. It’s one heck to just get even one bit of the world to ROBLOX. Seems promising :smiley: Definitely something that gives unlimited possibilities (but then again, No Man’s Sky is also with a - well, unlimited amount of content to explore. I’m just of the opinion that the variation of gameplay can prove lacking with such vast amounts of exploration).

1 Like

You can try this out: City Loader - Render Real Life Roads/Buildings - Roblox

Not mine but basically the same thing

1 Like

Is there a way to just render in roads?

Yes, but you will have to find which part of the code does that, I’m not familiar with that system.