Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Ladna

democomp: demo state dump comparison tool

Recommended Posts

Hey guys. It's me, Ladna. I made a thing to help preserve demo compatibility: https://github.com/camgunz/democomp.

Here's how you use it. You pick a source port. You hack this "state dump" thing into it, and then you do something like prboom-plus -fastdemo superrun.lmp -dumpdemo prbsr.bin. Then in your cool, "hyper-advanced" source port, you do the same thing (for example, d2k -fastdemo superrun.lmp -dumpdemo d2ksr.bin).

Then you run democomp on it, like democomp prbsr.bin d2ksr.bin. If democomp finds a discrepancy, it will give you a lot of good info, like what's different (player->weaponowned 1 2, for example, meaning player 1, weaponowned 2), the TIC at which it happened, and the different values. If there are no discrepancies, democomp keeps its trap shut. No news is good news.

democomp has already been helpful; I used it to find a desync of my own. I converted dboolean to bool, but weaponowned was still ints (because hey, dangerous ass stuff in the status bar code), and I was only memset'ing it with sizeof(bool). Super bad. Thanks democomp!

Which leads me to my next point: I've already hacked this into PrBoom+: https://github.com/camgunz/prboom-plus. That's how I used it.

Some of you may remember discussing something like this in this thread: https://www.doomworld.com/vb/source-ports/71004-reasonable-subset-of-demo-compatibility-checking/. democomp is exactly that.

Share this post


Link to post
Linguica said:

Is this compatible with Brutal Doom?

sorry


Currently democomp only handles dumps from Brutal Dook.

Share this post


Link to post

Good job, Ladna! I built something very similar when working to get MochaDoom vanilla demo-compatible, called SyncDebug. I took a brief look at your source and it looks like it uses a very similar concept.

It's an awesome way to understand exactly what's happening in the AI each tic. I was going to create a web page documenting my SyncDbg process and hosting the source.

I'll eventually get to it, when I get some time. Anyway, good job! I hope it's helpful to those people struggling with getting their demos to play.

By the way, this type of technology is equally useful for resolving many network sync issues.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×