Hmm, one of my performance optimizations isn’t working correctly. The offscreen objects only alter their tiny map regions when their locations change. However the camera will cull tiles as it normally does, and when the objects are close to the edge of the view their regions are culled- until their location changes again. With your enemies walking as slowly as they do they have ample time to fall through the culled floor.
I’m still working the problem on my end. In the meantime you can kill the optimization by going to line 9295 and killing that if-then check:
if not object.bounds or (object.bounds[1] ~= left or object.bounds[2] ~= top or object.bounds[3] ~= right or object.bounds[4] ~= bottom) then if object.physicsRegion then for p = 1, #object.physicsRegion, 1 do local lx = object.physicsRegion[p][1] local ly = object.physicsRegion[p][2] if (lx \< masterGroup[i].vars.camera[1] or lx \> masterGroup[i].vars.camera[3]) or (ly \< masterGroup[i].vars.camera[2] or ly \> masterGroup[i].vars.camera[4]) then updateTile2({locX = object.physicsRegion[p][1], locY = object.physicsRegion[p][2], layer = object.physicsRegion[p][3], tile = -1, owner = object }) end end end object.physicsRegion = nil object.physicsRegion = {} for lx = left, right, 1 do for ly = top, bottom, 1 do for j = 1, #map.layers, 1 do if (lx \< masterGroup[j].vars.camera[1] or lx \> masterGroup[j].vars.camera[3]) or (ly \< masterGroup[j].vars.camera[2] or ly \> masterGroup[j].vars.camera[4]) then local owner = updateTile2({locX = lx, locY = ly, layer = j, onlyPhysics = false, owner = object}) if owner then object.physicsRegion[#object.physicsRegion + 1] = {lx, ly, j} end end end end end object.bounds = {left, top, right, bottom} end
--if not object.bounds or (object.bounds[1] ~= left or object.bounds[2] ~= top or object.bounds[3] ~= right or object.bounds[4] ~= bottom) then --comment out if object.physicsRegion then for p = 1, #object.physicsRegion, 1 do local lx = object.physicsRegion[p][1] local ly = object.physicsRegion[p][2] if (lx \< masterGroup[i].vars.camera[1] or lx \> masterGroup[i].vars.camera[3]) or (ly \< masterGroup[i].vars.camera[2] or ly \> masterGroup[i].vars.camera[4]) then updateTile2({locX = object.physicsRegion[p][1], locY = object.physicsRegion[p][2], layer = object.physicsRegion[p][3], tile = -1, owner = object }) end end end object.physicsRegion = nil object.physicsRegion = {} for lx = left, right, 1 do for ly = top, bottom, 1 do for j = 1, #map.layers, 1 do if (lx \< masterGroup[j].vars.camera[1] or lx \> masterGroup[j].vars.camera[3]) or (ly \< masterGroup[j].vars.camera[2] or ly \> masterGroup[j].vars.camera[4]) then local owner = updateTile2({locX = lx, locY = ly, layer = j, onlyPhysics = false, owner = object}) if owner then object.physicsRegion[#object.physicsRegion + 1] = {lx, ly, j} end end end end end object.bounds = {left, top, right, bottom} --end --comment out