I am currently in the concept phase for an endless runner I want to develop with libgdx in Java.
As I can not preassemble an infinite level, the generation of obstacles and power-ups needs to be "random" and during the game itself. In my last endless runner, I simply had randomness to determine the next obstacle type, as well as its position.
This time, however, I want to integrate two resources that play a major role and change the way I need to handle feasibility fundamentally.
One resource is some sort of an energy bar, which decreases over time, as well as due to collision with obstacles (possible to get over in the beginning, deadly as the game proceeds) and increases with the collection of power-ups.
The other resource is a coin-like entity, which you can collect during a run and which need to be present to a certain amount, in order to collect the energy-filling power-ups on collision.
I have a vague to solid idea of securing feasibility in terms of creating manageable obstacle-chains, but can't think of generation procedures, that ensure the possibility to collect enough power-ups while being provided the opportunity of collecting enough coins first. Furthermore, this procedure needs to increase the difficulty with the games duration.
I am not asking for code itself, but rather for adequate ways to approach my issue, such as dividing my endless runner in minilevels, that have some transition and are feasible on their own. Alternatively, experienced statements on which ways not to use and why are very welcome as well!
Feel free to ask further questions - Thanks in advance!