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

Demo bug in prboom?

Recommended Posts

I've had some spare time recently and since writing built demos gets boring I thought I'd make my own little doom camera program. The idea is basically you load a demo, select a point to play to, then you can walk around and take a screen shot. I used Andrey's prboom226_6 source for the modification.

All worked fine until I got really frustrated at having to close and reopen the program to go to a previous point in a replay so I made it so that it could replay the demo from the beginning up to any given point repeatedly. This works for the most part except in some longer replays such as 30uv1441 or 30nm2956 there will be a certain point in the replay where some 'random' event occurs causing the replay to desync. However it ONLY happens on the second+ replay tries and even then sometimes it will play correctly and sometimes be on any of up to 4 other replay paths as it were. Even stranger if I constantlly play the demo to the same point it'll after the second time fix itself to one particular outcome, and it'll always be the same outcome even if I run the demo to various other points and then come back.

I'm not sure how good a job I did of explaining that and I'd put up the source code / exe if I had access to it atm unfortunately away from home for a bit but that's what happens. Instead I can only give some details on the method I use. All I've done is modify the D_DoDoomLoop to stop at the tic I request and then goes into a 'call D_Display' only loop so I can walk around, then it will either exit or call D_DoLoadGame to reload the replay and then play to the next tic I've requested. I'm guessing that prboom isn't compatible for playing multiple demos in a single running, but it'd be really cool if I could fix this unfortunately I simply have NO idea how such a weird bug could come about. I know something must be carrying over since the last run since you can repeatedly go to the same point and get the same either right or wrong result but go one tic further and you've got something that could be rather different.

Share this post


Link to post

I am pretty sure that Budko's prboom has already a camera ... I think the alt key triggers it.

It has 3 modes :
- player view
- camera stays on player but you can control the angle
- free camera, you are free to move like a player

Share this post


Link to post
VinceDSS said:

I am pretty sure that Budko's prboom has already a camera ... I think the alt key triggers it.

It has 3 modes :
- player view
- camera stays on player but you can control the angle
- free camera, you are free to move like a player

That is true but as I said restarting prboom to either go to an earlier point or do a different replay got very annoying. I am actually using budko's camera when the game is 'paused'

Share this post


Link to post

Just a guess, but perhaps the RNG isn't being reinitialized correctly. Or the gametic counter (whatever it's called) - I recall Donce mentioning that the gametic number is used to determine whether revenant missiles are homing or not.

Rather than doing a lot of programming, it would seem simpler just to set up a more efficient way to launch the program quickly (clever batch files, or whatnot).

BTW, it doesn't seem quite right to call this a bug in Prboom, given that neither the Prboom team nor Andrey Budko had claimed it could be used in this fashion (i.e. demos reloaded without a restart of the program itself).

Share this post


Link to post

Yes I rather suspected this seems to work must of the time, just not always. For example 30uv1441 works till about level 13 or 14 I can't remember which. You are right however, just calling prboom each time would be easier/faster so I'll probably just do it that way when I get around to it. Still grates on me that prboom won't do it, I'll take a bit of a look around, see what I can find

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
×