Automatic generation of open-world using real-world map data
Automatic generation of open-world using real-world map data
Joggle, currently under development by our company, is the world's first fitness RPG where players move their character by jogging in place in front of their smartphone.
In this game, real-world map data is utilized as the terrain for the open-world, and the ups and downs of the terrain such as mountains and seas are all based on real-world map data. What technology supports this?
DEM (Digital Elevation Model)
Information about the topography of the Earth's surface is generally referred to as DEM (Digital Elevation Model). It is data that divides the Earth's surface into regularly spaced squares, with each square having an elevation value at its center point.
As an example, we have attached a DEM of the area around Mount Fuji. The black dot represents the summit of Mount Fuji. You can see the detailed terrain features that are not typically shown on a regular map.
DEM images around Mount Fuji
Joggle's terrain generation uses DEM (digital elevation model). It retrieves the surrounding DEM data based on the player's coordinate information and instantly generates a 3D model from it.
DEM is available from many map-making agencies, either for free or for a fee, and free DEMs covering the entire world can be obtained from multiple sources.
Paid DEMs boast higher resolution and quality than the free DEMs mentioned above, but they are usually very expensive. For game usage, a free or inexpensive DEM should suffice.
By the way, free DEMs exist not only for Earth but also for Mars. Perhaps one day Joggle's Mars version can be developed.
Perlin Noise
However, if you try to use the terrain of the real world in games as is, it tends to become boring. In places like the Kanto Plain, which are endlessly flat, there will be a monotonous terrain without any undulations. Therefore, in Joggle, we overcame monotony by adding a little noise to the undulations of the real world.
In game development, a technique called Perlin noise is often used in such cases. Perlin noise is an algorithm that can easily obtain random and natural noise that continues endlessly with simple calculations.
By mixing fine Perlin noise into the undulations of the real terrain obtained from the DEM, we always provide players with stimulating terrain.
Example of Perlin Noise
A terrain with fine undulations created by using Perlin noise
An example of terrain with Perlin noise removed
Automatic Generation of Plants
Even though the game employs a 1/10 scale of the Earth, it is not practical to manually plant billions of trees one by one in such a vast open world. Trees and rocks are also generated automatically by algorithms.
However, if these objects were arranged completely randomly, the landscape would look very artificial.
In reality, the growth of plants is not uniform, and it is normal for there to be areas with dense vegetation and areas with sparse vegetation that are repeated in moderation.
Here again, Perlin noise can be used. By densely planting vegetation where the noise appears white and not planting any where it appears black, the resulting landscape is much more natural than with complete randomness. Of course, it's not that simple, but this is the basic idea.
By the way, the vast maps of the popular game Minecraft are also generated by Perlin noise. Information such as the elevation of each block in the world, the type of area called a "biome," the distribution of ores, and the location of specific structures such as villages are all generated from noise.
Plants placed at natural densities using Perlin noise
Example of plants placed completely randomly
"Joggle" - Download the Fitness App Here
Joggle is a new jogging experience that allows you to exercise and have fun using only your smartphone. By controlling a character that runs through a 3D space based on your speed and the orientation of your face, you can explore an open-world metaverse. It is recommended for people who are not good at exercising, as it is an easy way to start a healthy lifestyle with on-the-spot jogging.
Leave your Unity development using map data to Vitalify Asia!!
At Vitalify Asia, we develop cutting-edge apps using advanced technology in Unity every day. We specialize in game development, AR/VR app development, 2D illustration creation, and 3D modeling. In addition to the above, we can develop applications in a wide range of fields, so please feel free to contact us.
We are a software development company based in Vietnam.
We offer DevOps development remotely to support the growth of your business.
If there is anything we can help with, please feel free to consult us.