Allow setting Doom 64-style colors in ACS Sector Specials

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

User avatar
Dark Pulse
Posts: 66
Joined: Fri Nov 21, 2014 5:35 pm
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support

Allow setting Doom 64-style colors in ACS Sector Specials

Post by Dark Pulse »

Currently, ACS Sector specials that affect sector lighting (stuff like Sector_SetColor, Sector_SetFade and SetSectorGlow) do not take Doom 64-style colors into effect. Simply, I'd like to request that they be extended (or new special types defined) to make that possible.

An accurate conversion of Doom 64 would require these effects. In MAP01, for example, there are at least three cases where taking an item (the Blue Key, the Blue Armor, and the Green Armor) all have Macros attached which set an initial set of sector colors to simulate the "light" scattering off the item by having the lower wall texture more green/blue (as appropriate for the item). As soon as they're picked up, the script fires, which changes the wall lighting to different values, to simulate the item no longer "casting" light due to having been picked up.

Currently this is not possible, as both Sector_SetColor and Sector_SetFade only account for original Doom-style lighting, where it only allows for a whole-sector RGB color value. It could be kludged via floor/ceiling glow values, possibly, but even then it's still a bit inaccurate, and if the glows needed to change, then this is impossible, as far as I know. (EDIT: Disregard the aforementioned with the glow values - these do not have an effect; if set so they're "on" then they will not shut "off" even with ACS, and vice versa, due to it presumably not expecting Doom 64-style lighting.) Doom 64 EX fakes this with dummy sectors and a new Sector_CopyLights special; there is no equivalent in GZDoom's/QZDoom's ACS.

Another effect that would be needed to accurately simulate its behavior is a color crossfade effect, where a set of colors fades into a new set of colors once triggered. The earliest example of this I could think of is MAP02 - when the Blue Key is to be collected, the key teleports to a handful of different sectors at random; the sector lighting is crossfaded from its normal values to the new values as the key appears, then crossfades backwards to the original values once it fades away. (It seems to be a combo of Light_Fade and Sector_SetColor - Light_Fade works fine since the lighting brightness works regardless of Doom or D64-style lighting, but Sector_SetColor is, again, assuming Doom-style lighting, and so a change can't be fully accurate if a D64 map is assuming, for example, different floor and ceiling colors.)

There may be other sector-level specials that need a look-over to account for Doom 64-style lighting that I'm unaware of.
Nevander
Posts: 2254
Joined: Mon Jan 06, 2014 11:32 pm

Re: Allow setting Doom 64-style colors in ACS Sector Special

Post by Nevander »

Yep we simply need to be able to do the following with ACS:

1. Change any of the individual color properties one at a time or all at once (doing them all at once by copying properties is probably the easiest approach)
2. Do the same as number 1 except over a duration to where the color range interpolates between the old and new colors

Doom 64 did this by storing the to-be-copied colors in another sector, I'd be fine if it could be implemented this way. They didn't bother writing out functions with RGB values, they kept it in the editor by simply copying or copying and interpolating the colors across sectors. So basically we could have it set up so that we simply make a control sector with the new colors we want to copy, then use the following theoretical ACS function to do the copying (and optionally over a number of tics, not specified or 0 would be an instant shift).

Just spitballin'...

Code: Select all

CopySectorColors(source tag, destination tag[, tics]);
Also just to note, here's the two functions Doom 64 uses (as seen in the macros, the parameters might be reversed but it doesn't matter):

Code: Select all

Sector_CopyLights(destination tag, source tag);
Sector_CopyLightsAndInterpolate(destination tag, source tag);
It's interesting to note Doom 64 doesn't specify tics, and thus must be a fixed duration.
Post Reply

Return to “Feature Suggestions [GZDoom]”