I'm creating a 2D realistic RTS (Real time strategy game) and I wanted to be able to use real locations as the scenarios for the games.

The game will be developed via unreal engine which uses c++. The idea is for the engine to read an file and convert into a grid where each square has type of terrain associated, like in this image of a scenario editor.

enter image description here

It would be preferable if the information was free.

The problem I'm facing is obtaining the information about the different features that influence units or line-of-sight. More specifically I would like to know the information about bodies of water present, roads, elevation (for this i'm thinking of using the google API), forests, etc in a map

I'm just asking for a pointer to an information source. Where can I download or obtain a GML or similar with this geographic information?

  • The line of sight problem is quite interesting. Feel free to contact me (info in profile) if you find a way to do this or want some tips on what I've found so far.
    – user3856
    Dec 10, 2016 at 16:58

1 Answer 1


Open Street Map: https://www.openstreetmap.org should have everything you need, it's pretty much an open source version of google maps. It allows you to easily export any part of the world map to an .osm xml file.

For converting from their OSM files to GML, have a look at this wiki page: https://wiki.openstreetmap.org/wiki/GML

  • I downloaded a section of the map and successfully converted into GML, using the ogr2ogr tool. However, I cannot fathom how to create a parser for the information contained in it.. Any sugestions? Dec 18, 2016 at 21:23
  • I don't have much experience (yet) with parsing these files. I myself use the .osm file and parse it in python with BeautifulSoup which works but isn't ideal. As GML is also a kind of XML, BeautifulSoup should also be able to handle it. For c++, I guess any XML-parses should help you along. As for mapping the shapes to a 2d pixel array, there's probably a package for that. At this point stackoverflow can help you more.
    – Swier
    Dec 19, 2016 at 10:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.