Planet Nomads, like many other sandbox games nowadays, uses procedural graphics to create the world around you. The world consists of voxels; small, mathematically defined pieces to the puzzle. This way an indefinite number of planets can be created.
Actually you will be creating them. You will decide the general structure of each planet – will there be high mountains or just a nice hilly neighborhood? Forests? Valleys? How dense? What’s the climate going to be like? All these variables are the result of your input. You can either create them randomly or set individual variables in more detail. And if you happen to create a masterpiece of a planet, you can share it with your friends and the community with the use of your world’s unique id (seed).
To illustrate how this works, have a look at the mountain in the back. It is generated by the numbers in the front.
CODING OUR OWN TERRAIN GENERATOR
The art of having believable, good-looking generated environments is in fine-tuning the terrain generators and only allowing combinations that make sense.
We wanted to use a 3rd party terrain engine for Planet Nomads at first, but the performance was not on par with what we need. So we decided to create our own terrain engine in the end. Writing it in C++, which turns out to be up to 50% faster in some instances.
It will take us longer to create an engine of our own, but it will be worth it. We want to make sure nothing comes back to bite us later when we add more objects to our worlds. That when you build and ride your ultra-fast flyers and vehicles, Planet Nomads will still be able to handle that.
FIRST STEP: DYNAMIC LODING
As you may know, game graphics consist of thousands of triangles called polygons – more polygons mean better looking graphics, but also more demand on the hardware; if you go over the top with polygons it will ultimately affect performance and bring the FPS down. So how to get most of your polygons?
Objects close to the player should have as many polygons as possible to look life-like, whereas distant objects can go with less and still look OK. (Imagine a fiery red racing car getting away from you – eventually it will become but a blur.) In games this is simulated by LoD – level of detail. More polygons close by and on significant objects, less polygons in the distance. In 3 weeks we got it running nice and smoothly in real time. (A feature called dynamic LODing.)
If this makes little sense, have a look at the picture below. More details close by, less in the distance.
NEXT STEPS
Our terrain engine works, but there's much to improve. Although we solved the initial hiccups that presented themselves (see more in our Twitter post), we still need to work on advanced terrain and object generators, which will allow for more complex and visually pleasing terrains (similar to those you saw in our previous news item, and eventually better).
EYE-CANDY BONUS
A massive miner created in the game gently residing beneath alien trees.
Demonstrating the possibilities: The War Rig from Mad Max Fury Road (great movie, we definitely recommend watching it).
looks really nice but is the terrain actually done with voxels so are p.e. caves possible? the vehicles look absolutely cool though, mad max was a blast