Weird impy thing
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Source Ports > "Runworthiness" of the linuxdoom code?
Pages (4): « 1 2 [3] 4 »  
Author
All times are GMT. The time now is 15:48. Post New Thread    Post A Reply
Maes
I like big butts!


Posts: 11791
Registered: 07-06



fawtytoo said:
Why does Final Doom: Plutonia demo3 go out of sync?


I'd like to know that too ;-)

The only demos that Mocha Doom plays correctly -to my knowledge- are DEMO2, DEMO3 and DEMO4 from Ultimate Doom, and maybe one or two from TNT or Plutonia.

Considering how it's also a straight derivative of the linuxdoom code, perhaps what's plaguing you right now might help me understand what's going on in general.

However, there are significative differences between the .exes used in UDoom/Plutonia/TNT, enough to cause desync on their own (and they are not codified in the linuxdoom code. Hell, not even the Episode 4 switch textures are!)

Old Post 01-15-12 15:47 #
Maes is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
shadow1013
Junior Member


Posts: 233
Registered: 08-10


I had the same issue with a port I made. I even had DEMO1 of DOOM2 de-syncing

Old Post 01-15-12 16:33 #
shadow1013 is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Gez
Why don't I have a custom title by now?!


Posts: 10709
Registered: 07-07


I'd suggest first looking if these demos desync as well in PrBoom+ and/or Chocolate Doom (pretty sure they don't), then looking at the source code from these ports, grepping through them for compatibility code.

Old Post 01-15-12 16:53 #
Gez is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
natt
Junior Member


Posts: 248
Registered: 05-11


A lot of the basic sync fixes are from early PrBoom, so you could look through changes in that for some tips.

Old Post 01-15-12 17:25 #
natt is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
fawtytoo
Mini-Member


Posts: 51
Registered: 09-11



Maes said:


I'd like to know that too ;-)

The only demos that Mocha Doom plays correctly -to my knowledge- are DEMO2, DEMO3 and DEMO4 from Ultimate Doom, and maybe one or two from TNT or Plutonia.

Considering how it's also a straight derivative of the linuxdoom code, perhaps what's plaguing you right now might help me understand what's going on in general.

However, there are significative differences between the .exes used in UDoom/Plutonia/TNT, enough to cause desync on their own (and they are not codified in the linuxdoom code. Hell, not even the Episode 4 switch textures are!)


Only demo3 from Plutonia desync's with me. When I first compiled linuxdoom and enabled the demos, it's the only demo that had problems. Not sure why yours is worse.

Old Post 01-15-12 18:14 #
fawtytoo is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
fawtytoo
Mini-Member


Posts: 51
Registered: 09-11


It's also the only demo that gives me this error:
code:
Sector with more than 20 adjoining sectors

... and quite few times before the games quits. And I mean it quits properly.
Related?

Old Post 01-15-12 18:19 #
fawtytoo is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
fawtytoo
Mini-Member


Posts: 51
Registered: 09-11



fawtytoo said:
It's also the only demo that gives me this error:
code:
Sector with more than 20 adjoining sectors

... and quite few times before the games quits. And I mean it quits properly.
Related?


I found that problem, and seemingly unrelated.

Old Post 01-15-12 19:00 #
fawtytoo is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
shadow1013
Junior Member


Posts: 233
Registered: 08-10


YEAH I remember that error. Did vanilla final doom give off that same error?

Old Post 01-15-12 19:03 #
shadow1013 is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
fawtytoo
Mini-Member


Posts: 51
Registered: 09-11



Gez said:
I'd suggest first looking if these demos desync as well in PrBoom+ and/or Chocolate Doom (pretty sure they don't), then looking at the source code from these ports, grepping through them for compatibility code.

Already doing/did that. A lot to grep through. Neither CD or PrBoom have that problem, but comparing code with CD shows nothing obvious. It's strange how demo1 & demo2 are ok.

Old Post 01-15-12 19:31 #
fawtytoo is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
wesleyjohnson
Forum Regular


Posts: 937
Registered: 04-09


Demo sync is so bad on DoomLegacy that currently not even our own demo files will stay in sync. (Because I work on correcting demo play back, or in spite of it, I do not know anymore)
1. Errors are accumulative, the slightest bit difference eventually will be an effective disruption.
2. Random number generator
3. Extra uses of the random number generators.
4. Movement calculations, roundoff differences.
5. Application of friction.

The Demo file system is nearly useless across ports and needs to be
replaced with something that is robust. It is only the id games demos
and important WADS with demos that keep us trying to rescue this
system.

I have seriously been considering a self-correcting demo playback.
Of course this won't really work, but have been considering what
it would take.
1. Shooting: Player direction would be corrected for errors to hit the closest target.
2. Pushing a button or door would correct the player direction.
3. Dying in a demo would end the demo.
5. Allow user choice of raw demo or corrected demo playback.

Old Post 01-16-12 23:22 #
wesleyjohnson is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
fawtytoo
Mini-Member


Posts: 51
Registered: 09-11


I now have my own "maintained" version of LinuxDoom. It's not live yet as there's still plenty of stuff to fix. I'm also keeping it written in C.

I have 2 questions:

1. Currently, it uses an 8bit GC with an X window which requires dropping the display to 8bit also. What would be the "simplest" (for want of a word) way to have it display in 24bit? I tried a function to convert the colour indexes to 24bit colour using the palette. That worked, but only if you used the screen size multiplier (-2 -3 -4). At normal (320x200) size, some of the display was garbled (HUD, wipe).

2. How to deal with midi (or maybe audio in general)? I've dropped the sound server as it adds complications such as playing the correct sound from the correct wad. The internal sound seems to cope ok, albeit with a fast enough system. But I've not got any midi playback as yet.

I'm just looking for heaps of suggestions even if I have to write it myself.

Old Post 04-30-12 13:46 #
fawtytoo is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
fawtytoo
Mini-Member


Posts: 51
Registered: 09-11



wesleyjohnson said:
The Demo file system is nearly useless across ports and needs to be
replaced with something that is robust. It is only the id games demos
and important WADS with demos that keep us trying to rescue this
system.

I have seriously been considering a self-correcting demo playback.
Of course this won't really work, but have been considering what
it would take.
1. Shooting: Player direction would be corrected for errors to hit the closest target.
2. Pushing a button or door would correct the player direction.
3. Dying in a demo would end the demo.
5. Allow user choice of raw demo or corrected demo playback.


Option 3 here is viable and something I will implement. But what was option 4?

Old Post 04-30-12 13:53 #
fawtytoo is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
_bruce_
Senior Member


Posts: 1209
Registered: 11-07


Looking forward to your port 42.

Old Post 04-30-12 17:16 #
_bruce_ is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
fraggle
Filled with the code of Doom


Posts: 7303
Registered: 07-00



fawtytoo said:
I'm just looking for heaps of suggestions even if I have to write it myself.
Even if you don't want to use a recent version of Chocolate Doom you're probably still best off basing your code on a really old version - go back to something like v0.0.4 and you should get something with the basics fixed but still fairly close to the original linuxdoom code. If you don't want to even do that, you might find this helpful - it's the log of the first changes I made. Go through and cherry-pick the things you want for your own port.

If you want to do demo playback testing, you might want to look at statcheck, the automated testing system I wrote for Chocolate Doom that uses statdump.exe to compare the statistics output to the behavior from Vanilla Doom.

Old Post 04-30-12 17:50 #
fraggle is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
fawtytoo
Mini-Member


Posts: 51
Registered: 09-11


Cheers fraggle. I'm going to read your change logs. Weirdly though, demo3 of Plutonia now plays in sync. Not sure what I did, but the 2 changes I made since having that problem seem unrelated.

Old Post 04-30-12 20:15 #
fawtytoo is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
fawtytoo
Mini-Member


Posts: 51
Registered: 09-11



Gez said:
I'd suggest first looking if these demos desync as well in PrBoom+ and/or Chocolate Doom (pretty sure they don't), then looking at the source code from these ports, grepping through them for compatibility code.

I'm not convinced that compatibility is the cause.

I have a wad compiled using the Master Levels and included a demo lump for NESSUS. If I let the demo play normally as part of the Doom Loop, it goes out of sync. If I play the demo using -playdemo, it plays IN sync. If I have that demo as demo2 with another demo as demo1, the NESSUS demo is IN sync within Doom Loop too, but the other demo is... You get my drift.
This same scenario also goes out of sync with Chocolate Doom but IN sync with PrBoom.

I think it's more a question of timing.

Old Post 04-30-12 22:08 #
fawtytoo is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
kb1
Member


Posts: 280
Registered: 11-06



fawtytoo said:

I'm not convinced that compatibility is the cause.

I have a wad compiled using the Master Levels and included a demo lump for NESSUS. If I let the demo play normally as part of the Doom Loop, it goes out of sync. If I play the demo using -playdemo, it plays IN sync. If I have that demo as demo2 with another demo as demo1, the NESSUS demo is IN sync within Doom Loop too, but the other demo is... You get my drift.
This same scenario also goes out of sync with Chocolate Doom but IN sync with PrBoom.

I think it's more a question of timing.

Because of the implementation of the revenant tracer code (and maybe other places, can't remember now), and it's dependence on gametic, your demos must be started at the proper gametic. That's why -playdemo works, but it fails in the demo loop. TITLEPIC timing is also an area to check, because it also affects gametic, as does the pause key. Boom was the first codebase to attempt to address these things. Look for 'basegametic' (SP?) in Boom source to see how to begin to solve these tricky issues.

Basically, the fix involves "tricking" the game engine, so it believes that each demo is starting at the proper gametic (170 tics for Doom titlepic, 385 for Doom II).

Old Post 05-01-12 00:34 #
kb1 is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
fawtytoo
Mini-Member


Posts: 51
Registered: 09-11



kb1 said:
Because of the implementation of the revenant tracer code (and maybe other places, can't remember now), and it's dependence on gametic, your demos must be started at the proper gametic. That's why -playdemo works, but it fails in the demo loop. TITLEPIC timing is also an area to check, because it also affects gametic, as does the pause key. Boom was the first codebase to attempt to address these things. Look for 'basegametic' (SP?) in Boom source to see how to begin to solve these tricky issues.

Basically, the fix involves "tricking" the game engine, so it believes that each demo is starting at the proper gametic (170 tics for Doom titlepic, 385 for Doom II).



The pagetic for TITLEPIC (Doom II) shows as TICRATE * 11 (35 * 11 = 385). After some trial and error TICRATE * 9 makes my Master Level demo run in sync perfectly (TICRATE * 1 also works).

Old Post 05-01-12 14:50 #
fawtytoo is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
kb1
Member


Posts: 280
Registered: 11-06



fawtytoo said:


The pagetic for TITLEPIC (Doom II) shows as TICRATE * 11 (35 * 11 = 385). After some trial and error TICRATE * 9 makes my Master Level demo run in sync perfectly (TICRATE * 1 also works).

Heh, try (TICRATE * 9) - 4 and see if that stays in sync too.

Old Post 05-02-12 01:19 #
kb1 is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
shadow1013
Junior Member


Posts: 233
Registered: 08-10


fawtytwo, I have some really good system interface code with X11 and some midi playing code that I never really did test due to the failures of my system. If you would like I could send it to you... The only difference being that it was written for Hexen, but it is otherwise compatible

Old Post 05-02-12 02:24 #
shadow1013 is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
fawtytoo
Mini-Member


Posts: 51
Registered: 09-11



kb1 said:
Heh, try (TICRATE * 9) - 4 and see if that stays in sync too.

In fact, the only ones that work are 1, 5, 9, 13, & 17. There is a definite pattern there.

Old Post 05-02-12 10:00 #
fawtytoo is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Gez
Why don't I have a custom title by now?!


Posts: 10709
Registered: 07-07


The revenant tracer code is basically dependent on gametic%4. See explanation here; this page is valid for vanilla too.

Old Post 05-02-12 11:05 #
Gez is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
kb1
Member


Posts: 280
Registered: 11-06



fawtytoo said:

In fact, the only ones that work are 1, 5, 9, 13, & 17. There is a definite pattern there.

Yep, as Gez says. So, back to the TITLEPIC thing, that timing has to be done correctly. Make sure you're detecting Doom vs. Doom II TITLEPIC timing, as it sounds like you've got them reversed. That would explain why -playdemo works, but waiting for the demo at startup does not. Can't remember now, but I recall that there was something flakey about the code that made it get the TITLEPIC timing wrong in a lot of cases. Hope that helps.

Old Post 05-02-12 21:28 #
kb1 is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
fawtytoo
Mini-Member


Posts: 51
Registered: 09-11



fraggle said:
If you want to do demo playback testing, you might want to look at statcheck, the automated testing system I wrote for Chocolate Doom that uses statdump.exe to compare the statistics output to the behavior from Vanilla Doom.

Is there a Linux version? I don't use Windows.

Old Post 05-04-12 17:28 #
fawtytoo is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
chungy
Senior Member


Posts: 1809
Registered: 06-05


It's not a Windows program, it's a DOS one intended to be used in conjunction with vanilla Doom. You can run it inside DOSBox.

Old Post 05-04-12 18:47 #
chungy is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
fawtytoo
Mini-Member


Posts: 51
Registered: 09-11



chungy said:
It's not a Windows program, it's a DOS one intended to be used in conjunction with vanilla Doom. You can run it inside DOSBox.

But I can't run my port in DOSBox. I've written it for Linux.

Although, thinking about it, I could write my own seeing as I program.

I guess -statcopy is passed a memory location where the stats will be copied to. Yes?

Old Post 05-04-12 19:15 #
fawtytoo is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
fawtytoo
Mini-Member


Posts: 51
Registered: 09-11


In the code, Plutonia & TNT are only referred to twice: for map name strings & title name strings. Are there any differences between Doom2 and Final Doom in the game engine?

Old Post 05-06-12 16:48 #
fawtytoo is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Gez
Why don't I have a custom title by now?!


Posts: 10709
Registered: 07-07


Yes, teleporters and lost souls.

Old Post 05-06-12 17:44 #
Gez is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
_bruce_
Senior Member


Posts: 1209
Registered: 11-07



fawtytoo said:
In the code, Plutonia & TNT are only referred to twice: for map name strings & title name strings. Are there any differences between Doom2 and Final Doom in the game engine?


Except for Lost Soul bounciness it quasi identical as far as I "know".

p.s.: forgot about the teleport behavior being different.

Old Post 05-06-12 17:44 #
_bruce_ is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
fawtytoo
Mini-Member


Posts: 51
Registered: 09-11



_bruce_ said:


Except for Lost Soul bounciness it quasi identical as far as I "know".

p.s.: forgot about the teleport behavior being different.


The Lost Souls behaviour was fixed in the released code.

But otherwise these are both bugs/errors and not differences, that is, not intentional.

Old Post 05-06-12 18:12 #
fawtytoo is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 15:48. Post New Thread    Post A Reply
Pages (4): « 1 2 [3] 4 »  
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Source Ports > "Runworthiness" of the linuxdoom code?

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Message Board Statistics