seeking guidance - trying to build an ecosystem simulation

I’m totally new to blueprints, with only a rough understanding of code. I’ve been animating in Maya on TV and film projects for about 6 years so am comfortable in 3d visually but getting started in code is a big challenge. Most tutorials I find focus on shooting and programming guard patrols or doors, so finding information on how to make an organic growing system is a bit tough. I don’t want a brush tool that lets me build a nice forest set, I want to program the trees so they truly grow and seed, with vines and moss creeping around like you’re looking at it in time lapse photography.

To start I’m just trying to set up a “plant” cube which grows at a steady rate, replicating itself, but can also die from stifling overpopulation (similar to the grid in Conway’s game of Life). Once that’s working, I’ll add a herbivour creature which moves to the cubes, consumes one, and duplicates itself. Then I’ll add in a Carnivorous beast, et cetera

The goal is to have a terrarium where everything is always transferring it’s “mass” from one actor to another in the form of health points. 10 points of plant HP becomes 10 points of herbivore HP, which if it dies leaves behind a corpse of equal value to it’s full health, which over time turns into a patch of grass which has that same 10 points of value. Once these basics are working I can start building complexity in.

The end goal is to use what I learn here to create a meditative VR space that feels like an alien terrarium which you can interact with alongside your friends. To nutshell it “Waking mars + starseed pilgrim + stardew valley” with delusions of grandeur aspiring to capture what Spore might have been if they had avoided the googly eyed rout and kept the sciencey realism.

That said, here’s my pitiful start. I’m trying to just make a cube with a box on top of it which will spawn itself.

I was trying to set it up so that each time I hit the F key, the cube would double itself over and over 10 times, creating a big pile of 1024 cubes. Instead, it seems to only spawn ten cubes, which all occur simultaneously in the same spot and burst off in every direction. Here’s my crappy blueprint

CLEARLY i’m very new to all of this … any advice you can give me, or tutorial you can point to would be greatly appreciated

Many thanks!

The loops is fine . The trouble is you’re spawning it in the same place every iteration of the loop and then I’m guessing they are colliding with themselves . I’ve never done anything like this but maybe try having a transform variable eg lastSpawnTransform, and another newSpawnTransform. then each iteration of the loop take lastSpawnTransform add an offset to the transform then feed this new transform into the newSpawnTransform variable by setting it.

Another way could be using sockets and when you spawn another cube you attach it to a socket on the other cube like connecting connex bricks .

These arnt the best way though. You need to learn procedural generation algorithms to do it properly . But this should get you started

thats an interessting project. the only problem I see is finding the right balance in your ecosystem.
regarding your question: loops ALWAYS occur simultaneously. if you want a delay I would suggest using a looping timer that handles the spawn logic once in a given time. if you want to double the size of the organism you would need an integer where you store the current size. and then you spawn the same amount of new cubes. also if you know how big one cube is, I would take that vector Z + cube size and multiplicate it with the nr. of the spawned object. so when youre spawning the 120th cube, the z would be Size * 120 + Z. this way they always spawn on top.

if you want you can add me on Skype (MajekChb) I can help you from time to time if you have questions.