openage
openage copied to clipboard
Scripting and recording of all user interaction.
All user interaction should be recordable/scriptable.
- keystrokes
- mouse movements
- scrolls
- clicks
This is related to networking and multiplayer, but also could be useful for reproducing bugs.
Thoughts?
This is probably strongly correlated with creating an "action" subsystem as I suggested in #284. All user actions are piped through that system and bound actions are executed. The recording can happen in between, the replay as well.
Btw if we're good we can even do gui and gameplay tests on travis that way, although spawning a virtual X screen will most likely be a pain in the ass.
If we manage to record/script user interactions via the action subsystem we should be able to figure out Xvfb on travis!
This would indeed be great for reproducing bugs, and for automatic testing of in-game stuff.
Would it not be simpler to use existing record/replay systems for testing and such? I understand scripting is a different goal.
I doubt we can be compatible to the existing game state storage structs, we can make use of the existing ideas and concepts of course.
I meant input recording/replay tools, not aoe record files and the like.
And what tools did you think of that could be of use?
https://en.wikipedia.org/wiki/Xnee
The replay should consist of: a replay of the 'network events' (what's actually happening in the game) and the replays of every player perspective. So, when viewing a match, you can fly around, use minimap, click on units to examine them... But also you can switch to the perspective of any player and see what he's doing and how the camera moves.
A replay will have a network data track and actions tracks for every player.
The action system is ready for the implementation of the record/play of the player perspective.
To do that - record everything in InputContext::execute_if_bound
, for example.
Note: screen resolutions can be different for the viewer and the player, so the mouse movement should be recorded in the world coordinates. Probably don't expect the replay of the interactions with the UI overlays to be meaningful (clicks on the command buttons or the minimap), just record the action that it triggered.
For collecting thoughts on a replay container format: https://pad.stusta.de/p/openage-replay-container