I had already made this idea months ago, but I just decided to revive the concept, now that people seem to like the idea.
You can generate your own structures within a single bundle, then use a combination of expression, spawn, and extractor behaviors. However, this can take a long time, and requires lots of focus, concentration, and math skills. Hey, welcome to the world of game development, where all of that is already necessary.
However, to save time, and to keep things simple, even for new Flowlab users, I have come up with an idea for a new behavior called “Structure”. Basically, it will allow you to generate a group of objects in a pre-made template that you built in the editor. Here is how it will all function:
Spawn: Generates the structure (depending on it’s size, it may lag). If the structure has already spawned, a signal to this input (on the same object) will have no effect.
Destroy: Destroys the structure (again, may cause lag)
X: Changes the x-value (in pixels) of where the structure will spawn. If the structure has already spawned, changing the x-value will not move the structure.
Y: Changes the y-value (in pixels) of where the structure will spawn. If the structure has already spawned, changing the y-value will not move the structure.
Template: Select a template to use. You can also create, edit, or delete templates with this. When creating or editing a template, you will be taken to a “mini-level” where you build with objects that already exist in your game. Unlike my original concept for the structure behavior, this does not include background objects.
X: Determines the x-value (in pixels) of where the structure will spawn
Y: Determines the y-value (in pixels) of where the structure will spawn
Delete Objects?: Will any objects obstructing the structure be destroyed?
Gradual or Immediate?: When the structure spawns, will the entire structure be built gradually, object by object, or will the entire structure be spawned all at once? If you choose gradual spawning, you get to determine how long (in 1/10th second) the structure will take to fully generate. Immediate spawning, or gradual spawning that takes less that 3 seconds, may cause lag, depending in the structure’s size.
There will be an output for spawn and destroy.
@“grazer”, it would be AMAZING if you decided time add this behavior to Flowlab. It would open the door to randomized world generation to lots more people. And while randomized world generation is still possible, adding a structure behavior will create big potential for such games.