[ZDBSP] Proper REJECT table builder

Moderator: GZDoom Developers

Post Reply
gdm413229
Posts: 55
Joined: Tue Oct 04, 2011 1:38 pm
Graphics Processor: nVidia with Vulkan support
Contact:

[ZDBSP] Proper REJECT table builder

Post by gdm413229 »

By default, ZDBSP doesn't build REJECT tables due to the modern machines being much stronger than the i486 chips used way back in '94. One handy feature for ZDBSP is a proper REJECT builder for slaughtermap authors due to the ridiculously high monster count and for authoring maps intended for the vanilla DOOM executable. [vanilla DOOM can't load an incorrectly-sized REJECT table and using a zero-filled REJECT will be slow on monster LoS calculations!]

REJECT tables could be built using a variant of GZDoom's BLOCKMAP-based line-of-sight algorithm. The variant used to build the REJECT tables will use an imaginary surveyor whose only purpose is to fill out the table depending on what sector the surveyor is on, and all the sectors the surveyor sees in a 360 degree full circle. The surveyor uses a brute-force way of getting the REJECT tables correct with the BLOCKMAP-based LoS algorithm of ZDoom family ports. Certain REJECT builders will traverse the BSP tree for line-of-sight determination, which is slow and inefficient compared to the BLOCKMAP-based LoS system in ports from the ZDoom family. The finishing condition of the REJECT building process is governed by comparing how many sectors the imaginary surveyor has been in to the map's sector count, and the process is finished when the two values are equal.

REJECT tables in GZDoom will have performance benefits for high-sector slaughtermaps as the sheer sector and monster count (5 to 8 figure sector count and many legions of monsters!) will bring the BLOCKMAP-based LoS algorithm to it's knees.

The REJECT builder is optional and is unused by default. To activate the REJECT builder, pass the

Code: Select all

-true-reject
command line switch to ZDBSP alongside your target WAD file.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [ZDBSP] Proper REJECT table builder

Post by Graf Zahl »

Can you do it?
User avatar
Apeirogon
Posts: 1605
Joined: Mon Jun 12, 2017 12:57 am

Re: [ZDBSP] Proper REJECT table builder

Post by Apeirogon »

I think you can construct equivalent of reject table in zscript.
Like "attach" to each sector thinker, which contain info from which sectors visible from this.
But it also require replacing all a_look functions family so they use that data.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [ZDBSP] Proper REJECT table builder

Post by Graf Zahl »

:laff:
User avatar
Apeirogon
Posts: 1605
Joined: Mon Jun 12, 2017 12:57 am

Re: [ZDBSP] Proper REJECT table builder

Post by Apeirogon »

That was suggestion for OP, and yes it a little bit silly.
For slaughtermaps, okuplok for example which have more than 20k monsters, this dont solve problem. Here must be used some script which would spawn monsters only if they have "direct" line of sight with player, i.e. if player can be heard from some sector for example.
Basically like in nowadays games, doom 2016 for example, where map maximum amount of monsters is 10, or so.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”