Regenerating Resources
Goal
Create an RPG like experience with resources that can be used by anyone and regenerate themself by time.
Resources are defined as:
- Fields that automatically regrow once harvested
- Trees that regrow once timbered
- Mines which ores automatically respawn once mined
Strategies and Problems
There are several ways and problems that need to be taken into account
Problems
Regeneration Strategy
When multiple players are using a farm it could quickly become hard for them to extract sufficient resources from a region. Node regeneration need to scale according to the present players in a farm region.
Strategies
Regeneration Strategy
Regeneration points 1 - Simple counting down
When a node is broken it is saved with a fixed amount of regeneration points.
E.g. a iron ore has 50 regeneration point. Every time any ore inside the region is broken a point is subtracted from the progress. Once the node reaches 0 it is regenerated and respawns
Regeneration points 2 - Relative resources
When a node is broken it is saved with a progress percentage.
When a node of the same type is broken a relative percentage is subtracted which is 100/n*0.01, where n is the number of nodes of that type in this region.
This would ensure that a node of this resource is always available in this region.
Regeneration points 3 - Time regeneration
When a node is broken it is saved with a fixed amount of regeneration points
E.g. a iron ore has 50 regeneration point. Every minute the points are reduced based on the number of players currently active in the region. A player is considered active when it broke a resource inside the region in the last n minutes.
This would ensure that resources are always available.
Instead of points it could also be relative by 100/nm0.01 where n is the number of nodes and m the number of active players
What is a node
A node in general is equal to a block. A node can be an ore, a wheat crop or a log that it connected to ground.
A node can be either active or inactive. When a node is inactive it has a different appearance.
Ore node
An ore node represents an ore when active. When inactive a placeholder block will be displayed. this could be a stone that blends perfectly into the surrounding
Growing node
A growing node is any node that has several growing states, like wheat, carrots, potato etc. Those nodes simply jump back to the first growing state when harvested. The growth should be controlled by the progress of the regeneration strategy and not by the random tick speed.
Tree node
A tree node represents a tree that will regrow once fully harvested. A tree node is attached to a set of schematics that define how the tree will look like. Once a tree that has been pasted is fully mined a new random tree will regrow from the set of schematic.
How to define a resource area (User stories)
Resource areas need different definitions based on the resource they are supposed to provide
Ore nodes
Ores are defined by swapping between two modes.
Ore Definition
Defines where the ores are located by placing them. Once the mode is activated all ores that are already places in the area are set. The user can now remove or add new ores ores in the area. Once the ore definition mode is left the positions of ores are saved in the area.
Placeholder definition
Defined what placeholders are used when an ore is not present. Once the mode is activated, all ores are replaced by their already defined placeholders. Ores without a placeholders get the neared non ore adjacent block. A user can change the blocks by simply adding others. Once the mode is left, the replacements are saved.
Growing nodes
Growing nodes are changed by entering the definition mode and simply setting or removing nodes by planting or destroying plants.
Tree nodes
Tree nodes are changed by entering the definition mode. Upon entering the definition mode all grown trees are removed. and the previously saplings are set. Tree nodes can then be removed or added by setting or destroying saplings. A sapling type can be associated with a set of schematics. Once the mode is left, all nodes are instantly regrown using the assigned schematics.
Regenerating Resources
Goal
Create an RPG like experience with resources that can be used by anyone and regenerate themself by time.
Resources are defined as:
Strategies and Problems
There are several ways and problems that need to be taken into account
Problems
Regeneration Strategy
When multiple players are using a farm it could quickly become hard for them to extract sufficient resources from a region. Node regeneration need to scale according to the present players in a farm region.
Strategies
Regeneration Strategy
Regeneration points 1 - Simple counting down
When a node is broken it is saved with a fixed amount of regeneration points.
E.g. a iron ore has 50 regeneration point. Every time any ore inside the region is broken a point is subtracted from the progress. Once the node reaches 0 it is regenerated and respawns
Regeneration points 2 - Relative resources
When a node is broken it is saved with a progress percentage.
When a node of the same type is broken a relative percentage is subtracted which is 100/n*0.01, where n is the number of nodes of that type in this region.
This would ensure that a node of this resource is always available in this region.
Regeneration points 3 - Time regeneration
When a node is broken it is saved with a fixed amount of regeneration points
E.g. a iron ore has 50 regeneration point. Every minute the points are reduced based on the number of players currently active in the region. A player is considered active when it broke a resource inside the region in the last n minutes.
This would ensure that resources are always available.
Instead of points it could also be relative by 100/nm0.01 where n is the number of nodes and m the number of active players
What is a node
A node in general is equal to a block. A node can be an ore, a wheat crop or a log that it connected to ground.
A node can be either active or inactive. When a node is inactive it has a different appearance.
Ore node
An ore node represents an ore when active. When inactive a placeholder block will be displayed. this could be a stone that blends perfectly into the surrounding
Growing node
A growing node is any node that has several growing states, like wheat, carrots, potato etc. Those nodes simply jump back to the first growing state when harvested. The growth should be controlled by the progress of the regeneration strategy and not by the random tick speed.
Tree node
A tree node represents a tree that will regrow once fully harvested. A tree node is attached to a set of schematics that define how the tree will look like. Once a tree that has been pasted is fully mined a new random tree will regrow from the set of schematic.
How to define a resource area (User stories)
Resource areas need different definitions based on the resource they are supposed to provide
Ore nodes
Ores are defined by swapping between two modes.
Ore Definition
Defines where the ores are located by placing them. Once the mode is activated all ores that are already places in the area are set. The user can now remove or add new ores ores in the area. Once the ore definition mode is left the positions of ores are saved in the area.
Placeholder definition
Defined what placeholders are used when an ore is not present. Once the mode is activated, all ores are replaced by their already defined placeholders. Ores without a placeholders get the neared non ore adjacent block. A user can change the blocks by simply adding others. Once the mode is left, the replacements are saved.
Growing nodes
Growing nodes are changed by entering the definition mode and simply setting or removing nodes by planting or destroying plants.
Tree nodes
Tree nodes are changed by entering the definition mode. Upon entering the definition mode all grown trees are removed. and the previously saplings are set. Tree nodes can then be removed or added by setting or destroying saplings. A sapling type can be associated with a set of schematics. Once the mode is left, all nodes are instantly regrown using the assigned schematics.