Hi,
I’m making an endless runner game and I’m wondering about approach to generating levels. I would like to create segments and stitch them together. A segment would be a finite section of a level with its own obstacles and spawners for enemies and collectibles. Segments would need to be added at runtime at random from a pre-defined selection. I would like to offload segment creation work to another person, who is going to focus on level design, so ideally no programming should be necessary to create another segment.
What is the correct approach to take in Defold? In my understanding, the segments need to be Defold collections, and these collections need to be instantiated by a collection factory at runtime. Since one factory can spawn only one type of collection, there would need to be multiple factories, one for each segment type, and I could parent them in a single “factory controller” game object, that would tell an appropriate factory to generate a segment.
Is this a correct approach or is there a better one?