openage icon indicating copy to clipboard operation
openage copied to clipboard

Scripting and recording of all user interaction.

Open franciscod opened this issue 9 years ago • 10 comments

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?

franciscod avatar Apr 14 '15 00:04 franciscod

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.

TheJJ avatar Apr 27 '15 13:04 TheJJ

If we manage to record/script user interactions via the action subsystem we should be able to figure out Xvfb on travis!

franciscod avatar Apr 27 '15 13:04 franciscod

This would indeed be great for reproducing bugs, and for automatic testing of in-game stuff.

mic-e avatar Jun 25 '15 16:06 mic-e

Would it not be simpler to use existing record/replay systems for testing and such? I understand scripting is a different goal.

boombatower avatar Sep 08 '15 03:09 boombatower

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.

TheJJ avatar Sep 14 '15 00:09 TheJJ

I meant input recording/replay tools, not aoe record files and the like.

boombatower avatar Sep 15 '15 04:09 boombatower

And what tools did you think of that could be of use?

TheJJ avatar Sep 15 '15 09:09 TheJJ

https://en.wikipedia.org/wiki/Xnee

janisozaur avatar Sep 15 '15 10:09 janisozaur

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.

VelorumS avatar Jun 28 '16 17:06 VelorumS

For collecting thoughts on a replay container format: https://pad.stusta.de/p/openage-replay-container

simonsan avatar Sep 20 '19 14:09 simonsan