raylib
raylib copied to clipboard
[core] Feature Request - Event Recording Enhancements
Feature Request Summary
I'm currently developing a game wherein Raylib's event recording/playing features would be very helpful for creating an arcade-style attract mode and saving replays of successful runs.
Start/Stop Recording via function call
Currently it is only possible to it ExportAutomationEvents/PlayAutomationEvents with F11/F9, adding something like BeginEventRecording(char *fileName), StopEventRecording and PlayEventRecording(char *fileName).
Specifying I/O File
Passing a fileName parameter to BeginEventRecording and PlayEventRecording could be used as an alternative to the hard-coded eventsrec.rep
Toggleable DrawText calls while recording/playing events
Currently when recording or playing an event file, DrawText is called. I think that if this exposed this should be toggleable with either a boolean passed to BeginEventRecording/PlayEventRecording or via a compile-time define.
Concerns
I understand that this is currently an experimental feature in Raylib, and that there is a TODO to determine how PlayAutomationEvents should interact with PollInputEvents. If this feature is rejected on these grounds I understand and will maintain my own branch. Otherwise I'd be happy to implement the feature described above.
@MatthewOwens Thanks for your feedback! I had almost forgoten about the Event Recording System, it's still in experimental state and it has not been reviewed in several years. I will give it a review after raylib 4.5 release!
I am looking to contribute to this project, is there any good place where I can start from? =)
@varshneydevansh For the event reocrding system there is already a PR proposal and I'm reviewing it myself.
Implemented in commit https://github.com/raysan5/raylib/commit/99dac5451cad1c45c0a6b1da5c6175a7575f3403