Rewind button

User avatar
Revenge
Neural Network
Neural Network
Posts: 403
Contact:

Rewind button

Post#1 » 25 May 2017, 20:38

Title says all, when viewing a replay, there is currently no way to go back to a previous time during the replay. If you are trying to figure out why a bot acted a certain way towards the end of the replay, you'll have to replay the ENTIRE clip multiple times.

Please add a Rewind button in replays, to make diagnosing and understanding AI easier for the community.

pier4r
Skynet
Skynet
Posts: 3390

Re: Rewind button

Post#2 » 25 May 2017, 21:33

The point is that the replay is not a video but an actual program and very few debuggers allow the "step back", I mean even those developed for years.

So it is unlikely it will happen. Maybe we can get a breakpoint instead, at least time based.
http://www.reddit.com/r/Gladiabots/wiki/players/pier4r_nvidia_shield_k1 -> Gladiabots CHAT, stats, insights and more ;

User avatar
GFX47
Dev
Dev
Posts: 2914

Re: Rewind button

Post#3 » 25 May 2017, 22:27

That's already on the roadmap request list:
https://trello.com/c/8xotQjRJ/233-more-video-controls

Captain Spock (Castlevania)
Automaton
Automaton
Posts: 177

Re: Rewind button

Post#4 » 26 May 2017, 01:15

An easy implementation--two new buttons:
1. Set a playback point A.
2. Go back to point A.

User avatar
Kanishka
Skynet
Skynet
Posts: 1421
Contact:

Re: Rewind button

Post#5 » 26 May 2017, 08:18

Castlevania wrote:An easy implementation--two new buttons:
1. Set a playback point A.
2. Go back to point A.


Not as easy as you think. The match is computed in real time; we are not watching a video, that we can playback, rewind, and skip. The computation might be tricky for rewind.
Fixes break an AI more than bugs do. :ugeek:

Gladiabots Off-Topic Chat


My Stats: Kanishka_RN3;Kanishka_MiPad

pier4r
Skynet
Skynet
Posts: 3390

Re: Rewind button

Post#6 » 26 May 2017, 12:59

Kanishka wrote:
Castlevania wrote:An easy implementation--two new buttons:
1. Set a playback point A.
2. Go back to point A.


Not as easy as you think. The match is computed in real time; we are not watching a video, that we can playback, rewind, and skip. The computation might be tricky for rewind.


Indeed, it is not easy at all (someone could point me a debugger of a real programming language that goes back). But with the couple headless computation + breakpoint one could reach the breakpoint quickly having the headless computation computing quickly all the intermediate parts.
http://www.reddit.com/r/Gladiabots/wiki/players/pier4r_nvidia_shield_k1 -> Gladiabots CHAT, stats, insights and more ;

Captain Spock (Castlevania)
Automaton
Automaton
Posts: 177

Re: Rewind button

Post#7 » 26 May 2017, 14:37

Kanishka wrote:
Castlevania wrote:An easy implementation--two new buttons:
1. Set a playback point A.
2. Go back to point A.


Not as easy as you think. The match is computed in real time; we are not watching a video, that we can playback, rewind, and skip. The computation might be tricky for rewind.


What I mean is not a reverse computation, which is certainly impossible. What I mean is that when button 1 is pressed, save all the current data, and reload these data when button 2 pressed. For the internal model, it should be easy. For the animation, I don't know.

pier4r
Skynet
Skynet
Posts: 3390

Re: Rewind button

Post#8 » 26 May 2017, 15:38

Ah that is a nice idea, like having a snapshot of the current situation.

It should not be impossible. Sure, if someone wants to go a bit back (say, "oh at 3.40 should be the action I want to debug, ah no it is 3.35") then one has to compute all again.

If headless computation is introduced, one can have the same with like a blank screen and just the timer (so one sees how the computation is proceeding but very fast) and then with the timed breakpoint the 3d graphics appears again and the game is paused, so the player can decide the debug speed from there on.
http://www.reddit.com/r/Gladiabots/wiki/players/pier4r_nvidia_shield_k1 -> Gladiabots CHAT, stats, insights and more ;

User avatar
GFX47
Dev
Dev
Posts: 2914

Re: Rewind button

Post#9 » 26 May 2017, 17:06

The game uses a deterministic system.
It means that having a given initial game state (bots positions, AIs and classes) at T0, it can compute the state of the game at any Tx time by executing all the "turns" between T0 and Tx.

Right now the game is only computing a few turns per frame.
When rewinding the match to a specific Ty time, the game has to execute all the turns again from T0 to Ty.
It is not impossible but it will need coding and testing (indeed, especially on the animations) to make it work properly.
It will also require a lot more CPU (could be heavy on mobile) so rewinding will not be instant.

If you played Starcraft, you may have noticed the same kind of effect when jumping to a specific time in a replay.

User avatar
LuBeNo
Autonomous Entity
Autonomous Entity
Posts: 532

Re: Rewind button

Post#10 » 26 May 2017, 19:01

GFX47 wrote:When rewinding the match to a specific Ty time, the game has to execute all the turns again from T0 to Ty.

I would recommend to create a full backup of the current game state every N seconds (perhaps 15 or 30 is a good value for N). To calculate T97 you only need to execute from T90 to T97.

Questions to find N: How much time does a full backup last? (Is there a noticeable delay in playback) How much memory space do all backups together need.
Image
My algorithm of life: if(self.tired) sleep(); else if(self.hungry) eat(); else follow(Jesus);

Bockwurst
Script
Script
Posts: 25

Re: Rewind button

Post#11 » 27 Sep 2018, 19:20

LuBeNo wrote:I would recommend to create a full backup of the current game state every N seconds (perhaps 15 or 30 is a good value for N). To calculate T97 you only need to execute from T90 to T97.

I'd like to request this feature to improve the loading times for rewind.
The time it takes to rewind on mobile just as the game is about to finish is enough to play another game

User avatar
GFX47
Dev
Dev
Posts: 2914

Re: Rewind button

Post#12 » 27 Sep 2018, 19:42

Huge workload, low priority, sorry.

Bockwurst
Script
Script
Posts: 25

Re: Rewind button

Post#13 » 27 Sep 2018, 23:07

Low priority is totally fine! Just thought you might want to put it on a long-term to-do list :D

User avatar
GFX47
Dev
Dev
Posts: 2914

Re: Rewind button

Post#14 » 28 Sep 2018, 07:55


Bockwurst
Script
Script
Posts: 25

Re: Rewind button

Post#15 » 28 Sep 2018, 09:01

<3

Return to “Feature Requests”

Who is online

Users browsing this forum: No registered users and 1 guest