The online racing simulator
LFS Replay Control
(18 posts, started )
#1 - Cargo
LFS Replay Control
Hi all,
Every few weeks I'll tear around the net in frustration as again I sat at the keyboard, fingers dancing, while I try to capture the right moment or camera angle from a spr/mpr.
I am SOO in need of some more control of the Replay.
I just don't have the single-student time available now that I'm working-married.
I just stumbled upon an interview at m4driving.it with S2 insider Victor van Vlaardingen
http://www.m4driving.it/article/8/13294.html

It confirmed my worst fears (sic)
----
D: Will there be any replay control (actually u can't rewind them of a few secs for example)?
V: not when S2 is released, so maybe later. It's kind of hard to rewind lfs replays, because every ai (and well, any car basically) in a replay has a 'current state', which changes all the time. Like, an ai is learning all the time, and because a replay is really live, its states keep changing during a replay this has the effect that rewinding is not a simple matter of rewinding some frames, but the state of every car has to be rewound, which is the hard part
----

Might be old news for some of you, but I just wanted to share.
LFS Replay Control
I totally agree with you. The LFS Replay Control is horrible.
When Victor says it's a hard task to improve the controls, I have to believe him. The point for me is, that if it is that hard to implement further control into the replays, maybe one should start thinking about a new way to store the replays. Obviously the whole replay-system is not technically matured by now.

In addition to that, I really would appreciate if there would be a program which only allows to watch replays (even without a S2 license) in a comfortable way . I think this has already been suggested elsewhere in this forum.

-= HP =-
Yeah, basically as I understand it at the moment, the spr/mpr records all the control inputs to the physics engine, and the replay just re-simulates the entire race based on the recorded control inputs. So the only 'saved state' is the start, which means the only way to go backwards is to re-simulate the whole thing from the beginning again.

This is obviously an enormously space efficient way of saving replays, as you only have to record a few values for each car.

I guess a solution would be to start saving the total race state every lap, or every sector say, so that you can immediately skip forwards or back to any of these 'saved' points. It would increase the file size to some extent, but presumably not too drastically depending on how often you saved the state.
As colcob has said, and Scawen has also discussed, saving points so that you can rewind is possible, and has been on the cards. Whether it will be implemented, is another question.
Yeah there is a lot on the list at the moment. But hey, japanese characters eh? thats something to look forward to.
Maybe an easy solution for the problem would be a program (or a feature in S2) that allows converting a replay to another format, which only stores the necessary information (i.e. no telemetry data) needed for a simple, TV-like review of a race.

What about that? Wouldn't that be an option?

Edit: Another thing is, if only the inputs are stored, what happens, if the physics of the game changes? Then, if I watch an old replay, it would be possible that some cars hit the gras and get wrecked, only because of the new physics. This would lead to wrong race-results and to absolute chaos!
Quote from HorsePower :Edit: Another thing is, if only the inputs are stored, what happens, if the physics of the game changes? Then, if I watch an old replay, it would be possible that some cars hit the gras and get wrecked, only because of the new physics. This would lead to wrong race-results and to absolute chaos!

Replays become incompatible.

Having stored absolute values now and then would be good, as not only would we be able to skip back... but skip forward too. Also we could press j or something and get a list of the timeframes of all the stored points, and just pick one and go from there. Would make it very easy jump large timeframes of a replay then.
Maybe its a good time to emerge this topic.
Is there any plan to put a "jump to lap" or something?
Thanks in advance.
Quote from Kashopi :Maybe its a good time to emerge this topic.
Is there any plan to put a "jump to lap" or something?
Thanks in advance.

exactly what I thought when I read Bobs reply.
Quote from Bob Smith :Having stored absolute values now and then would be good, as not only would we be able to skip back... but skip forward too.

But physics changes will still make those replays incompatible.

The best way imho would be what HorsePower suggested: convert the spr and mpr replays into a different format, which should be a log of the game state (as opposed to a recording of inputs). Then you would have a rewindable replay, and it would also be immune to physics changes.

A rewindable replay also has downsides: its file size is larger, and the recorded state is simplified, so it would be less useful for analysis.
So, is this state of the car thing true for mpr's as well? After all in mpr's you get a lot of network drop and cars jumping around. So is that positional data then, or just a lossy form of car state?

I know it would be weird if spr and mpr would have different replay behavior, but if mpr's would be easier to convert to rewindable, i think people would be quite willing to accept that. I know most of the replays i watch are ones where i want to see what other people were doing when i was doing X.

Also, is it just my hardware or does everyones machine drop back to 1x after a couple of seconds of trying to run at 4x or higher?
So how are the way LFS handles replays different than ISI sims or something. In a worst case scenario, are we just looking at massive replay sizes? How much space are we talking here? I think most of us have big enough hard drives. Still not clear on how other sims do it and why it's a challenge to implement in LFS.
Quote from sdether :Also, is it just my hardware or does everyones machine drop back to 1x after a couple of seconds of trying to run at 4x or higher?

It's not just you.
Mine copes with sustained 16x, but jumps back after 32x
Yeah, good point about the MPR's. As far as I know, a packet in an multiplayer race consists of a position update for each car and its current controller positions. Then the physics engine simulates the next 1/4 seconds based on those controller positions until a new position update comes in, then it teleports the car to that position and carries on simulating. This is the cause of the little jerks you see.

I suppose the problem is that all the packets for each car aren't synchronised, so to 'rewind', you'd need to find the packet with the nearest time stamp to the desired point in time T, start simulating that car up till the next packet comes in, then start simulating that car, and so on and so forth until you've received 1 packet from each car.

There is a problem with that though. Because each car doesnt 'appear' until its first packet arrives after time T, you could miss out on simulating something that would have happened if the car was there.

Say two cars collide at T+0.2 seconds. Car A sent a packet at T-0.1 and T+0.1, but car 2 sent packets at T-0.1 and T+0.3.
The sim starts simulating from T, Car A appears at T+0.1, and the collision that would have happened at T+0.2 doesnt, because the packet from car 2 hasnt been received yet. Then at T+0.3 car 2's packet arrives and the car appears.

Now I guess in theory, if every packet contains the position as it happened, then it will sort itself out after a packet or so from each car, but I'm not really sure about that.
Papyrus sims have the best replay system I've used. You have full control from frame-by-frame to 16x in either direction, plus they're very smooth, even for multiplayer. The game recors full 6DOF postion of each car for every frame, plus at least in NR2k3, it stored some data for telemetry analysis as well. Of course, the size... An online race of 10 driver with a half hour of practice and then a 45 min race could easily be a 70+MB file. The same thing in LFS is 4MB...

Frankly I'd rather have the control than tiny files, but I suppose the LFS, and most other developers, disagree. :/
Quote from tristancliffe :Mine copes with sustained 16x, but jumps back after 32x

My PC bogs down at 4x (not suprisingly; it's getty a bit dated).

That's another consequence of the replay design: LFS _must_ do all physics calculations again to show the replay. With a snapshot-based replay, you can fast-forward by simply skipping the next x frames.

Quote from Ayrton :Papyrus sims have the best replay system I've used. You have full control from frame-by-frame to 16x in either direction, plus they're very smooth, even for multiplayer. The game recors full 6DOF postion of each car for every frame, plus at least in NR2k3, it stored some data for telemetry analysis as well.

It's been that way since GPL. You can load the replay directly into a replay analyzer, and see oil temp, tyre pressure, G forces and all. No need to generate a RAF file first, like in LFS.

LFS Replay Control
(18 posts, started )
FGED GREDG RDFGDR GSFDG