Chaosforge Forum

DoomRL => Bug Reports => Topic started by: Matandun on April 13, 2011, 14:31

Title: [0.9.9.2] Armor shard on the stairs
Post by: Matandun on April 13, 2011, 14:31
Hello again.
I've encountered this situation:

BB Screenshot created.                                                         
 There is an armor shard lying here. There are stairs leading downward here.   
                               ####################   #########################
                               ....................=====.%==.................^#
                  ..          .....................=========............^...@.#
                 .            .....................========.===...............#
                             .....%................===.=.=====.......=|.......#
                             .....................===.=.=====.......=====..0..#
                             ......##..%##.......==..=..====.==.....========..#
                             ......#.....#........0......=..==.....=========..#
                             .........%................^............===.====..#
                             .....=.........%........................=...==...#
                             ...%==.....0....%..%%................>.......=.==#
                              .====#.....#................................====#
                              .=..=##...##........................=........===#
                               ..=  =.............................==.===.=====#
                                   ==............................==.=====.=.=.#
                                   =............^...............==========..=.#
                                  .............................====.=====....=#
                                   ............................===..===.......#
                                     ...  ......................====.=.......>#
                                            ################################## 
 Mat                        Armor : modified red armor [6/6] (56%) (P)         
 Health: 100% Exp:  8/98%   Weapon: high power chaingun (1d9)x4 [20/20]         
 cautious                                                    Phobos Hell  Lev7 


I've never seen this situation before. Not sure even if it's a bug. Are shards floating over the ground?
Title: Re: [0.9.9.2] Armor shard on the stairs
Post by: Shoop da Whoop on April 15, 2011, 08:08
Had same with Invulnerability sphere, somewhere is screenshots thread.
Also, reminds me of that little rooms with supllies at the end of the some Doom levels.
Title: Re: [0.9.9.2] Armor shard on the stairs
Post by: Deathwind on April 15, 2011, 15:13
The issue is that items can be spawned on squares they shouldn't be.
Title: Re: [0.9.9.2] Armor shard on the stairs
Post by: ParaSait on April 15, 2011, 16:14
I have this odd feeling that this problem can only occur in arena levels... because stairs are a pretty unusual thing there.
Specifically there are 4 of them instead of just 1.

Now, I've no idea about the source code of DoomRL, but my uneducated guess is that while generating the level, the game has a value in mind of the position of THE stairs, which can be technically just one position, and thus in arena levels the map generator just forgets about the other 3, making em vunerable to items being spawned on top of those. Just a thought, though.
Title: Re: [0.9.9.2] Armor shard on the stairs
Post by: tehtmi on April 15, 2011, 17:00
I have this odd feeling that this problem can only occur in arena levels... because stairs are a pretty unusual thing there.
Specifically there are 4 of them instead of just 1.

Now, I've no idea about the source code of DoomRL, but my uneducated guess is that while generating the level, the game has a value in mind of the position of THE stairs, which can be technically just one position, and thus in arena levels the map generator just forgets about the other 3, making em vunerable to items being spawned on top of those. Just a thought, though.

This is a good guess, but the problem is simpler. Normally stairs are generated by picking a random empty tile. For arena levels, stairs are placed in the corners regardless of emptiness. Since monsters and items are also placed on empty tiles, it should be possible to fix this problem by placing arena stairs before items rather than after.