
Obscura
Multiplayer village-building RTS with runtime-generated terrain, hex-grid building logic and a compute-shader fog of war. Master project at FH Hagenberg, team lead.
Description
During the last three semesters of my master’s program "Digital Arts" at FH Hagenberg, I got to be the team lead of our final master project. For the final project we decided to do a fun and engaging multiplayer village-building game, very much inspired by games like "The Settlers" or the recent "Manor Lords". The main goal within the game is to destroy the villages of the other players, while having to build up your own individual little village.
The primary idea behind our game design choices was to pair the fun of building and creation, with the fun of destroying (Eros and Thanatos). To achieve this we placed a lot of value on a creative and aesthetically pleasing building process, which allows for a lot of individuality, as well as tactical, suspenseful and satisfying fighting mechanics.
We aimed for an appealing, painterly look, having a slight miniature effect. We achieved this by utilizing a depth-dependent, directional Kuwahara filter, which we combined with a line shader and a custom tilt shift effect.
Our team had 5 members. Nico Hartl was responsible for texturing and modelling all our buildings. Josef Ibrahim created and animated the villagers. Moritz Haas setup a dynamic soundscape using FMod and composed our music and Nico Ziperzik rewrote Epic's "Mass" Plugin, so that our game could support a multitude of characters.
I was responsible for bringing all of these thing together into Unreal - build the procedural environment, set up all the shaders, implement the game mechanics and systems. The main challenges of the development were the following:
The game builds a newly generated landscape every game start at runtime, consisting of three different biomes, each with its own resources and distinct look. I achieve this by layering multiple noises on top of each other (Simplex for landscape and resources, Voronoi for rivers, biomes and sections). Building the actual vertex buffer happens with async multithreading. For the landscapes shader, as well as the resource spawn logic, I bake some of the creation info into the vertex colour (like biom type, mountainness, riverness). I use that same vertex buffer to spawn instances of trees, grass, stone and more. However, in order to make these instances interactable, I created a system which can dynamically swap them with actors, making them harvestable and interactable for the villagers.
I additionally use the vertex colour so that I can blend between materials like mountain stone, snow, riverbeds or grass, within the landscape shader. Finally, using Runtime Virtual Textures, I can modify the shaders of assets, according to where on the landscape they have been placed. This allows me to scale down foliage the further it is placed on a mountain, remove grass on snow or water, or change its colour according to the underlying biome.
Another challenge was the build logic, pathfinding, command logic and resource management. Our playable area consists out of a huge hex map. These hexes are used for placing buildings (like a puzzle), roads and walls (which get drawn using a self made spline tool), tracking resources, growing forests, pathfinding and a lot more.
Each building consists out of a certain hex shape, making the player figure out certain puzzle combinations in the building process. Some buildings, which have been placed near each other become merged visually.
Each resource exists individually within our game world. To make the bots always get the desired resource (most of the time the closest), we track resources, resource reservations and storage within a big hash map, each entry corresponding to one of the hexes. If multiple resources are on one hex, they get procedurally stacked. The exact stacking method depends on the type of resource.
The management controlling what each bot has to do, was created using the command design pattern. Each command object carries all the necessary information for the bots to achieve all necessary tasks, like cutting wood, picking up a sword or fighting. These commands can either be directly placed by players, but in the basic economy they are mostly issued by the worker buildings. If a building creates a certain command like "I need 4 wood and 2 stone so that i can be built", that command becomes later dynamically assigned to the closest free bots.
This game was also the birthplace of my first published Unreal plugin. As this game requires a highly performant, but also accurate and pretty fog of war, I built a system which writes a fog mask into an editor exposed render target asset using compute shaders. That render target is later used in an layered mesh fog effect, and is also sampled for various gameplay mechanics, like hiding enemy bots or freezing the last state of enemy buildings.
I have learned a lot getting this game project into its current state (mostly thanks to Ghislain Girardot and his Youtube Channel^^) and I hope I will be able to continue working on it until it is finished (enough).
Media

A spawn next to iron ores.
All buildings have a procedural building animation (baked height per geometry island using geo nodes, animated with WPO)
Each hex can grow trees or other plants. This causes forests to spread, if they are not cut down first.
Each villager has a certain vision range. Buildings block it tho..(for now even his own). To reveal big areas at once, there are multiple tiers of lookout towers within the game.
The building is based on a hex grid, each hex being projected onto the landscape height within the shader.

A discovered enemy base, no longer within view. All the bots and assets are frozen in their current state. They only get faded out, when their actual location gets rediscovered, or the visible area expands to their illusive copy.

The landscape material controls the size of the foliage, blending it out towards snow or rivers..

A small, directional Kuwahara Filter is paired with a Line and Tilt Shift effect.

A small, directional Kuwahara Filter is paired with a Line and Tilt Shift effect.

Models by Nico Hartl

Two woodcutters hugging..

Gathering wood..




Kuwahara and Line Filter Prototype

Some textures (also normals) are abstracted using voronoi noise, giving them a more painterly look.

Each game starts with a newly generated map, with multiple different biomes.

The player can affect the generation with multiple parameters like mountainness or riverness.

The whole landscape from a far..

