Page 1 of 1

[ZDBSP] Proper REJECT table builder

PostPosted: Mon Jun 17, 2019 9:16 am
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 allExpand view
command line switch to ZDBSP alongside your target WAD file.

Re: [ZDBSP] Proper REJECT table builder

PostPosted: Mon Jun 17, 2019 10:33 am
by Graf Zahl
Can you do it?

Re: [ZDBSP] Proper REJECT table builder

PostPosted: Wed Jul 10, 2019 1:18 pm
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.

Re: [ZDBSP] Proper REJECT table builder

PostPosted: Wed Jul 10, 2019 1:31 pm
by Graf Zahl

Re: [ZDBSP] Proper REJECT table builder

PostPosted: Thu Jul 11, 2019 8:38 am
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.