raylib icon indicating copy to clipboard operation
raylib copied to clipboard

[core] Feature Request - Event Recording Enhancements

Open MatthewOwens opened this issue 2 years ago • 1 comments

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 avatar Mar 03 '23 11:03 MatthewOwens

@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!

raysan5 avatar Mar 03 '23 19:03 raysan5

I am looking to contribute to this project, is there any good place where I can start from? =)

varshneydevansh avatar Oct 14 '23 10:10 varshneydevansh

@varshneydevansh For the event reocrding system there is already a PR proposal and I'm reviewing it myself.

raysan5 avatar Oct 14 '23 11:10 raysan5

Implemented in commit https://github.com/raysan5/raylib/commit/99dac5451cad1c45c0a6b1da5c6175a7575f3403

raysan5 avatar Oct 26 '23 22:10 raysan5