Page 1 of 2

Revenants homing missile- can the behavior be recorded?

Posted: Fri Oct 27, 2006 11:27 pm
by DoomRater
I'm not too familiar with how the revenant records its homing missile attacks, but I was wondering if this was a possible desync issue in both demos AND network games. I believe currently it is not recorded into demos, and I'm wondering if that could actually become possible later on down the road.

Posted: Sat Oct 28, 2006 6:04 am
by Enjay
It certainly used to be a problem way back with doom2.exe demos. I don't know if it was the homing nature itself that was the problem or whether it was the randomness of the homing (sometimes they home, sometimes they don't). Anyway, whenever I recorded a doom2.exe demo that included a revenant, they would go out of synch on playback pretty much everytime I came across a revenant firing. :?

Posted: Sat Oct 28, 2006 6:13 am
by Graf Zahl
The desync was caused by using an improper timer to decide whether to home or not. That value was not guaranteed to be consistent. The bug has been fixed in at least all Boom compatible source ports.

Posted: Tue Oct 31, 2006 4:11 pm
by Siggi
Funny you should say you had the problem with Vanilla Doom2. Afaik revenants are not one of the many reasons which cause desyncs in vanilla demos. I certainly have seen enough vanilla demos with massive revenant activity to prove this.

I have, however, seen this issue in earlier ZDoom demos.

Are you perhaps talking about earlier vanilla versions?

Posted: Wed Nov 01, 2006 1:14 am
by Graf Zahl
Sure they are. The homing is based on the global timer which is not recorded. Somewhere in Boom's source or accompanying files there's some information about it.

Posted: Wed Nov 01, 2006 11:44 am
by Hobbs
Graf, lets face it, you know a lot about ZDoom, but you completely fail knowledge of vanilla.

Yes its based of a global timer that isn't recorded. This timer starts when the level starts and works the same way every time, so really it doesn't need to be recorded as its the same timer every time. Nor can a desync occur this way because its the same timer every time.

It might have been a problem back in 1.666, what with its more hardware dependant code, but that would be the only place.

Posted: Wed Nov 01, 2006 11:57 am
by Graf Zahl
All I can judge is the Linux source. And at least there it's wrong. The variable in question is never reset to 0 so all it counts is the tics from when the game started for the first time. This may be correct for the first level that is started but after that there's a 50% chance that it will desync.

Posted: Wed Nov 01, 2006 12:01 pm
by Hobbs
Whoops it is indeed when the game starts. I'm so used to one level demos that I had a bit of a slip.

However I fail to see even with it starting when the game starts how there is a 50% desync chance after the first map played.

In fact, I don't even want to know. There are tonnes of more-than-one level demos out there recorded with vanilla (see for instance the compet-n) and I have never heard of such issue in the demo community, something I'm sure would have cropped up at some point.

Posted: Wed Nov 01, 2006 2:23 pm
by Graf Zahl
You are forgetting one rather common situation: The demo loop at the start of the game!

Posted: Wed Nov 01, 2006 2:27 pm
by Hobbs
Remind me again how people start demos (recording or playback) in vanilla ingame. Owait you can't.

Posted: Wed Nov 01, 2006 2:30 pm
by Graf Zahl
In the demo loop they start automatically - one after another. Isn't that enough?

Posted: Wed Nov 01, 2006 3:36 pm
by Hobbs
k I dunno how it works in ZDoom, nor do I really care, but in vanilla, or choco, or pr, if you start from the command line using -warp the DEMOx lumps, along with the rest of the title stuff are ignored by the engine. It just starts you in that map. And even if there was a part where the titlescreen crap entered into it (which there isn't) there still would be no problem as the first demo doesn't start until a few seconds into the title screen, which logically would also be (and is) when the counter starts.

Thusly, under vanilla, the timer for revenants always starts at the very beginning of the map specified by -warp when recording a demo. And amazingly enough it starts at the same point in demo playback.

The end.

Posted: Wed Nov 01, 2006 3:38 pm
by Graf Zahl
Arrrggghhh!

Have you ever had the idea to replace a demo in the loop? :?

Posted: Wed Nov 01, 2006 4:00 pm
by Hobbs
No not really. That doesn't mean you arent wrong.

Instead of bothering to look at the code I just started up Scythe (in vanilla) and waited for DEMO2 to come around. There are two revs in that demo prior to death, and between them they get a few shots off. However the demo somehow, through an act of god or some such, manages to stay in sync. Maybe erik just got really fucking lucky with the timer. But I doubt it.

Posted: Wed Nov 01, 2006 4:51 pm
by Enjay
OK, actual cases where I have seen the problem...

I recorded demos for some of my versions of NJDoom2 "back in the day". I replaced the DEMO1, DEMO2 and DEMO3 lumps with them. I would start Doom2 with my PWAD loaded and commonly found that, if I watched the demo loop, demos with revenants in them desynched after meeting the revenants and them firing.

I can't say for definite whether this was only with demos after demo1, nor can I say for definite which versions of doom2.exe it was but I am pretty sure it was all versions from 1.666 inclusive.

To cure the desynching problem, I would record demos on levels with no revenants, or ensure that I died before meeting one.

All this was quite some time before Zdoom even existed.