Josephkhland / gwj58

Godot Wild Jam 58
0 stars 0 forks source link

Create PlantObject (Requirement) #14

Closed Josephkhland closed 1 year ago

Josephkhland commented 1 year ago

PlantObject should be a node that can be instanced in the BaseGameWorld Scene. In addition to containing the graphics for planting items and functions for handling their positioning/spawning/creation on the map, they need functions and parameters to handle the growth of these PlantObjects and their Harvest.

A suggested design for this:

GrowthLevel: {Seed, Growing, Ripe, Rotting, (Destroyed)} GrowthProgress -> float from 0 to 1.(0% to 100%). When 100% is reached, reset to 0 and increase the GrowthLevel by 1 step. GrowthPerStep -> 0.01 (How much Growth Progress is made per Step. StepTime -> 0.1 sec (How often does a Step occur).

HarvestList is about the TributeItems that can be dropped from the PlantObject. (We are potentially going to use some kind of Database/Dictionary in our code for all the premade TributeItems that we have. So far the implementation of TributeItems exists in the Ingredients Branch). -> Affect the chances of different harvestables per GrowthLevel. HarvestList{ TributeItem : Chance TributeItem : Chance }

Perhaps a boolean flag to define whether the PlantObject is Harvestable or not. Functions for changing between growth levels. From Seed to Growing. From Growing to Ripe, From Ripe to Rotting, From Rotting to Destroyed. Consider that the Chances of the Harvest list might be affected by these functions and each PlantObject might apply different changes to the HarvestList.