Page 1 of 1

reject lump

PostPosted: Tue Aug 05, 2003 8:25 pm
by Kappes Buur
This from a thread over in Bugs, discussing the problems with ultramarine.wad

Graf Zahl wrote:You should have used zennode -rz to skip the reject build. This alone probably took 17-19 minute of your time...

What would be the advantage of using the -rz option and have Zennode write all 0's into the reject lump?
Other than the time saved. Does that not mean, that ZDOOM has to produce the reject structure on the fly?

PostPosted: Tue Aug 05, 2003 8:47 pm
by Cyb
the reject map is used to calc line of sight wake ups of monsters, it's a table of every sector compared to every other sector. however, regardless of the reject map, monsters will wake up if you fire a weapon (as long as they aren't deaf or behind 2+ sound blocking lines) so all the reject is used for is line of sight stuff (waking up and attacking) but the engine can do all that stuff on its own, so in a way the reject map overrides the engine for los calcs (if the reject map specifies that a monster won't be able to see a player in sector x from sector y, the engine will assume that's true and won't bother). if the reject map states that the monster can see the player, the engine will still do calcs however (otherwise monsters facing away from you would wake up) so the engine is still doing stuff, it's just doing a bit less. it's not a horrible amount of processing power in most maps, and with modern systems there's hardly any change in performance (if any) from a zero filled to a regular reject map.

also an interesting thing, a 1 filled reject (the opposite of 0 filled) will cause monsters to never attack the player, but they will still wake up when you fire a weapon (unless they're deaf of course).

PostPosted: Tue Aug 05, 2003 9:08 pm
by HotWax
Exactly. The reject map is merely an accelerator designed to speed up the game on weaker systems. (Remember it had to run on a 386) Before the engine bothers doing any sight calcs for a monster, it checks the reject, and skips if there's no way that a monster in that sector can see the player's sector. Filling it with 0's just means that every monster's LOS is calculated every frame.

PostPosted: Sun Aug 10, 2003 3:58 pm
by Mundungu
I reject about one lump every 24 hours. It's healthy.

PostPosted: Sun Aug 10, 2003 5:20 pm
by Graf Zahl
Interestingly, the original reject maps (by id's nodebuilder) were so inefficient that they hardly mattered. Even on low end systems the performance gain was so marginal that it was practically unnoticable.

PostPosted: Mon Aug 11, 2003 7:42 am
Hmm, does moving monsters which haven't "woken up" about on conveyor belts or monster patrol roots screw up a properly built reject map at all?

PostPosted: Mon Aug 11, 2003 10:13 am
by HotWax
It shouldn't. Even though the monster is not being moved under his own power, for all intents and purposes, he's still moving. Therefore he will cross into other sectors and if he enters one where he can see the player, he will wake up as normal.