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:
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
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:
Levels("CUSTOM",{
name = "Viles",
mortem = "",
mortem_desc = "on Viles",
Create = function ()
Level.fill("prwall")
local translation = {
['.'] = "floor",
[','] = "blood",
['#'] = "rwall",
['X'] = "rwall",
['>'] = "stairs"
}
local map = [[
#######################.............................########################
###########.....................................................############
#####..................................................................#####
##........................................................................##
#..........................................................................#
............................................................................
..................................,,,,,,....................................
..,,,.............................,,,,,,,...................................
..,>,............................,,,,,,,,,..................................
..,,,............................,,,,,,,,...................................
..................................,,,,,,....................................
............................................................................
............................................................................
#..........................................................................#
##........................................................................##
#####..................................................................#####
###########.....................................................############
#######################.............................########################
]]
Level.place_tile( translation, map, 2, 2 )
Level.scatter( area.FULL_SHRINKED,"floor","blood",100)
Level.player(38,10)
end,
OnEnter = function ()
player.eq.weapon = item.new( "ubutcher" )
Level.summon("arch", 1400)
Level.nuke()
end,
OnKill = function ()
end,
OnKillAll = function ()
end,
OnExit = function ()
levels.CUSTOM.mortem = "fled alive the trials"
end,
})
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:
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.