What is taking so long

Development Blog - Yevheniy

##### January 25, 2021

Instead of posting a long boring list of things we’re working on, I decided to make a little case study of a new building coming in the next update to show what kind of work is being put into each building in Ostriv. I hope it’ll give a much better perspective and will be much more interesting to read through.

If I take a look at the Trello card called “building\_saltworks” I can learn a lot about its history. It was created on 17th of August, 2020. So this was the day we started researching the historical data and exchanging ideas.

There’s a thin line between how far you can go in historical accuracy direction and general playability. We’re trying to keep it both interesting to play and mildly educational on how the industry worked before the industrial revolution.

We iterate on different designs until we find the one that fits all the requirements: has all needed functional elements, looks unique, fits the style, has easily readable and recognizable structure, and of course is just pleasant to look at.

As much as we strive for details, some of them can’t be put in a game as they are. You can see a highly-detailed model on the left which we had to render as a texture with transparent parts on the right. We experimented with different versions to get the look we need.

From the feedback I can see one of the most admired parts of this game is construction animation. Having buildings assembled by distinct parts feels refreshing after being used to them just popping out into existence.

Once we have the saltworks building model completed, we start on the separate model which has all the construction parts specified.

As you can see the saltworks building has 556 separate parts, all of which were modeled by hand, are ordered respective to their construction order and have material specified. Some parts are marked as milestones to avoid some unrealistic situations like roof parts hovering in air before the walls have been built. You can see the milestones in the construction’s properties:

In game, when construction workers get to the site, they get a task to build a specific part based on the order and material availability. They would take a resource from stack and build a new detail, repeat until their workday is over. Sometimes some parts may look weird during construction and we need to reorder the parts, change resource types, milestones and so on, until our workday is over. Thankfully there’s enough benches around and we can get back to work later in full strength.

In grid-based games the building footprint is specified simply as two integer numbers: width and length that they take on a grid. From navigation perspective this just means those tiles are no-walk zones.

In Ostriv it is much more complicated: there is no grid and the buildings are freely rotated. Citizens can walk anywhere with no regards to grid tiles.

To avoid overlapping buildings with each other each one of them has specified which land it occupies exclusively (the yellow part) and the empty space which they can share with other buildings (the green one). Of course it could be much more simple, it could even be generated automatically based on model geometry. But that would take away from Ostriv its unique handcrafted feel as well as the ability to put a nice little bench right there in a free strip of space near the entrance.

For navigation purposes each building is supplied with a set of “nodes” and “walls” which will become a part of the global navigation graph connecting all the buildings in a town. So keeping it as simple as possible while functional enough is essential to late game pathfinding performance.

There are also nodes for specific purposes like wagon parking or storage points for resources. This time we finally made special nodes specifiable in editor rather than built-in to the program code. The future mod-makers should approve of this.

To make sure citizens will not clip through buildings when entering them we specify in the editor the floor geometry, which is also stored in the model. As we have dynamic doors in Ostriv, they need to be added in editor as separate objects.

In most city building games there’s usually no actual difference between various production buildings. There’s a visual model, inputs and outputs. This concept has a great advantage of scalability: once you made it work you can add new buildings with close to zero effort. With modding implemented this just becomes an endless source of new content. That’s the easy way, which obviously means it’s not our way.

Back when I was working on the game alone I had varying amount of attention to the detail. When I was rushing towards the Alpha 1 release in 2017, I’ve added a bunch of soulless buildings like Tailor’s and Weaver’s workshop in a hurry. All they do is stand there and produce one resource from another. The windmill on the other hand is a building I made one of the first and it is probably one of the most detailed and nuanced windmills in video game history. I want Ostriv to have more buildings like that windmill.

The saltworks building has an animal-powered machine for pumping brine from underground deposits. You can use draft horses or oxen to turn the wheel. We’ve chosen the building design in which you can see the animals inside pushing on that samsara wheel in the name of the betterment of civilization until the brine storage is full. Then the human worker should fire up the oven with firewood or charcoal (depending on your choice) to evaporate the water and get another batch of dry salt ready to be used by the town. The oven consumes fuel, the animals consume food and water and die occasionally from the lack of it. Just as always, you can relocate animals or even call a slaughterhouse guy to put them to the final rest. The whole process is powered by some 26KB of new code (I always choose the shortest variable names possible) written intermittently in the course of the last 5 months.

On January, 12 I moved the “building\_saltworks” card to the “DONE” section but the room for improvement is still there. If back in August I were to give an estimate on how much time making this new building would take, I wouldn’t be even close to accurate. I also didn’t know that writing this post would take my whole day. That’s why I’m not giving any estimates on Alpha 4 release date.

Now back to turning that wheel so the folks can finally grow their own food and send their kids to school.

Stay healthy and kind!

Yevhen.