Hello World
Greetings dear reader, my name is Martin, I’m doing the programming for our game Sea Power and want to take the opportunity to start a dev diary here to keep you guys informed about what we’re currently working on. And yeah, that’s why there is this “hello world” reference. 😉 Some of the stuff I’m going to post is pretty technical, but I hope it’s not too boring to read.
As this is the first entry it might be a good idea to first introduce ourself and tell a bit about what we’ve done so far.
We’re a team of 3 guys from Sweden, Poland and Germany: Nils is our lead designer and was responsible for the well known game Cold Waters. He’s been into 3d graphics and game development for almost his entire life. Przemek worked on Atlantic Fleet and Cold Waters as well and is creating awesome 2d and 3d artwork for it. And then there’s me, Martin, who’s putting together all that stuff with some gluing code.
Ok, so going back in time… Around the beginning of 2019 we started to work on Sea Power using Unity as our development tool. Our first goal was to create some realistic terrain without the need to handcraft every single place on earth. Luckily there is free available radar height data as well as underwater landscape data available. So the first steps were to create an engine that uses this data to create the terrain. As in modern combat the areas can become pretty large it was clear that it wouldn’t make sense to have the entire area in memory all the time so I started to implement it as a streaming terrain engine which finally allows to visit every single place on earth and create the terrain meshes in the background on the fly procedurally.
Terrain Creation
First comes the raw height data. We’re using GTOPO30 data which has a resolution of 30 arc seconds. This leads to a longitudinal and latitudinal resolution of about 1km per grid point. As this is pretty low res, I add 4 more grid points for every data point from the original data which leads to this result:
As you can see this needs some work to remove the steps. In the next step bilinear interpolation is applied:
Ok, smooth now, steps are gone but beside having more vertices we gained little compared to the original resolution. That’s why in the last step some Perlin noise is applied which let the height mesh look more natural:
That’s the more technical mesh creation part, where terrain chunks in a size of about 50x50km are created around the players location. As this looks rather boring we now need some texturing to make it look like a landscape. As our engine supports different biomes we do a lookup in a biomes texture now where every pixel equals to one terrain chunk. The pixel color defines the biome texture set to use, seasons are in as well:
After all this looks much better already. It still misses vegetation which is created in the next step. The vegetation is set based on slope and height of the terrain plus uses a distribution texture:
So that’s it. In the next step there will be objects placed like ports, towns and so on, but more on that later!
Summary
Here’s an overview how all stages work, even with some intermediate you’ll never see in game (e.g. lower left):
And finally some shot from about 20kft. This is a part of Japan:
Hope you liked to get some insight into our development. I’m going to show more things we’re working on. Stay tuned!
– Martin