Roofing System

Roofing System

Hello folks!

Today I have finished implementing the roofing system in the game. It is a system for spawning roofing for buildings based on the building’s footprint. It’ll randomly select a roof material and toggle the correct meshes as needed.

Here’s how they look like:

Roofing variations for the buildings.

The variations begin in the footprint. Each basic footprint has a number of prefabs assigned to it; 1×2, 2×2, 2×4 etc. These are all controlled by one RoofComponent on the root transform, that has references to all the roof mesh parts in the prefab.

Then, a base material is set for the roof (wooded, blue tiles etc), and each mesh queries the database for the required mesh based on the tile type. And there you have it.

Each piece will also have variations inside them, to allow for less sameyness.

Currently there are 5 base materials implemented in the game. These are very easy to expand, and will be as development progresses.

Besides that, a system for adding variation to the walls has also been implemented. Similar to the roof, there are currently 8 base materials, with several variations for each of them. (4 wood walls, 5 white/wood walls, 4 stone walls etc).

As you can see from the previous image, each house has a wall material assigned to it. And each wall tile then chooses a subtype randomly.

These variations make the buildings look more varied. More wall types will be added, and later they will also possess varying strengths.

And finally, we have variations for the terrain/grass tile. Over 30 base grass tiles were added, and they are randomly selected during spawn time. This makes the terrain look more varied, and is really easy to expand/improve.

Various kinds of grass!

That’s all for today’s update! Next I’ll begin focusing more on the mechanical systems of the game.


Animation Basics

Animation Basics

Hello folks!

A lot of work has been done on the game, with the main new feature implemented being animations!

The setup for the characters and the content pipeline has been established. Characters are divided into a handful of pieces, and these are chosen to represent a body part/piece of equipment. The representation of an armor is made via a basic scriptableobject that tells which mesh to be displayed for which part of the body.

This is all loaded into an display component that has references to the meshfilters that will receive said meshes. Animation is done entirely in Unity, using transforms as bones and attaching the meshes to the appropriate bone.

Here you can see the unit idling in the unit management screen:

Equipping and unequipping armor and weapons is easy.

A couple of basic animations have been added for walk cycles, idling, death, and some attack animations. Obviously all pretty placeholder, but this is the style I’m going for with the game.

Here you can see the units in action at the start of a battle:

The units coming out from their ambush spot. The first few steps are always tricky.

And here, a duel to the death:

A swordfight to the death.

That’s it for today. Soon I’ll be launching a YouTube channel to publish more videos!