DevLog#3
Towards Builder Mode - August 19, 2023
Now that we have our Navmesh and Unity grid set up, let's dive into Builder Mode. As a quick reminder, our game features two modes:
Adventure Mode: In this mode, player can freely explore the world.
Builder Mode: Here, the player is tasked with strategizing and planning new constructions.
Tile selection
In Builder Mode, I aim to implement two distinct types of selections.
Walkable Tiles: These are tiles where construction is allowed.
Non-walkable Tiles: These tiles are unsuitable for construction
By taking advantage of Unity Grid script we can easily do that feature.
Now I need to enable Builder mode when the player interacts with the townhall post.
And here's the result:
Tile Selection in Builder mode
Resource gathering
To gather resources, the player will engage in a mini-game to collect items.
This mini-game involves pressing the correct button within a valid area, similar to the mechanics found in certain cooking games.
Cooking mini-game mechanic in Cult of the Lamb.
The difficulty of the mini-game will vary depending on the rarity of the object we want to pick up.
This mechanic is designed to incentivize the player to delegate resource-gathering tasks to villagers rather than doing it itself.
Technically, the feature is quite straightforward. I utilized a Unity slider and applied a simple mathematical function to its value.
Here's the quick implementation overview (but will be polished later).
(Meanwhile) New assets!
The has created new assets that will enable the player to collect and store resources
Resources gathering building (food, wood and rocks)
House and construction site
Sun cycle - August 30,2023
While awaiting the new resource graphics, I wanted to implement a fully flexible day/night cycle.
1st step was to implement a simple time-elapsing system.
Next, we want to synchronize the light direction with the day cycle, so we'll apply a runtime rotation based on its speed.
Then we want to set up the start of the day:dawn and the start of the night:dusk.
I now have a flexible day/night cycle. I can set the light orientation for dawn and dusk and have a flexible day/night duration. Let's add a little day/night notification, 6:00 for start of the day and 18:00 for start of the night.