Plant Growing System Like Grow A Garden

I was wondering how I would go about making a plant growing system like Grow a Garden. Right now I’m doing it by changing models whenever it gets to a new stage but I really wanna know how they made their growing system or how to make something similar to that.

what they probably do is place attachments at key points where parts will be (because its parts not models) and then just change the size slowly.
they never changed the model, only changed part size as it would grow.

1 Like

Maybe create a dictionary with the plant data (Height, Type, Stages etc), then grow the plant while checking its data against the data in the table to see if its time to update the stage?

There are hundreds of ways you could go about doing the same thing but at the end of they day the best option is what fits your needs. It’s impossible to know exactly how grow a garden was able to achieve a plant growing system such as the one they have implemented, but considering the randomness in the generation, it’s likely relatively complex. Here is how I would do it:

  1. I’d have a module script for each plant that acts as some sort of ‘blueprint’. This could be organized to have a section for randomly generated attributes, and then another section detailing the growth of the plant that could utilise these attributes. (Organised as a table)
  2. Next, I’d have another script that acts as an interpreter. This interpreter reads the blueprint and grows it according to a given growth point (0 to 1, 1 being fully grown). Using a growth point number is useful to be able to make your plant jump to any point in its growth. (Useful for growing offline)

That’s how I’d personally do it, there could be better ways out there but this is something I’d use. Here is an example of a ‘blueprint’:

return {
	RandomAttributes = {
		Orientation1 = {1,180} -- Interpreter would choose random int between 1-180
	},
	[1] = {
		GrowthStart = 0,
		GrowthEnd = 0.5,
		Properties = {
			Size = function(percent) return Vector3.new(1,percent,1) end, -- percent is relative to the sections growth percentage
		},
	},
	[2] = {
		Properties = {
			Size = function(percent) return Vector3.new(1,percent,1) end,
			Orientation = function(percent,attributes) return Vector3.new(0,attributes.Orientation1,0) end
		},
		GrowthStart = 0.5,
		GrowthEnd = 1,
	}
}

Along with this your model would contain numbered folders that correspond to each index in the blueprint. Very bare bone but I hope you understand what I’m saying. Hope this helps :upside_down_face:

4 Likes