Render OSM data into game in real time

I am really new to coding so please forgive me if I don’t really understand something at first.

  1. What do you want to achieve? Use OSM database with overpass-API to load and render buildings, roads, rivers, and other data into the game in real time, as the player moves in-game, it renders buildings and stuff based on the player’s location. I wanted to achieve this without having to set up any data transfer server or database outside of Roblox studio.

  2. What is the issue? Haven’t found a clear and working way of doing it.

  3. What solutions have you tried so far? I found a way that could work on GitHub, but need some fixes which I don’t know how to do. The script is below.

local httpService = game:GetService("HttpService")

local opapi = {
	overpassUrl = "https://overpass-api.de/api/interpreter",

	query = function(code)
		local requestUrl = "https://overpass-api.de/api/interpreter?data=[out:json];"..code
		print(requestUrl)
		local request = {Url = requestUrl, Method = "GET"}
		local response = httpService:RequestAsync(request)
		return response.Body
	end,
}

return opapi

so how do I turn this data into rendered parts in-game?

2 Likes