The replay object both records and replays game recordings, as well as handle saving and loading replays to and from files. Gameplay recordings are essentially a list of keyboard and mouse inputs, but since Flixel is fairly deterministic, we can use these to play back recordings of gameplay with a decent amount of fidelity.
Constructor
Variables
Methods
create(Seed:Int):Void
Create a new gameplay recording. Requires the current random number generator seed.
Parameters:
Seed | The current seed from the random number generator. |
---|
load(FileContents:String):Void
Load replay data from a String object. Strings can come from embedded assets or external files loaded through the debugger overlay.
Parameters:
FileContents | A String object containing a gameplay recording. |
---|
recordFrame():Void
Get the current input data from the input managers and store it in a new frame record.