Chaosforge Forum

  • April 18, 2024, 13:30
  • Welcome, Guest
Please login or register.



Login with username, password and session length
Pages: [1]

Author Topic: [0.9.9.3] (Linux) Too many enemies cause odd behaviors  (Read 2546 times)

AStranger

  • First Lieutenant
  • *
  • Offline Offline
  • Posts: 233
  • Cyberdemon Blade
    • View Profile

While trying to re-obtain the elite diamond badge (lost the first during a power outage, eventually got it again) I ended up generating way too many mobs in the City of Skulls. Here is a screenshot of the ordeal:
Spoiler (click to show/hide)

Now if you look closely you'll notice two players on the screen. Apparently after enough mobs get generated the player gets duplicated, but it doesn't stop there. After a bit more mobs get spawned is the point where a good number of the mobs just stop moving altogether. Unfortunately it's really hard to tell if it is the new mobs that don't get to move or if it is the old ones, but I think it's the new ones that get frozen in time.

So I made a sandbox level to try to show the bug in action and it just got weirder:
Spoiler (click to show/hide)

After starting this map and rocketing to level 19 you can walk around and see multiple copies of the player. Sure enough if you hurt one of them you do get hurt. Then you quit and the mortem says 'He killed 254 out of 1198 hellspawn. (21%)', which doesn't seem correct because of 'Level.summon("arch", 1400)' and the fact that all of them get killed. If you comment out the 'Level.nuke()' line then walk around killing archviles by hand you'll notice that none of them move. Pay close enough attention and you'll also notice that when you kill a vile other viles around the level die too. This implies that not every vile is unique and they are linked somehow.

So now I started poking around at which point certain flaws became exposed and here is what I got:
Spoiler (click to show/hide)

My guess is that the extra players are tied to the size of byte somehow, but I haven't a clue with the mobs freezing. Hopefully this will help locate the bug.
Logged
[24|23|20|18|13] v.0.9.9.3
[17|10|8|5|2] v.0.9.9.2
[15|11|10|6|3] v.0.9.9.1
[18|17|14|10|6] v.0.9.9

tehtmi

  • Programmer
  • Local Inquisitor
  • Lieutenant Colonel
  • *
  • *
  • Offline Offline
  • Posts: 458
    • View Profile
Re: [0.9.9.3] (Linux) Too many enemies cause odd behaviors
« Reply #1 on: June 04, 2011, 18:18 »

Wow, this is a good analysis of the bug.  I think I can explain a bit more.  Probably when dropping beings past 256, only the low 8 bits are used, and a being that is already on the map is dropped on to the map at a new place (well, that doesn't quite match your report, but it seems the right basic idea).  Any being can be on the map in two places, but it will only consider itself to be in one of those places internally.  The AI will treat the being as if it is at the "internal" location, but attacks to any of the locations can still hurt and kill the being.  Not sure what would cause all mobs to freeze.  Actually, I suspect this is not too hard to fix though.

And for farming lost souls for berserk, my rule of thumb is three-four pain elementals or agony + 2-3. (;

Edit: I forgot you like to get blademaster.  I guess you could handle more then...
« Last Edit: June 04, 2011, 18:22 by tehtmi »
Logged

ParaSait

  • Baffen :P
  • Elder
  • Lieutenant General
  • *
  • *
  • Offline Offline
  • Posts: 1229
  • Happy Little Boozer
    • View Profile
    • MPSF
Re: [0.9.9.3] (Linux) Too many enemies cause odd behaviors
« Reply #2 on: June 04, 2011, 20:13 »

Just sayin: up to 384 until they freeze may seem like a totally random amount, but it's not. 384 - 256 = 128...
Logged
[18|7|3|0|0|0] [MED:13/43] [SPE:36/67] [ASM:11/40]

Check out my epic youtube channel!
Currently playing The Bard's Tale and System Shock 2 (coop with GrAV1t)!

thelaptop

  • Chaos Fanatic!
  • Grand Inquisitor
  • Apostle
  • *
  • *
  • Offline Offline
  • Posts: 2530
    • View Profile
Re: [0.9.9.3] (Linux) Too many enemies cause odd behaviors
« Reply #3 on: June 04, 2011, 23:01 »

I think we need to add the "make numbers bigger than 255 damnit" to the list of things that need resolution by 0.9.9.4.
Logged
I computed, therefore I was.

raekuul

  • Supporter
  • Brigadier General
  • *
  • *
  • Offline Offline
  • Posts: 668
  • Storyteller Under The Bridge
    • View Profile
    • Veldania
Re: [0.9.9.3] (Linux) Too many enemies cause odd behaviors
« Reply #4 on: June 05, 2011, 06:55 »

Since there's no way we'd be able to fit 65535 monsters on the map, this is probably going to be resolved in the same way that HP was changed around 0.9.9.1 or thereabouts.
Logged
Quote
Tormuse doesn't lose, he dies on purpose to lull the demons into a false sense of security.

Ander Hammer

  • Elder
  • Major
  • *
  • *
  • Offline Offline
  • Posts: 385
  • burst laser rifle (2d10)x7 [80/80] (H1)
    • View Profile
Re: [0.9.9.3] (Linux) Too many enemies cause odd behaviors
« Reply #5 on: June 09, 2011, 09:47 »

Ooooh, voodoo dolls.

Would be kind of a neat concept for special levels...
Logged
Hell Baron Major
[25|20|11|2|0]
Quest: bronzes/silvers i guess
[Inferno] ITYTD Win
Pages: [1]