Fix for Plutonia MAP05 fast scrollers

Like feature suggestions, but you've actually written code to make it happen. More likely to make it into the game than some random request in feature suggestions.

Moderator: GZDoom Developers

Forum rules
Please see Code submission guidelines

GZDoom Status:
Image

Legacy Status:
Image Image

QZDoom Status:
Image

Fix for Plutonia MAP05 fast scrollers

Postby hfc2x » Wed Nov 25, 2020 1:56 pm

Just wondering if this could be added to the level compatibility post-processor, since most source ports display the rapid scrollers in Ghost Town, but GZDoom does not (for good reason). A quick compat option can be made to restore the effect:

Code: Select allExpand view
version "4.5"

CLASS PlFix : LevelPostProcessor
{
   protected void Apply(Name checksum, String mapname)
   {
      int speed = 64;
      int i;

      switch (checksum)
      {
         case 'eb0d04aeb2841d5225caa576d7300d43': // Plutonia.wad MAP05
         {
            for (i = 602; i < 648; i++)
            {
               if (level.lines[i].special == 100)
                  level.lines[i].args[0] = speed*24;
            }
            for (i = 1065; i < 1069; i++)
            {
               if (level.lines[i].special == 100)
                  level.lines[i].args[0] = speed*4;
            }
         }
      }
   }
}


And yes, tested with both "default" and Anthology Plutonia (same map checksum) and works as intended. See attached file.
You do not have the required permissions to view the files attached to this post.
User avatar
hfc2x
DoomEU is not dead, just inevitably headed for a Mordeth nomination.
 
Joined: 17 Aug 2009
Location: Chule

Re: Fix for Plutonia MAP05 fast scrollers

Postby Rachael » Wed Nov 25, 2020 3:26 pm

Before adding this, I would prefer to ask the other devs if it would be more worth it to add a compatibility option to emulate this effect directly.

To do so, the linedefs themselves could be iterated and each sidedef could be labeled with how many lines are referencing it. Then the texture scroller can look this number up and multiply the scrolling directly by this value.
User avatar
Rachael
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 11
OS Test Version: No (Using Stable Public Version)
Graphics Processor: ATI/AMD with Vulkan Support

Re: Fix for Plutonia MAP05 fast scrollers

Postby Gez » Thu Nov 26, 2020 2:56 am

I'd be in favor of direct support (by line counting) and don't see a need for it to be compat-optioned. The effect is used in other maps too and it's really not a mapping trick that can be used accidentally.
Gez
 
 
 
Joined: 06 Jul 2007

Re: Fix for Plutonia MAP05 fast scrollers

Postby Graf Zahl » Thu Nov 26, 2020 4:25 am

Don't count on it. If you use a buggy sidedef compressor that's not aware of the original behavior you can easily end up with maps that accidentally merge these things.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Fix for Plutonia MAP05 fast scrollers

Postby hfc2x » Thu Nov 26, 2020 12:56 pm

Graf Zahl wrote:If you use a buggy sidedef compressor that's not aware of the original behavior you can easily end up with maps that accidentally merge these things.

This is precisely why I thought level post-processor compat detection option was better in this single one instance. Everything seems to point to this particular map being compressed, causing that (accidental) distinctive effect, and in turn is probably what led to people to discover how editing the LINEDEFS lump could achieve the same thing.

Sidedef counting could be useful for maps known to be made with the deliberate intention to achieve this effect, but in the case of Ghost Town, it's mostly just to restore one of the most distinctive features of it.
User avatar
hfc2x
DoomEU is not dead, just inevitably headed for a Mordeth nomination.
 
Joined: 17 Aug 2009
Location: Chule

Re: Fix for Plutonia MAP05 fast scrollers

Postby Rachael » Thu Nov 26, 2020 1:56 pm

Yeah I definitely was not asking to apply that unconditionally across all maps. However, Ghost Town definitely is not the only map which makes use of this effect, and the effect should be applied per-map, but having a compatibility option for it lets us curate individual maps for it rather than having to do it manually as has been done in the PR.
User avatar
Rachael
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 11
OS Test Version: No (Using Stable Public Version)
Graphics Processor: ATI/AMD with Vulkan Support


Return to Code Submissions

Who is online

Users browsing this forum: No registered users and 0 guests