Toribash
Original Post
About the replay format
Well.. I don't have any idea about how the replays get saved. All I know is that it's very glitchy. I think it stores the position of the body parts and which joints are contracted or extended and in which frames those things happen (judging by the glitched replays).
I think that it would work better if the replay file stored only the "joints information" of each player and the key frame number (the frame the player can interact) in which the movement started, since everytime we start a replay the dummies are "reset" to their initial stances.
Of course the file will need a header to keep the additional info, like the version of the game, the name of the players, the total number of frames, the number of frames per turn, and maybe even the date when it was saved.
This is how an emulator movie file works, and I think this should work for Toribash too.
Re: About the replay format
Hi Pirate.

The file format needs to have some sync information (those are the lines starting with, POS, QAT, LINVEL, ANGVEL). This is due to different floating points calculations on different CPUs.

It is possible to remove all those lines in a .rpl and only have joint/key/grip/break information left. Toribash will still play the replay in unglitched format.

Updating any physics parameter in a new toribash releases will effectivly render old replays glitchy.

<1.94 multiplayer replays had glitches on dismemberments (almost all the time). This should be fixed in 1.94. If you still get glitchy MP replays, please send one to me and I'll try and find out what is wrong.

the first lines in the .rpl file format has some header info.
#!/usr/bin/toribash
VERSION 5
FIGHT 0; acrobatics Ephphatha uke
AUTHOR 0; Ephphatha
NEWGAME 0; 500 10 0 0 0 2
Then there is joint information
FRAME 10; 0 0
JOINT 0; 5 1 8 1
Date and a proper info on what version of Toribash it was made on might be good to add.

Some one suggested adding chat info to the replay format too. You think that would be good?


Re: About the replay format
Originally Posted by hampa
Updating any physics parameter in a new toribash releases will effectivly render old replays glitchy.

Could that bit be solved by always using a .phy-file, and having the replay-files store what physics-file is being used? (eg. v1.94 defaults to using 194.phy, and 194.phy is included with v1.95 even tho v1.95 defaults to 195.phy, so that the v1.94 replays are still using their "own" parameters)
Re: About the replay format
oh, yeah, yeah.. the chat thingy is a good idea too. And if it is possible, the .phy replacement sounds nice. Maybe that info could be included in the header too, so the proper physics file should be loaded for each replay.
Re: About the replay format
server should be the arbiter of positions and fp values should be the same for all players; if the target cpu doesn't do enough precision maybe you should cache the local intermediate frame calculations using software fp? doesn't seem like it'd be necessary.

also, replays should store the player names.