Chapter 11: Endless Games, Actor Pools & Persistence
In this chapter, you'll fly through Cave Flyer, a game that could go on forever. The big idea is that an endless game can't make everything at once, so it recycles a small pool of actors, builds the world just ahead of you, and saves what you've earned between runs.
I'm still writing this chapter, step by step. In the meantime, you can play the finished game, and read the code and the assets that make it, so that you can run it and change it yourself.
Play the Game
The code that makes it:
The assets, which go in an assets folder next to the game: