right now in my game I generate all my objects at the start of the game off screen, then move them down the screen to give a "side scroller" effect, then once they hit the bottom of the screen move them to the top again.
I want to change this as I want more control over these objects and want it to be done procedurally, so done at runtime.
My understanding of it would be to create and destroy the objects whilst the game is running, say there are 5 different objects would you recommend maybe having a random number counter and if said number == 1 then spawn type 1 object?
There are some factors I need to bring into the algorithm though, obviously I will handle speed and different textures within the objects classes, but how would I go about say object 1 being more likely to fall down the screen than object 2? how would I implement my gameSpeed variable into this, so the higher the game speed the faster they fall and more frequently they fall. Most of all how can I be assure that there is always a path through the objects, how do I define what path these objects will fall down?
I'm sure there is already an algorithm I can adapt to this problem, an article that I would find useful or a user on here that has an insight that will be more than helpful.
Cheers