Devlog ·

Behind the Scenes of Hotfix 3: Grass, a Circle and a Rounding Error

All we wanted was to bring the grass back and remove the flat circle under the capital. Along the way we came across a forgotten piece of landscape and tiny rounding errors that showed up as white lines in the ground. A look into the workshop.

Το devlog και τα patch notes τα γράφουμε στα γερμανικά και στα αγγλικά. Εδώ διαβάζεις την αγγλική έκδοση.

View from a hill onto the walled capital in the Uimon Valley: a clay wall with towers, roofs and a pagoda behind it, green meadow and yurts in front, mountains in the far distance.

Hotfix 3 is live. On paper it was small: the grass should look like it did before the last hotfix, and the flat circle under the capital should disappear. In practice it cost us a long night, because there was more behind both points than we expected.

The grass

With Hotfix 2 we had thinned out the grass so that it would not pop up right in front of you. Three of those settings, however, meant that the finished game barely drew any grass at all. We reverted them and instead let the grass fade out softly in the distance. We tinted the ground in the distance to the same tone, so there is no longer a bright strip in between.

A player character stands in a meadow of tall, dense grass, with the city wall, gatehouses and yurts behind.

The meadow in front of the west wall, with full grass again.

The circle

When we built the capital, we levelled the terrain in a circle of well over a kilometre so that houses and streets would stand straight. Outside the walls this looked like a huge trampled square. We recalculated the terrain there as it was before levelling and brought the valley’s relief back in front of the wall. Only the city itself and a narrow strip in front of the wall stay flat.

So that the yurts outside the city do not hang crookedly on a slope, each one gets a small level foundation that blends softly into the terrain. That is how real settlements do it too.

The surprise was that the bright circle could still be seen from above. The reason lay in the ground material: on completely flat ground it grows earth instead of grass, so the disc was missing the grass and with it the slight darkening that meadows get from a distance. Now the same rule applies everywhere, and the circle is gone.

Two images side by side, both looking down at the city at an angle: on the left a bright, brown-green flat disc around the wall, on the right green meadow with gentle hills right up to the wall.

Before on the left, now on the right.

A forgotten block

West and north of the city we found a square kilometre of landscape that still came from an earlier version of the world. It was no longer properly part of the landscape, yet it looked normal. It contained a hollow up to 23 metres deep, cracks gaped in the ground along its edges, and that is exactly where trees had been floating in the air. We rebuilt the block, and the trees stand on the ground again.

So that floating trees cannot slip through again, every build of the game now automatically checks all of the roughly 145,000 trees, shrubs and ferns: each one has to touch the ground, and none may stand in water.

A player character in an open pine forest with ferns and grass on the ground.

The forest in the rebuilt block west of the city.

The white lines

Some of you noticed thin white lines running dead straight through the ground. They lay exactly where two pieces of the landscape meet, every 250 metres. The heights matched there, yet the sky shone through tiny holes.

The cause was a rounding error. Our world is eight kilometres wide and divided into 4,032 cells, so a little over 198.41 centimetres per cell. The graphics card cannot represent that number exactly. Each piece of landscape calculates its edge points from its own origin, so two neighbours missed each other by less than a hundredth of a millimetre. That is enough for gaps one pixel wide. The cells now measure 198.4140625 centimetres, a number that can be represented exactly. The world has shifted by at most three centimetres at its edges, and the lines are gone.

Two images side by side, both looking steeply down at a meadow without grass: on the left a thin vertical and a thin horizontal white line run through the ground, on the right the ground is seamless.

Before on the left, now on the right. For the comparison we hid the grass.

What comes next

Next up are the new monsters. We also spotted a few small things in the valley, such as some dark patches on the plain west of the city. They are on our list.

← Όλες οι αναρτήσεις

Σχόλια για την ομάδα

Τι πρόσεξες; Το κείμενο και η εικόνα πάνε κατευθείαν στην ομάδα, μαζί με το όνομα του λογαριασμού σου και αυτή τη σελίδα.

Στέλνουμε το κείμενο, την εικόνα, το όνομα λογαριασμού, τη σελίδα και την ώρα σε ένα κανάλι Discord που βλέπει μόνο η ομάδα. Περισσότερα στην πολιτική απορρήτου (στα γερμανικά).