Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
data format of replay file (vdr)
06-20-2011, 12:01 PM,
#1
data format of replay file (vdr)
Hi, I am confused with the data format of the replay file (*.vdr), which is useful for me to get the historical data of the game. But I did not find the file structure in the website. And when I check the cpp source code, no detail commends are provided.
So, may I ask if anyone could help to explain the data format of the *vdr files? Thanks~
Reply
06-20-2011, 03:08 PM,
#2
 
Quote:did not find the file structure in the website
It's an internal format. I don't think it was ever meant to be used outside of vdrift.

The format should be clear if you look into the Serialize functions of the involved classes.

Something like:
Code:
    version_info.Save(outstream); //REPLAYVERSIONING
    _SERIALIZE_(s, track);
    _SERIALIZE_(s, cartype);
    _SERIALIZE_(s, carpaint);
    _SERIALIZE_(s, carfile);
    _SERIALIZE_(s, carcolor_r);
    _SERIALIZE_(s, carcolor_g);
    _SERIALIZE_(s, carcolor_b);
    s.Serialize("inputframes", newinputframes);//std::vector <INPUTFRAME> 90 fps
    s.Serialize("stateframes", newstateframes);//std::vector <STATEFRAME> 1 fps
Look into REPLAY::RecordFrame(const std::vector <float> & inputs, CAR & car).

If you are interested in certain parameters I think the driver-training branch has some advanced logging facilities, I've not looked into the code though.
Reply
06-28-2011, 10:59 AM,
#3
A Question About VDrift Replay Files
Hi,
There is a problem,
In replays folder, there are some files by the name of 1.vdr. Inside of the file: there are some text commands related to the type of car and some binary codes that it seems to be related to the actions of the drivers during the game, for instance: the timing of the stop or turn to right or left or ...
I want to open these binary code and convert them to meaningful value.
would you please help me about that ?
Best
Reply
06-30-2011, 07:30 AM,
#4
 
Please read the post above yours. Use the REPLAY class to read/write vdr files.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)