HomeGamesUpdatesPricingMethodology
Steam News29 May 20224y ago

Dev Blog - Building System

Hi Everyone ! Here again a small progress-update about Rokatusch. Notice: Since the workers are controlled by AI (Artificial intelligence / Computer player), there are some delays between the actions (Running, cutting t

In this update4

Full notes

Full Rokatusch update

Read the full published notes in a cleaner layout. The original post stays linked below.

What changed

0 fixes1 addition1 change0 removals
  • Gameplay
changedHi Everyone !Here again a small progress-update about Rokatusch. Notice: Since the workers are controlled by AI (Artificial intelligence / Computer player), there are some delays between the actions (Running, cutting trees and building buildings),
addedWhat's going on?I updated the building process. Grass and other environment details (Stones, flowers, ...) at building will be removed from now on. Food production building was added too.

Rokatusch changes

changedHere again a small progress-update about Rokatusch. Notice: Since the workers are controlled by AI (Artificial intelligence / Computer player), there are some delays between the actions (Running, cutting trees and building buildings),
addedI updated the building process. Grass and other environment details (Stones, flowers, ...) at building will be removed from now on. Food production building was added too.

Hi Everyone !

Here again a small progress-update about Rokatusch. Notice: Since the workers are controlled by AI (Artificial intelligence / Computer player), there are some delays between the actions (Running, cutting trees and building buildings),

What's going on?

I updated the building process. Grass and other environment details (Stones, flowers, ...) at building will be removed from now on. Food production building was added too.

What's next?

I will work on the resources logic next.

How does grass removing work in Unity

// Removes details of terrain [layer] at [position] for size [halfExtendWorld] (Half extended quad in world size) private static void RemoveMapDetails(Terrain terrain, Vector3 position, float halfExtendWorld, int layer = 0) { var detailWidth = terrain.terrainData.detailWidth; var halfDetailWidth = detailWidth / 2f; var factor = detailWidth / terrain.terrainData.size.x; // Calc factor for detail map resolution var targetX = (int)Math.Round((position.x * factor) + halfDetailWidth, 0, MidpointRounding.AwayFromZero); var targetZ = (int)Math.Round((position.z * factor) + halfDetailWidth, 0, MidpointRounding.AwayFromZero); var halfExtend = (int)Math.Round(halfExtendWorld * factor, 0, MidpointRounding.AwayFromZero); var startX = targetX - halfExtend; var startZ = targetZ - halfExtend; var map = GetMapData(terrain, layer); var maxZ = map.GetLength(0); var maxX = map.GetLength(1); for (var z = startZ; z <= targetZ + halfExtend; z++) { for (var x = startX; x <= targetX + halfExtend; x++) { if (z < 0 || x < 0) { continue; } if (z >= maxZ || x >= maxX) { continue; } map[z, x] = 0; } } SetMapData(terrain, map, layer); } private static int[,] GetMapData(Terrain terrain, int layer) { return terrain.terrainData.GetDetailLayer( 0, 0, terrain.terrainData.detailWidth, terrain.terrainData.detailHeight, layer); } private static void SetMapData(Terrain terrain, int[,] mapData, int layer) { terrain.terrainData.SetDetailLayer(0, 0, layer, mapData); }

Otherwise nice day and greetings NoserverStudios

Source

Steam News / 29 May 2022

Open original post

Changelog.gg summarizes and formats this update. How we read updates.