Eternity Devlog: Resource Harvesting

Eternity Devlog: Resource Harvesting

Hello space explorers,

This week it was all about harvesting! We’ve been focused on making resource gathering dynamic, interactive, and influenced by a variety of factors – including time, location, and player choices.

 

 
Resource Nodes

The core of our resource-gathering system is the concept of Resource Nodes. These are interactable points in the game world representing different types of resources like ore, crystals, and more. When the player is within a certain range of these nodes, they can start harvesting the resources it offers.

csharp

public abstract class ResourceNode
{
    public float HarvestRate { get; protected set; } 
    public float InteractionRange { get; protected set; } 

    public abstract void Interact(Player player); 
}

Each type of node (RawMaterial, Special, etc..) inherits from this abstract ResourceNode class and implements the Interact method, defining how the player gathers resources from it.

Harvesting Logic

Every time the player interacts with a node, a specific amount of resources is added to the player’s resource pool (indirectly, of course, they are actually stored in the gathering ship’s cargo hold). The rate at which resources are gathered, the HarvestRate, can vary between different node types, and it’s also influenced by various game factors – for instance, ship equipment, tech levels, etc. Resource visibility is influenced by mining tech, which means that players need to research specific techs to be able to harvest certain resources.

csharp

public class OreNode : ResourceNode
{
    //...
    public override void Interact(Player player)
    {
        player.oreHarvesting.AddResources(HarvestRate);
    }
}
Modifiers

We expanded our previously created modifier system to apply to resource harvesting as well. This allows us to dynamically modify the amount of resources gathered based on a variety of in-game factors. We can have global modifiers affecting all resources and specific modifiers affecting only certain types of resources. This creates a nice vehicle for applying upgrades and event temporary debuffs!

Up Next

The system is shaping up nicely, but there’s still work to do. We’ll need to look at resource node spawning and distribution, and also refine our modifier system to make it more flexible and robust. We’re considering adding temporary modifiers with a limited duration and stacking effects, among other things.

That’s it for today’s update. We can’t wait to see how players will interact with our resource-gathering mechanics and make strategic decisions based on the in-game factors influencing their harvest.

Stay tuned for the next Etenity’s devlog where we’ll dive deeper into the dynamics of our evolving universe!

Signing off,