Roman Shuvalov is a Togliatti-based indie game developer who released Generation Streets earlier this year, based on OpenStreetMap data. Not so long ago he opened part of the code of his project. Why did he do it, how did the game appear and why the choice fell on OSM - Roman told about all this in an interview.
- How and when did you hear about the OpenStreetMap project?
- It happened about 5 years ago - in 2014-2015, when I was looking for solutions that would allow users to create maps for their own needs. At that time, I already had a small web project - a map of roads and paths of the Togliatti forest. It was made on the Yandex.Maps service, on top of the standard background of which a vector layer with the objects I needed was superimposed. By the way, this layer was made on the basis of GPS tracks recorded by me and the members of our cycling club. It was a bit like a Strava heatmap. At some point, I realized that I wanted something more and began to think about how to upgrade my card.
As a result, I learned about OpenStreetMap. When I first saw it, I was very surprised: I was struck by the incredible openness and flexibility of the project. I could not only freely use its initial data, but also take part in drawing the map, which was quite important for me.
Gradually, using the GPS tracks I have, I have drawn the Togliatti forest and the associated infrastructure in OSM . After I made my own render, it can be seen on the Bicycle map of the Samara region... Its peculiarity lies in the fact that even at small scales (starting from 10) paths and other objects that can be useful to a cyclist are displayed. While on standard renders on the 10th and even 12th scale, the map has a rather low level of detail, which is especially noticeable when trying to build a cycling route through fields and forests.
Bicycle map of the Samara region. Small trails and settlements are visible even on a large scale.
- Why did you end up staying in the project? After all, they could draw only the paths you need and that's it.
- Drawing a map in OSM is a dangerous activity, as it is incredibly addictive, then it is difficult to stop. How does it usually happen? I marked the path, but saw that there was a building nearby, but it was not on the map. Added. Then I realized that there must still be a sidewalk, and a road behind it ... and so on. You are driven by the feeling of beauty: you want everything to be beautiful, and not only in the place where you live, but everywhere. That's why I stayed in the project. True, now I don't draw as much as I used to, but I still slowly continue to make OSM more accurate. Basically, I correct minor inaccuracies or update the map - I add new objects that gradually appear in the location of interest to me.
- Why are you interested in cartography? It's still a rather unusual hobby.
- Probably, this comes from an inner desire to know what is around you, and much further than your eyes can see. And I always had this feeling. I remember that already in high school I experimented with GIS, for example, I wrote an application in Delphi (at that time I could only program in it) that built a three-dimensional map of the Samara region. Moreover, at that time there were no open data sets, or I simply did not know anything about them, and therefore I took the elevation data from a regular paper atlas. I scanned it and built a 3D model using some plugin. So I have had an interest in cartography, or rather in visualization of the surrounding world, for a long time.
- Let's talk about your 3D game, Generation Streets, which is based on OSM data. How was she born?
- I will note right away that I have been developing games since 2010. As for this particular game, a few years ago, quite by accident, the idea came to me - to make a three-dimensional render of an OSM map. And the whole planet at once. I looked at already existing similar projects ( F4map , OSM Buildings ), but, unfortunately, none of them satisfied me - they are too schematic. I wanted a more realistic render: with textures, visual debris in the form of trees, lanterns, etc. In a word, with that nonsense that we usually do not notice, but without which the world does not look alive.
- And how did you start developing?
- From the search for a method for mass data processing, since I wanted to make the entire planet at once. It took me a lot of time. At first I tried to do this through a database based on osm2vectortiles . But it didn't work because I had a weak computer.
In the end, I settled on two small programs: Osmconvert and Osmfilter . For their work, raising the database is not required. They take OSM data in PBF format and allow you to cut the desired pieces through command line parameters. Thus, I got the opportunity to cut the entire planet into tiles without unnecessary problems.
But I immediately ran into the following: the PBF format is not entirely convenient for generating three-dimensional rendering, and therefore it was necessary to convert it into a format suitable for this. To do this, I had to write several auxiliary utilities, the source code of which I have already laid out under a free license on GitHub. They are partly based on the ogr2ogr library .
As a result, I managed to create my own vector tile format, which, I think, is very convenient for reading inside the renderer and generating three-dimensional models. In addition, it allows you to combine tiles into large archives, which simplifies their storage. Thanks to this feature, I don't have billions of files, but only a few hundred.
- Why did you decide to come up with your own format? I assume that there are already ready-made solutions.
- Yes, you're right: ready-made formats already exist, including vector ones, for example, from Mapbox, but the point is that they are focused on a flat - two-dimensional - image. And they have one unpleasant feature: if a building hits the junction of tiles, then it is cut. For me, this was absolutely unacceptable, since in order for me to later be able to make a 3D model of the building, it had to be whole. There was no ready-made solution to this problem. I think that just no one has come across this before. So I decided to do something of my own.
- Could you share your statistics on the game? What are the reviews?
- Since publicationgames on Steam (early access - October 2018, "full" release - February 2020) it was downloaded by about 3 thousand people. For this type of game, indie is pretty good. It is also important to consider the following point: the game has poor gameplay. And I immediately realized that within the framework of this project I would never be able to make it more fun. Therefore, he is what he is.
The main interest in this game is that the user has the opportunity to download an interesting territory for him on planet Earth and fly there. Most games don't have this option. For example, those who live in New York regularly rejoice that another game has come out in which this city has been recreated in sufficient detail. And those who live in Togliatti are unlikely to ever wait for the game created in the locations of their city. That's exactly what I was betting on.
But since many, in addition to the ability to download their own city, also expected a carefully designed gameplay, I received several negative reviews on this part. They are well deserved. I was initially ready for this, since my game is not about gameplay, no matter how strange it may sound, but about data visualization and the ability to fly anywhere in the world.
- Your game uses OSM data. Is it possible to edit it through it?
- Initially, I wanted to embed the OSM editor, but after a little experiment I decided not to. For a while, users had the opportunity to make edits. These edits did not go directly to OSM, they "settled" in the local database. It turned out that the players are far from the OSM world, and therefore they reacted very irresponsibly to the map. Now I'm thinking about disabling even this experimental editor, and sending everyone who wants to go to JOSM.
- As far as I understand, you opened the code for your game and posted it under an open license. Why did you do this? Was this decision difficult to make?
- I didn't open the whole game, but only the code responsible for generating 3D models. Firstly, I did it in order to share my work with the community, as I felt a certain debt to it, because I myself used open source, written by other programmers. Secondly, most likely, I will no longer make serious changes to this product, but at the same time I assume that it may be of interest to someone and even someone will undertake to develop it. Third, I want my code to be used and to help people solve their problems. You look, there will be more projects related to 3D rendering, and maybe they will include my hometown of Togliatti.
- What do you like about OSM?
- I like the open license and the ability to get data, not just ready-made tiles. For example, I made a video game. No other map service would allow me to do this so easily. At a minimum, you would have to contact the developers and ask for the initial data. And I'm not sure the industry giants would have met me halfway. Immediately I took and downloaded the entire planet and did everything that I needed with it.
I also like that anyone can take part in the project and make the map more accurate. JOSM editornot so difficult. And at the same time, you do not need to wait until your edits are accepted or approved - as soon as you send them, they are immediately in the main database, which means that you can immediately use them for your needs. For example, update the map in your navigator.
- What's not to like?
- Abundance and unsystematic tags. This is not always good. In addition, it's time to come up with something with offsets. Sometimes you open a city and realize that a person painted it without taking into account this nuance. And you don't know what to do: transfer everything or continue drawing in the wrong offset? Of course, I understand that the world is imperfect, you have to step over some problems. Generally speaking, OSM has more advantages than disadvantages.
- What would be done better?
- I would like to see a good web editor. Yes, there is already an iD , but it is geared towards newbies. I want something more comfortable. Also, it seems to me that it would be much better if the objects inside the OSM were somehow related to each other. Now if any changes are made to the shape of the building or the position of the road that passes nearby changes, this change does not affect the neighboring objects in any way. Even if after the change, for example, the road began to pass over the top of the house. I donβt know how exactly such an interaction can be implemented, but I would like information about dependencies to be available. Then, for example, public transport routes would not break if the road was edited. I suppose this will make OSM data even more convenient for editing and their further use.
- Do you use OSM in your personal life? For work? Except for the game.
- In daily life, using mobile navigators OruxMaps and maps.me . Both are offline, that is, they allow you to work with the map without the Internet, their maps are based on OSM. What I like about OruxMaps is that it also allows you to use your own maps in vector mapsforge format .
- What advice do you have for beginners? Or those who are just thinking: to get involved with the project or not.
- If you are using any mobile navigator that is based on OSM, consider starting to make the map that you are using, by the way, even more accurately. After all, many simply do not know that the map can be edited, moreover, directly from the phone.
For those who are already familiar with OSM and even charting a little, the first and main tip is to read WikiOSM before editing the map . Almost everything is there. This will save you a lot of mistakes, and will also allow you to adopt the culture of mapping and become more aware of your responsibility to those who will then use the map you are editing. Never forget that OSM data is used in a huge number of projects, and therefore always try to maintain a high level of quality of the data entered.
- What will you say at the end of the conversation?
- As loud as it sounds, at the moment OSM is the only open and free cartographic project in the world. It is an independent alternative to commercial mapping services. That is why you need to take part in it and develop it in every possible way. After all, if OpenStreetMap ceases to exist, we will all be forced to use commercial maps on the terms that someone will impose on us. And you can forget about the free use of geodata.
The Russian participants of OpenStreetMap communicate in the Telegram chat and on the forum .
There are also groups on the social networks VKontakte , Facebook , but they mainly publish news.
β Join OSM!
Previous interviews: