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.

Enjoy!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s