CaesarSalad
How about this?:
This generates a random level on the fly, saving it to an array as you go - I'm saving heights, but you could swap this for sprite frames/animations, different sprites etc
Pressing the space bar will allow you to replay the level from the start; if you reach the point where you restarted in the saved level then it will continue randomly generating the level from that point.
Press R to reset the level.
If you want to permanently save the current level then you could save the dictionary to local storage, allowing you to reopen it in subsequent play sessions.
So the capx you gave me is basically exactly what I wanted, thank you very much. But I tried to incorporate this into my project and optimize it but it still isn't working properly. Here's a download to the capx www[DOT]dropbox[DOT]com/s/86q1bph11qnwowc/ScirraHelpPlease[DOT]capx?dl=0
The game overall is a bit buggy but we're just focusing on the generation part, all of that is on the bottom of the event sheet. If wanted I can add credit in the app as this is going on the Playstore. Thank you