DevLog#4

New graphics - September 16, 2023 

We've ultimately achieved a harmonious blend of 2D and 3D elements in our artistic direction. 

Before

Now

And TheArtist also provide a set a nice UI for the management side of our game

Resources - October 7, 2023 

After a month of break, it's time for me to get back to coding. The next step is resource collection. Therefore, we need to establish a data structure to create a system that allows for the easy addition of resources and assets.


Last time, I set up the mini-game to collect resources in the world but I didn't link with any assets.

The first thing I did was set up basic GameData. I want every piece of game data to have a unique identifier, and this information needs to be stored in the GamaDatabase

Here's the script if you need it :) (using Odin sorry)

public abstract class GameData : ScriptableObject

{

    [SerializeField, OnValueChanged(nameof(GenerateNameAndId)), FoldoutGroup("Identification", true, order: -100)]

    protected string m_assetName = "";


    [SerializeField, ReadOnly, FoldoutGroup("Identification", order: -100)]

    protected int m_uniqueId = 0; // create uniqueID

                                  // But Some collsions can occur due to GetHashCode


    public int UniqueId => m_uniqueId;


    protected virtual void OnValidate()

    {

#if UNITY_EDITOR

        if (m_assetName.Equals("") || m_uniqueId == 0)

            Debug.LogError($"<color=red> Your asset {AssetDatabase.GetAssetPath(this.GetInstanceID())} isn't well initialised </color>");

#endif

    }


    [Button, FoldoutGroup("Identification", order: -100)]

    protected virtual void GenerateNameAndId()

    {

        m_assetName = name.Trim().ToUpperInvariant().Replace(' ', '_');

        m_uniqueId = m_assetName.GetHashCode();

    }

}

Each item you can interact with is an Interactible and each item the player can collect is a Collectible(:Interactible).
On Start, each Collectible verify if it exists in the database, otherwise, it will be disabled from scene.

I've also incorporated wobbling animations to indicate when items are pickable, and with the added override collect amount feature, setting up a bunch of resources is now quite straightforward! 😄

Collecting resources - October 18, 2023 

In order to collect resources, I've implemented a basic inventory item. I've also coded a somewhat boring inventory management system where each item has a "MaxStackInSlot" attribute, which determines how many of the same item you can have in a single slot.

Additionally, there's a "DefaultCollectAmount" field that allows you to collect multiple items in a single batch by default.

In the previous sessions, I created a draft of the pick-up mini-game. Now it's time to do some polish, integrate new mushrooms and a new UI!

Before

After

Aren't you afraid that picking up items is quite a laborious task? 

Not just yet! Implementing this mechanic will ensure the player to delegate resource harvesting, and villagers could receive bonuses and better win rate while collecting resources.

Furthermore, in the later stages of the game, players will have the option to acquire gloves that will bypass this mini-game.

Now collecting berries !

Bush have respawn timers, they refill according a certain amount of time.

The next step is dropping resources to the gathering hut. 

Regrettably, I've got to pause this project for now and concentrate on getting just one project up and running.

Thanks for reading ❤❤

Previous: DevLog#3

Enjoy my content? Follow me on Ko-fi for more updates.