I am making a sidescrolling game where obstacles will be randomly generated. However, I want the series of obstacles to be clean and not just jumbled or impossible to navigate.
My solution to this problem was to create groups of obstacles to randomly generate instead. I imagine I will want to define these groups in an external file and load them in via the ajax object which I am comfortable with. Maybe something like this: obj1:0,obj7:50,obj3:100,obj3:140
That string would represent a list of objects to spawn, along with a corresponding x offset that would place it behind the spawn x location.
Here is where I'm not sure how to proceed:
I want to be able to create these objects based on the string without needing to use a huge amount of events or having to repeat events for each scenario. What would be the best way to approach this, keeping in mind that I want it to be clean and dynamic.
Thanks :)