This turned out to be more complicated (to me) than I first thought it would be.
I'm wanting to implement a scripted "CPU player" playing the game by itself... Kind of like those arcade games in the 80s where the game played by itself and with the "Insert coin to start play!" message on top. Some ideas I had:
* As the character's movement is controlled by FlxG.touches being in different states at different times (FlxG.touches are probably handled in the FlxGame->update function) , I thought about building something that stores and injects these touches. The problem is, I wouldn't be able to get it exact... there would be timing issues. I think. At least a few milliseconds could be off, and that's enough to make this not work as intended - impossible to script and replay something like a "power play".. etc.
* Store every full screen as a complete frame, and playback those frames as a movie. Problem: Not sure yet how to really store frames :-P Shouldn't be impossible though. However several minutes of frames would be huge (think 30 (or 60?) frames/second) for one or several minutes. Not sure this would work with memory issues, loading times, etc even - changing a FlxSprite the whole size of the screen 30/60 times a second... hmm I'm not sure this port was engineered to do that.
Anyone did something like this before? Got any ideas?