intacowetrust Posted May 10, 2021 Creating this thread to document and publish some strange stuff I ran into recently for PSX Doom, which was discussed on the GEC Team Discord server. Maybe somebody else has noticed this before, not sure, but I'll throw it out there anyway... Perhaps some of you might know something or have an idea :) In PSX Doom sectors have a new field added for flags, similar to the flags field already present for linedefs and things. In the retail game just 1 bit (the lowest bit) of this 16-bit field is used, and it controls whether a sector uses reverb for its sound effects or not. Typically this is used to disable reverb in outdoor areas, when set. No other bits of the flags field are used in the retail machine code, as far as we can tell. For PsyDoom and upcoming versions of the GEC Master Edition we decided to repurpose one of these unused bits (the next one up, 0x2) to achieve a new effect similar to self referencing sectors on the PC. The new flag would enable 'invisible' floors, by making a floor render at the height of the lowest sector surrounding it. This would allow maps from say Plutonia, to be converted more faithfully to the PSX engine and enable invisible bridges like this one: Spoiler So this idea worked great initially, until I started testing some maps from the original game, and noticed things like this: Spoiler Oh no - the new invisible floor trick is being applied where we don't want it! So it turns out that some of the sectors in the original game were already using this flag (0x2) for some reason. To investigate further, I did a quick pass through both Doom and Final Doom and found it used in the following maps: Doom map usages (flag 0x2): 04, 05, 06, 07, 10, 14, 18, 21, 23, 28, 29, 33, 34, 35, 39, 41, 44, 45, 46, 47, 49, 50, 54, 55, 57, 58, 59 Final Doom map usages (flag 0x2): 06, 07, 08, 14, 15, 17, 18, 19, 20, 23, 24, 25, 26, 27, 28 Next, I thought well why not try the next bit up for the new flag we want to add, 0x4. Sure enough I found sector flag 0x4 used in the following maps in both Doom and Final Doom: Doom map usages (flag 0x4): 04, 05, 06, 07, 09, 10, 14, 18, 19, 27, 28, 29, 30, 33, 34, 35, 39, 41, 44, 45, 46, 47, 50, 54, 55, 57, 58, 59 Final Doom map usages (flag 0x4): 03, 06, 08, 14, 15, 17, 18, 19, 20, 23, 24, 25, 26, 27, 28, 29 So I kept repeating this experiment and searching for a single bit (out of the 16 available) in the flags field which WASN'T already in use in either Doom or Final Doom. Turns out every single bit in the flags field has at least one usage in either Doom or Final Doom. Perplexed by this, I applied a very quick hack to PsyDoom's Vulkan renderer to help visualize when these mystery sector flags are used. The hack colors sector floors and walls in a solid color, based on which flag bits are set. Here are some screenshots from various different maps showing where the mystery sector flags are used: Spoiler Very very strange... Some patterns I've noticed with these flags, is that they tend to be used a lot around key doors or keys but that's not always the case. For example in the "Unruly Evil" screenshot the torch light sector has the mystery flags set for some reason. "Club Doom" also has the flags set all over the place. Initially I thought the flags might have been some leftover from a feature that was abandoned earlier in development. Seeing that these flags were carried over to Final Doom and apparently very deliberately set throughout the maps makes me think otherwise, however. At a high level it seems like these flags might have been used for development purposes, but it's unclear exactly what their use was. Some ideas I had was that they were used for some sort of editor tagging functionality, or perhaps to offer hints to the nodebuilder on how to split up the map. It's also possible different bits of the flags field might have had very different purposes - which might further confuse the matter. Anyhow, that's a quick overview of what I ran into. A little bit of a mystery that maybe we'll never solve, but interesting nonetheless. Feel free to comment if you have any interesting theories! And of course if you want to play around with this visualization hack for PsyDoom and explore further, the code is here: https://github.com/BodbDearg/PsyDoom/blob/f7c35c4304913e40119ad4d48de9c3c0d7e5aeba/extras/psydoom_code_hacks/view_unknown_psx_sector_flags_hack.diff 13 Quote Share this post Link to post
Gez Posted May 10, 2021 Some of the PSX Doom devs have been around a few times, notably Tim Heydelaar (@Hyde) so perhaps if they're still around, they could perhaps help shed light on these mysterious flags. 3 Quote Share this post Link to post
omx32x Posted May 10, 2021 thats so weird but interesting i wonder what he real reason for these were 0 Quote Share this post Link to post
Azuris Posted May 10, 2021 Some of these Pictures could act as a Cover for some Doom Midi Album. 3 Quote Share this post Link to post
Dark Pulse Posted May 11, 2021 19 hours ago, Gez said: Some of the PSX Doom devs have been around a few times, notably Tim Heydelaar (@Hyde) so perhaps if they're still around, they could perhaps help shed light on these mysterious flags. I'd mentioned Tim in the GEC discord myself, but he hasn't been here in a good 1 1/2 years. But if anyone would know, it'd be him or Randy Estrella. 0 Quote Share this post Link to post
MattFright Posted May 11, 2021 On 5/10/2021 at 7:38 AM, Gez said: so perhaps if they're still around, they could perhaps help shed light on these mysterious flags. I wouldn't be too optimistic, at least through Doomworld. 0 Quote Share this post Link to post
Mattfrie1 Posted May 11, 2021 Hmm, I've always wondered why quite a few of these sectors (but not all of them) had their reverb effects missing when playing PSX Doom throughout the years, specifically the colored light key areas from the Jaguar port. Theory time, one thing in common of most of the sectors pictured are that they were newly created for the PSX port from their original levels. Most of them were done for colored lighting purposes around the doors and keys, but I find the one in the yellow key room of Map07 to be rather interesting. In the original Jaguar port that enclosure in the center of the room had completely solid walls, but the PSX Doom team went back and made it more like the PC original by putting the gap in the bottom of the wall. Also in Unruly Evil that torch light sector was newly created for the PSX port, the original map has the whole room as one sector. A lot of these sectors also have different lighting levels from their surrounding sectors as well to blend the colored lighting better, as evidenced from playing Saturn Doom which has no colored lighting to better detail the difference (Hey, I had to mention Saturn Doom at least once, right? :P). Spoiler This of course doesn't explain why the flags are used in the PSX exclusive levels though, plus for sectors that were clearly edited from their originals that don't have the flags set (Like the secret area with the yellow key door in E1M3). Perhaps it could have something to do with the lighting in some way? 6 Quote Share this post Link to post
intacowetrust Posted May 13, 2021 On 5/10/2021 at 11:07 PM, Dark Pulse said: I'd mentioned Tim in the GEC discord myself, but he hasn't been here in a good 1 1/2 years. But if anyone would know, it'd be him or Randy Estrella. Yeah who knows, maybe we'll get lucky and he might pop on at some point to explain - assuming he can recall that is... (it was a long time ago at this point) On 5/11/2021 at 9:03 AM, Mattfrie1 said: This of course doesn't explain why the flags are used in the PSX exclusive levels though, plus for sectors that were clearly edited from their originals that don't have the flags set (Like the secret area with the yellow key door in E1M3). Perhaps it could have something to do with the lighting in some way? Yeah something lighting related was one of the theories we discussed on the GEC Discord. There doesn't seem to be any definitive connection however between lighting and the appearance of the flags from what I can tell, or at least no consistent one. It does seem to occur a lot around key doors though, which often have colored lighting applied as a hint. What a strange mystery... Another (less interesting) theory might be that we are just looking at junk data which was not properly initialized. Maybe whatever editing tools were used just initialized that single bit that was used (for reverb) and the rest of the bits were left as garbage/undefined values. Perhaps the tools to import maps from the PC also tended to cleanly initialize/define the flags field to '0' so the garbage mainly occurred in new sectors that were edited after that? 4 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.