Forums
Replays ... carfile - Printable Version

+- Forums (https://www.vdrift.net/Forum)
+-- Forum: Project (https://www.vdrift.net/Forum/forumdisplay.php?fid=4)
+--- Forum: Development (https://www.vdrift.net/Forum/forumdisplay.php?fid=9)
+--- Thread: Replays ... carfile (/showthread.php?tid=1386)

Pages: 1 2


Replays ... carfile - fudje - 12-03-2010

The carfile variable doesn't seem to do anything right now except for consistently making replays fail. So I deleted a bunch of code, which made replays work. Might be better to just ignore carfile instead of deleting it entirely like I did, but:

https://github.com/fjwhittle/vdrift/commit/59ac3f9f100737a5278e109021f1bbd988107e31


- NaN - 12-04-2010

Haven't looked that much into the replay implementation, but isn't the carfile containing the car config data?
By the way, for me replay fails already on framerate comparison trying to compare two floats.


- fudje - 12-04-2010

Yeah, I was expecting all sorts of weird stuff to happen when I commented out the checks for it first time through, but it loaded the replay with the correct car file and even the appropriate color instead of what it was doing before, which was bitching about not being able to find any wheel parameter in the first included config file.


- NaN - 12-05-2010

Okay, will look into it asap.


- joevenzon - 12-05-2010

I'm going from memory here, but the carfile variable in the replays isn't just a filename, it's the contents of the entire carfile. The idea is that if people record a replay with their car setup a certain way, then tweak their suspension stiffness or something, they should still be able to play their original replay without it playing weird because the stiffness is different. A better solution would have been to serialize the car's entire initial state including constants.


- charlieg - 12-06-2010

joevenzon Wrote:I'm going from memory here, but the carfile variable in the replays isn't just a filename, it's the contents of the entire carfile. The idea is that if people record a replay with their car setup a certain way, then tweak their suspension stiffness or something, they should still be able to play their original replay without it playing weird because the stiffness is different. A better solution would have been to serialize the car's entire initial state including constants.
Shouldn't the replay be purely location/rotation based? I mean... do you really want to re-simulate all the physics again?


- joevenzon - 12-06-2010

Running the physics again is the easiest way to get all of the tire smoke, engine sounds, HUD, input graph, and so on to work during a replay. It also gives the most accurate prediction between keyframes (which snapshot position/rotation/etc), which allows the keyframes to only be stored at 1 second intervals.


- joevenzon - 12-12-2010

A couple of things were mentioned in the IRC chat about replays: 1) replays aren't working at the moment (which is what fudje is saying in his forum post above, I believe; 2) replays have sync issues.

So I can see the sync issues, but replays definitely aren't broken. I didn't need to touch any of the carfile code and they work fine. Were you trying to play a replay that you recorded with an older version of VDrift? The changes to the car file format may have broken old replays. I'll increment the replay version number....


- NaN - 12-12-2010

I've fixed the loading some time ago. Will be working on the replay synchronization bug.


- thelusiv - 12-16-2010

There was a question as to whether the replays worked in the 2010-06-30 release. I just tested it, they did.

Any idea how long it will take to fix the synchronization issues NaN? No rush, just curious.


- joevenzon - 12-17-2010

The sync issues shouldn't hold up release. They're not that bad and they've been around for a while.


- NaN - 12-17-2010

Quote:There was a question as to whether the replays worked in the 2010-06-30 release. I just tested it, they did.

You mean not only loading but also no state asynchronicity(car position, rotation jumps) after collisions? Will have a look.


- NaN - 12-17-2010

Quote:sync issues shouldn't hold up release
I have problems to get the serialization working under windows. The offending function seems to be ByteSwap. There is something fishy going on. Swapping unsigned int 10 two times returns 13. Happens with mingw/gcc and vc compiler. Will have to look into assembly, bleh.


- thelusiv - 12-17-2010

I don't have a good test case for async problems, but I didn't notice anything obvious playing a short replay. What makes the problems manifest?


- NaN - 12-17-2010

Drive into/collide with a wall.