1 2
5 6 7
Site Admin, Skilled player (1234)
Joined: 4/17/2010
Posts: 11251
Location: RU
А знать, какой враг своим спавном увеличил счетчик, надо?
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Skilled player (1431)
Joined: 11/26/2011
Posts: 655
Location: RU
feos wrote:
А знать, какой враг своим спавном увеличил счетчик, надо?
О, я даже не думал об этом, но раз предложил, то можно контур последнего новоприбывшего красным цветом выделить. Лишним это точно не будет.
I show you how deep the rabbit hole goes. Current projects: NES: Tetris "fastest 999999" (improvement, with r57shell) Genesis: Adventures of Batman & Robin (with Truncated); Pocahontas; Comix Zone (improvement); Mickey Mania (improvement); RoboCop versus The Terminator (improvement); Gargoyles (with feos)
Site Admin, Skilled player (1234)
Joined: 4/17/2010
Posts: 11251
Location: RU
Тестируй глобальный счетчик. Download TheAdventuresOfBatmanAndRobin.lua
Language: lua

-- The Adventures of Batman and Robin -- 2013-2016, feos and r57shell -- GLOBALS -- MsgTable = {} MsgTime = 30 MsgOffs = 16 MsgCutoff = 60 RNGcount = 0 SpawnCount= 0 SpawnOpac = 192 SpawnX = 0 SpawnY = 0 -- SHORTCUTS -- rb = memory.readbyte rbs = memory.readbytesigned rw = memory.readword rws = memory.readwordsigned rl = memory.readlong rls = memory.readlongsigned rex = memory.registerexec getr= memory.getregister function GetCam() xcam = rws(0xFFDFC4) if rb(0xFFFFF6) == 50 then ycam= rws(0xFFDFE0)-20 else ycam = 0 end end function EnemyPos(Base) GetCam() x1 = rws(Base + 0x12) - xcam y1 = rws(Base + 0x14) - ycam x2 = rws(Base + 0x16) - xcam y2 = rws(Base + 0x18) - ycam hp = rws(Base + 0x1E) end function PlayerPos() local sbase1 = rw(0xFFAD5C) + 0xFF0000 local sbase2 = rw(0xFFADB6) + 0xFF0000 p1speedx = rls(sbase1 + 0x18) / 0x10000 p1speedy = rls(sbase1 + 0x1C) / 0x10000 p2speedx = rls(sbase2 + 0x18) / 0x10000 p2speedy = rls(sbase2 + 0x1C) / 0x10000 end function HandleMsgTable(clear) for i = 1, #MsgTable do if (clear) then MsgTable[i] = nil end if (MsgTable[i]) then GetCam() if (MsgTable[i].y_ > MsgCutoff) then MsgY1 = 0 MsgY2 = 6 else MsgY1 = 203 MsgY2 = 203 end local opacity = (MsgTable[i].timer_ - gens.framecount() + 2)*7 gui.line(i * MsgOffs + 3, MsgY2, MsgTable[i].x_ - xcam, MsgTable[i].y_, 0xFF000000+opacity) gui.text(i * MsgOffs , MsgY1, MsgTable[i].damage_, "red") if (MsgTable[i].timer_ < gens.framecount()) then MsgTable[i] = nil end end end end function HandleDamage() local damage = AND(getr("d0"), 0xFFFF) local base = AND(getr("a2"), 0xFFFFFF) EnemyPos(base) unit = { timer_ = gens.framecount() + MsgTime, damage_ = damage, x_ = x1 + xcam, y_ = y1 } for i = 1, 200 do if MsgTable[i] == nil then MsgTable[i] = unit break end end end function Collision() GetCam() local a0 = AND(getr("a0"), 0xFFFF) local a6 = AND(getr("a6"), 0xFFFF) local damage = rw(a6 + 0xFF0012) local wx2 = getr("d6") - xcam local wy2 = getr("d7") - ycam local wx1 = getr("d4") - xcam local wy1 = getr("d5") - ycam --gui.text(wx2 + 2, wy1 + 1, string.format("%X",a6)) if (damage == 0) then damage = rw(a0 + 0xFF0034) end if (DamageHitbox) then gui.box(wx1, wy1, wx2, wy2, "#FF000000") gui.text(wx1 + 2, wy1 + 1, damage) else gui.box(wx1, wy1, wx2, wy2, "#FFFF0000") end end function InRange(var, num1, num2) if (var >= num1) and (var <= num2) then return true end end function Item() GetCam() local a6 = AND(getr("a6"), 0xFFFF) local x = rw(a6 + 0xFF003E) - xcam local y = rw(a6 + 0xFF0042) local code = rb(a6 + 0xFF0019) if InRange(code, 0, 1) then return elseif InRange(code, 7, 19) then item = "Amo" -- ammo elseif InRange(code, 21, 23) then item = "Cha" -- fast charge elseif InRange(code, 24, 26) then item = "Bom" -- bomb elseif InRange(code, 27, 29) then item = "Lif" -- life elseif InRange(code, 30, 47) then item = "HiP" -- hearts else item = tostring(code) end gui.text(x-7, y, string.format("%s" , item ), "yellow") -- gui.text(x-7, y, string.format("\n%X", a6+0x19), "yellow") end function Hitbox(address) local i = 0 local base = rw(address) while (base ~= 0) do base = base + 0xFF0000 if (rw(base + 2) == 0) then break end EnemyPos(base) if (address == 0xFFDEB2) then gui.box(x1, y1, x2, y2, "#00FF0000") elseif (address == 0xFFDEBA) then gui.box(x1, y1, x2, y2, "#00FFFF00") gui.text(x1 + 2, y1 + 1, hp, "#FF00FF") --if (x2 < 0) then gui.text(x1 + 2, y2 - 7, "x:" .. x1 ) end --if (x1 >= 320) then gui.text(x1 + 2, y2 - 7, "x:" .. x1 - 320) end --if (y2 < 0) then gui.text(x2 + 2, y2 - 7, "y:" .. y2 ) end local offtext = "" if (x2 < 0) then offtext = offtext .. "x:" .. x1 end if (x1 >= 320) then offtext = offtext .. "x:" .. x1 - 320 end if (y2 < 0) then offtext = offtext .. "y:" .. y2 end if (y2 >= 224) then offtext = offtext .. "y:" .. y2 - 224 end if offtext ~= "" then gui.text(x1 + 2, y2 - 7, offtext) end end -- gui.text(x1 + 2, y1 + 1, string.format("\n%X", base + 0x1E - 0xFF0000), "#FF00FF") base = rw(base + 2) i = i + 1 if (i > 400) then break end end end function Objects() GetCam() local base = 0xFFAD54 for i=0,100 do local a5 = rl (base) local link = rw (base+ 6) local ptr1 = rw (base+0x0A)+0xFF0000 local x = rws(base+0x3E) local xsub = rb (base+0x40) local y = rws(base+0x42) local ysub = rb (base+0x44) local hp = rw (base+0x52) local ptr2 = rl (ptr1+0x2A) local code = rw (ptr2) if a5 == 0x88BE then return end if base == 0xFFC320 then -- gui.text(x - xcam, y - ycam, string.format("%X", base)) end base = link + 0xFF0000 end end function Counters() local base = AND(getr("a6"), 0xFFFFFF) local ptr1 = rw(base+0x0A) + 0xFF0000 local ptr2 = rl(ptr1+0x2A) local code = rw(ptr2) SpawnX = rws(base+0x3E) - xcam SpawnY = rws(base+0x42) - ycam if code ~= 0xAE6 -- helicopter bomb and code ~= 0xAF2 -- mini-missile and code ~= 0x2384 -- item then SpawnOpac = 192 SpawnCount = SpawnCount + 1 print(string.format("%X", code)) end end function Main() local color0 = "yellow" local color1 = "yellow" local color2 = "yellow" local base1 = 0xFFAD54 local base2 = 0xFFADAE -- local hp1 = rw (0xFFF650) / 0x10 -- local life1 = rw (0xFFF644) local X1 = rw (base1 + 0x3E) local X1sub = rb (base1 + 0x40) local Y1 = rws(base1 + 0x42) local Y1sub = rb (base1 + 0x44) local X2 = rw (base2 + 0x3E) local X2sub = rb (base2 + 0x40) local Y2 = rws(base2 + 0x42) local Y2sub = rb (base2 + 0x44) local RNG1 = rw (0xFFF5FC) -- local RNG2 = rl (0xFFF5FE) local Weapon1 = rb (0xFFF67B) local Weapon2 = rb (0xFFF6BB) local Charge1 = (rw(0xFFF658) - 0x2800) / -0x80 local Charge2 = (rw(0xFFF698) - 0x2800) / -0x80 local ScreenLock = rw(0xFFDFC0) if Charge1 <= 0 then Charge1 = 0; color1 = "red" end if Charge2 <= 0 then Charge2 = 0; color2 = "red" end if RNGcount > 1 then color0 = "red" end -- HandleMsgTable() PlayerPos() Objects() gui.line( 34, 37, SpawnX, SpawnY, 0x00FF0000+SpawnOpac) gui.text( 0, 30, string.format("Spawns: %d",SpawnCount),"green") gui.text( 0, 210, string.format("\nRNG:%X" , RNG1)) gui.text( 40, 210, string.format("\nLock:%d", ScreenLock)) gui.text( 34, 210, string.format("\n%d" , RNGcount), color0) gui.text( 80, 20, string.format("%2d" , Charge1), color1) gui.text(235, 20, string.format("%2d" , Charge2), color2) -- gui.text(180, 210, string.format("%2d" , Charge1), color1) -- gui.text(300, 210, string.format("%2d" , Charge2), color2) gui.text(180, 210, string.format("\n%2d" , Weapon1+1), "yellow") gui.text(300, 210, string.format("\n%2d" , Weapon2+1), "yellow") gui.text( 81, 210, string.format("Pos: %d.%d\nSpd: %.5f", X1, X1sub, p1speedx), "#AAAAAA") gui.text(137, 210, string.format("/ %d.%d\n/ %.5f" , Y1, Y1sub, p1speedy), "#AAAAAA") gui.text(203, 210, string.format("Pos: %d.%d\nSpd: %.5f", X2, X2sub, p2speedx), "#00BB00") gui.text(260, 210, string.format("/ %d.%d\n/ %.5f" , Y2, Y2sub, p2speedy), "#00BB00") Hitbox(0xFFDEB2) -- Hitbox(0xFFDEBA) RNGcount = 0 end emu.registerafter(function() SpawnOpac = SpawnOpac - 4 if SpawnOpac < 0 then SpawnOpac = 0 end end) savestate.registerload(function() SpawnCount = 0 SpawnOpac = 192 return HandleMsgTable(1) end) gui.register(Main) rex(0x375A, function() DamageHitbox = false end) rex(0x375E, function() DamageHitbox = true end) rex(0x3768, function() DamageHitbox = false end) rex(0x376C, function() DamageHitbox = true end) rex(0x65C4, function() DamageHitbox = false end) rex(0x65C8, function() DamageHitbox = true end) rex(0x995C, function() RNGcount = RNGcount + 1 end) rex(0x4738, Item) rex(0x4534, Item) rex(0x8DE6, Counters) rex(0x8DCE, Counters) --rex(0x8C9A, Collision) rex(0x1085A, HandleDamage) -- meelee rex(0x10CBA, HandleDamage) -- weapon rex(0x10CC4, HandleDamage) -- weapon
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Skilled player (1431)
Joined: 11/26/2011
Posts: 655
Location: RU
Глобальный счетчик работает прекрасно! От двух разных тестовых мувиков до первого босса поплыл только на единичку. Эта разница, как обнаружилось, образовалось за счет того что некоторые пилотажные группы мелких самолетиков могут рандомно состоять из разного количества самолетов +/-1 (и иметь разное построение). В общем, счетчик свою функцию выполняет как надо, а вышеописанный самолетно-групповой сдвиг, там где он имеет место, легко можно учесть и посчитать в уме.
I show you how deep the rabbit hole goes. Current projects: NES: Tetris "fastest 999999" (improvement, with r57shell) Genesis: Adventures of Batman & Robin (with Truncated); Pocahontas; Comix Zone (improvement); Mickey Mania (improvement); RoboCop versus The Terminator (improvement); Gargoyles (with feos)
Site Admin, Skilled player (1234)
Joined: 4/17/2010
Posts: 11251
Location: RU
Дерижабль нужен?
Второе значение - количество вторичных врагов на экране, выпущенных (ракеты, мины ловушек и т.п.).
В т.п. что входит?
Archanfel wrote:
Я придумал простой и элегантный способ как это можно организовать
Да уж, проще некуда.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Skilled player (1431)
Joined: 11/26/2011
Posts: 655
Location: RU
feos wrote:
Дерижабль нужен?
Нет, спасибо. С дирижаблем вроде и так все понятно. Там хоть нормальная координата есть 0xFFAEA0, так что ориентироваться будет много проще.
feos wrote:
В т.п. что входит?
Для летательного уровня, пожалуй больше ничего и нет. Но, если распространить концепцию вторичных врагов на другие уровни, то сюда еще можно отнеси нейтральные разрушаемые объекты, урны/вазы/бочки/фонари, шляпу шляпника, сахар выпрыгивающий из сахарницы и прочее.
I show you how deep the rabbit hole goes. Current projects: NES: Tetris "fastest 999999" (improvement, with r57shell) Genesis: Adventures of Batman & Robin (with Truncated); Pocahontas; Comix Zone (improvement); Mickey Mania (improvement); RoboCop versus The Terminator (improvement); Gargoyles (with feos)
Site Admin, Skilled player (1234)
Joined: 4/17/2010
Posts: 11251
Location: RU
Archanfel wrote:
Для летательного уровня, пожалуй больше ничего и нет.
Какой смысл считать ракеты и дронов, если у них и так показывается удаленность, когда они за экраном, а на экране их и так видно?
Archanfel wrote:
Но, если распространить концепцию вторичных врагов на другие уровни, то сюда еще можно отнеси нейтральные разрушаемые объекты, урны/вазы/бочки/фонари, шляпу шляпника, сахар выпрыгивающий из сахарницы и прочее.
Губа не дура. Как насчет "нет"? Хитбоксы есть, удаленность есть, считать зачем?
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Skilled player (1431)
Joined: 11/26/2011
Posts: 655
Location: RU
feos wrote:
Какой смысл считать ракеты и дронов, если у них и так показывается удаленность, когда они за экраном, а на экране их и так видно?
Проблема в том, что экран не совсем стандартный, он больше обычного и его можно вверх/вниз скролить. Иногда получается враги как бы на экране, а их и не хрена не видно и удаленность не пишут.
feos wrote:
Да уж, проще некуда.
Скромность — мать великих деяний. О. Бальзак
feos wrote:
Губа не дура. Как насчет "нет"?
"Нет" вполне устраивает :) Главное сквозь летательный уровень продраться, а в остальных и так все хорошо.
I show you how deep the rabbit hole goes. Current projects: NES: Tetris "fastest 999999" (improvement, with r57shell) Genesis: Adventures of Batman & Robin (with Truncated); Pocahontas; Comix Zone (improvement); Mickey Mania (improvement); RoboCop versus The Terminator (improvement); Gargoyles (with feos)
Site Admin, Skilled player (1234)
Joined: 4/17/2010
Posts: 11251
Location: RU
Вощем так как за экраном видно врага начиная с первых версий скрипта (пофиксил низ), а считать мелкие сердески вместе с нормальными айтемами слишком мозголомно, счетчики такие: спавн, враги, айтемы, сердечки. Тести.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Skilled player (1431)
Joined: 11/26/2011
Posts: 655
Location: RU
feos wrote:
счетчики такие: спавн, враги, айтемы, сердечки. Тести.
Единственно немного печально что нет счетчика мелких ракет и мин... но в остальном просто великолепно. Кстати любопытно, что в прошлой версии глобальный Spawn счетчик работал везде, а теперь вдруг стал работоспособным только в узком диапазоне летательного уровня. Ты его специально выключил вне этого промежутка?
I show you how deep the rabbit hole goes. Current projects: NES: Tetris "fastest 999999" (improvement, with r57shell) Genesis: Adventures of Batman & Robin (with Truncated); Pocahontas; Comix Zone (improvement); Mickey Mania (improvement); RoboCop versus The Terminator (improvement); Gargoyles (with feos)
Site Admin, Skilled player (1234)
Joined: 4/17/2010
Posts: 11251
Location: RU
Ну да, если хочешь могу включить обратно. И вот поправил еще кое-что: Download TheAdventuresOfBatmanAndRobin.lua
Language: lua

-- The Adventures of Batman and Robin -- 2013-2016, feos and r57shell -- GLOBALS -- MsgTable = {} MsgTime = 30 MsgOffs = 16 MsgCutoff = 60 RNGcount = 0 SpawnCount= 0 SpawnOpac = 192 SpawnX = 0 SpawnY = 0 Enemies = 0 Items = 0 Hearts = 0 -- SHORTCUTS -- rb = memory.readbyte rbs = memory.readbytesigned rw = memory.readword rws = memory.readwordsigned rl = memory.readlong rls = memory.readlongsigned rex = memory.registerexec getr= memory.getregister function GetCam() xcam = rws(0xFFDFC4) if rb(0xFFFFF6) == 50 then ycam= rws(0xFFDFE0)-20 else ycam = 0 end end function EnemyPos(Base) GetCam() x1 = rws(Base + 0x12) - xcam y1 = rws(Base + 0x14) - ycam x2 = rws(Base + 0x16) - xcam y2 = rws(Base + 0x18) - ycam hp = rws(Base + 0x1E) end function PlayerPos() local sbase1 = rw(0xFFAD5C) + 0xFF0000 local sbase2 = rw(0xFFADB6) + 0xFF0000 p1speedx = rls(sbase1 + 0x18) / 0x10000 p1speedy = rls(sbase1 + 0x1C) / 0x10000 p2speedx = rls(sbase2 + 0x18) / 0x10000 p2speedy = rls(sbase2 + 0x1C) / 0x10000 end function HandleMsgTable(clear) for i = 1, #MsgTable do if (clear) then MsgTable[i] = nil end if (MsgTable[i]) then GetCam() if (MsgTable[i].y_ > MsgCutoff) then MsgY1 = 0 MsgY2 = 6 else MsgY1 = 203 MsgY2 = 203 end local opacity = AND((MsgTable[i].timer_ - gens.framecount() + 2)*7, 0xFF) gui.line(i * MsgOffs + 3, MsgY2, MsgTable[i].x_ - xcam, MsgTable[i].y_, 0xFF000000+opacity) gui.text(i * MsgOffs , MsgY1, MsgTable[i].damage_, "red") if (MsgTable[i].timer_ < gens.framecount()) then MsgTable[i] = nil end end end end function HandleDamage() local damage = AND(getr("d0"), 0xFFFF) local base = AND(getr("a2"), 0xFFFFFF) EnemyPos(base) unit = { timer_ = gens.framecount() + MsgTime, damage_ = damage, x_ = x1 + xcam, y_ = y1 } for i = 1, 200 do if MsgTable[i] == nil then MsgTable[i] = unit break end end end function Collision() GetCam() local a0 = AND(getr("a0"), 0xFFFFFF) local a6 = AND(getr("a6"), 0xFFFFFF) local damage = rw(a6 + 0x12) local id = rw(a6 + 2) local wx2 = getr("d6") - xcam local wy2 = getr("d7") - ycam local wx1 = getr("d4") - xcam local wy1 = getr("d5") - ycam -- gui.text(wx2 + 2, wy1 + 1, string.format("%X",a6)) if (damage == 0) then damage = rw(a0 + 0x34) end if (DamageHitbox) then gui.box(wx1, wy1, wx2, wy2, "#FF000000") gui.text(wx1 + 2, wy1 + 1, damage) else gui.box(wx1, wy1, wx2, wy2, "#FFFF0000") if id == 0x53B4 then Hearts = Hearts + 1 end end end function InRange(var, num1, num2) if (var >= num1) and (var <= num2) then return true end end function Item() GetCam() local a6 = AND(getr("a6"), 0xFFFFFF) local x = rw(a6 + 0x3E) - xcam local y = rw(a6 + 0x42) local code = rb(a6 + 0x19) if InRange(code, 0, 1) then return elseif InRange(code, 7, 19) then item = "Amo" -- ammo elseif InRange(code, 21, 23) then item = "Cha" -- fast charge elseif InRange(code, 24, 26) then item = "Bom" -- bomb elseif InRange(code, 27, 29) then item = "Lif" -- life elseif InRange(code, 30, 47) then item = "HiP" -- hearts else item = tostring(code) end gui.text(x-7, y, string.format("%s" , item ), "yellow") -- gui.text(x-7, y, string.format("\n%X", a6+0x19), "yellow") end function Hitbox(address) local i = 0 local base = rw(address) while (base ~= 0) do base = base + 0xFF0000 if (rw(base + 2) == 0) then break end EnemyPos(base) if (address == 0xFFDEB2) then gui.box(x1, y1, x2, y2, "#00FF0000") elseif (address == 0xFFDEBA) then gui.box(x1, y1, x2, y2, "#00FFFF00") gui.text(x1 + 2, y1 + 1, hp, "#FF00FF") -- if (x2 < 0) then gui.text(x1 + 2, y2 - 7, "x:" .. x1 ) end -- if (x1 >= 320) then gui.text(x1 + 2, y2 - 7, "x:" .. x1 - 320) end -- if (y2 < 0) then gui.text(x2 + 2, y2 - 7, "y:" .. y2 ) end local offtext = "" if (x2 < 0) then offtext = offtext .. "x:" .. x1 end if (x1 >= 320) then offtext = offtext .. "x:" .. x1 - 320 end if (y2 < 0) then offtext = offtext .. "y:" .. y2 end if (y2 >= 224) then offtext = offtext .. "y:" .. y2 - 224 end if offtext ~= "" then gui.text(x1 + 2, y2 - 7, offtext) end end base = rw(base + 2) i = i + 1 if (i > 400) then break end end end function Objects() if rb(0xFFFFF6) ~= 50 then return end Enemies = 0 Items = 0 GetCam() local base = 0xFFAD54 for i=0,100 do local link = rw (base+ 6) local ptr1 = rw (base+0x0A)+0xFF0000 local x = rws(base+0x3E) local xsub = rb (base+0x40) local y = rws(base+0x42) local ysub = rb (base+0x44) local hp = rw (base+0x52) local ptr2 = rl (ptr1+0x2A) local code = rw (ptr2) if base > 0 then if ptr2 == 0x27DEE -- helicopter black or ptr2 == 0x27F9C -- helicopter red or ptr2 == 0x2804E -- plane black or ptr2 == 0x28134 -- helicopter green or ptr2 == 0x282B8 -- plane red or ptr2 == 0x2860A -- missile or ptr2 == 0x28DD2 -- helicopter red phase 1 or ptr2 == 0x28E08 -- helicopter red phase 2 then Enemies = Enemies + 1 elseif ptr2 == 0x13326 or ptr2 == 0x13BDE then Items = Items + 1 else -- gui.text(x - xcam, y - ycam, string.format("%X", ptr2), "green") end end base = link + 0xFF0000 local a5 = rl (base) if a5 == 0x88BE then return end end end function Spawns() if rb(0xFFFFF6) ~= 50 then return end local base = AND(getr("a6"), 0xFFFFFF) local ptr1 = rw(base+0x0A) + 0xFF0000 local ptr2 = rl(ptr1+0x2A) local code = rw(ptr2) SpawnX = rws(base+0x3E) - xcam SpawnY = rws(base+0x42) - ycam if code ~= 0xAE6 -- drone and code ~= 0xAF2 -- mini-missile and code ~= 0x2384 -- item then SpawnOpac = 192 SpawnCount = SpawnCount + 1 end end function Main() local color0 = "yellow" local color1 = "yellow" local color2 = "yellow" local base1 = 0xFFAD54 local base2 = 0xFFADAE -- local hp1 = rw (0xFFF654) -- local life1 = rw (0xFFF644) local X1 = rw (base1 + 0x3E) local X1sub = rb (base1 + 0x40) local Y1 = rws(base1 + 0x42) local Y1sub = rb (base1 + 0x44) local X2 = rw (base2 + 0x3E) local X2sub = rb (base2 + 0x40) local Y2 = rws(base2 + 0x42) local Y2sub = rb (base2 + 0x44) local RNG1 = rw (0xFFF5FC) -- local RNG2 = rl (0xFFF5FE) local Weapon1 = rb (0xFFF67B) local Weapon2 = rb (0xFFF6BB) local Charge1 = (rw(0xFFF658) - 0x2800) / -0x80 local Charge2 = (rw(0xFFF698) - 0x2800) / -0x80 local ScreenLock = rw(0xFFDFC0) if Charge1 <= 0 then Charge1 = 0; color1 = "red" end if Charge2 <= 0 then Charge2 = 0; color2 = "red" end if RNGcount > 1 then color0 = "red" end HandleMsgTable() PlayerPos() Objects() if rb(0xFFFFF6) == 50 then gui.line( 34, 37, SpawnX, SpawnY, 0x00FF0000+ SpawnOpac) gui.text( 0, 30, string.format("Obj: %d" , SpawnCount),"green") gui.text( 0, 38, string.format("%d %d %d" , Enemies, Items, Hearts/2)) end gui.text( 0, 210, string.format("\nRNG:%X" , RNG1)) gui.text( 40, 210, string.format("\nLock:%d" , ScreenLock)) gui.text( 34, 210, string.format("\n%d" , RNGcount), color0) gui.text( 80, 20, string.format("%2d" , Charge1), color1) gui.text(235, 20, string.format("%2d" , Charge2), color2) gui.text(180, 210, string.format("\n%2d" , Weapon1+1), "yellow") gui.text(300, 210, string.format("\n%2d" , Weapon2+1), "yellow") gui.text( 81, 210, string.format("Pos: %d.%d\nSpd: %.5f", X1, X1sub, p1speedx), "#AAAAAA") gui.text(137, 210, string.format("/ %d.%d\n/ %.5f" , Y1, Y1sub, p1speedy), "#AAAAAA") gui.text(203, 210, string.format("Pos: %d.%d\nSpd: %.5f", X2, X2sub, p2speedx), "#00BB00") gui.text(260, 210, string.format("/ %d.%d\n/ %.5f" , Y2, Y2sub, p2speedy), "#00BB00") Hitbox(0xFFDEB2) Hitbox(0xFFDEBA) RNGcount = 0 end emu.registerafter(function() SpawnOpac = SpawnOpac - 4 if SpawnOpac < 0 then SpawnOpac = 0 end end) emu.registerbefore(function() Hearts = 0 end) savestate.registerload(function() SpawnCount = 0 SpawnOpac = 192 Enemies = 0 Items = 0 Hearts = 0 return HandleMsgTable(1) end) gui.register(Main) rex(0x375A, function() DamageHitbox = false end) rex(0x375E, function() DamageHitbox = true end) rex(0x3768, function() DamageHitbox = false end) rex(0x376C, function() DamageHitbox = true end) rex(0x65C4, function() DamageHitbox = false end) rex(0x65C8, function() DamageHitbox = true end) rex(0x995C, function() RNGcount = RNGcount + 1 end) rex(0x4738, Item) rex(0x4534, Item) rex(0x8DE6, Spawns) rex(0x8DCE, Spawns) rex(0x8C9A, Collision) rex(0x1085A, HandleDamage) -- meelee rex(0x10CBA, HandleDamage) -- weapon rex(0x10CC4, HandleDamage) -- weapon
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Skilled player (1431)
Joined: 11/26/2011
Posts: 655
Location: RU
feos wrote:
Ну да, если хочешь могу включить обратно.
Да не, все и так устраивает. Отправил Усеченному, будем начинать пилить потихоньку :) Спасибо за скрипт.
I show you how deep the rabbit hole goes. Current projects: NES: Tetris "fastest 999999" (improvement, with r57shell) Genesis: Adventures of Batman & Robin (with Truncated); Pocahontas; Comix Zone (improvement); Mickey Mania (improvement); RoboCop versus The Terminator (improvement); Gargoyles (with feos)
Player (96)
Joined: 12/12/2013
Posts: 376
Location: Russia
Я тут вдруг вспомнил. А вы в курсе что исходники гаргулий сеговских были выложены?
Site Admin, Skilled player (1234)
Joined: 4/17/2010
Posts: 11251
Location: RU
Без этих исходников я бы скрипт до сих пор делал. Я помимо прочего проект иды благодаря им привожу в божеский вид, чтобы потом еще и поведеие врагов нормально изучить.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Site Admin, Skilled player (1234)
Joined: 4/17/2010
Posts: 11251
Location: RU
В этот раз я реально вернулся, весь вечер дрюкал шипастую башню, нашел способ постратить на ней здоровья на 1 удар меньше тебя, но не успел дотестить другое место, где очень много терял, может получится созранить здоровье, не теряя времени. А на подходе к тому месту одной оптимизацией выбил 12 кадров. Там прикол в том, что если в определенном месте прилипнуть к стене и шагнуть вверх, можно с прыжка обогнуть шипы, не поранившись. Делал так еще в реалтайме давно, только сегодня вспомнил. Если прсто снизу ползти, Голиаф не шагнет в такую высокую точку. Еще взвыл от сложности оптимизации двойных прыжков идущих подряд, уже подумываю как-то рисовать итоговые дуги каскадами, а то все варианты кнопки прыжка перебирать, потом еще все варианты прилипания к стене, все варианты убивания об шипы... чокнуться можно. Ну и как всегда нашел целую кучу багов тастудии. Постараюсь максимально отложить их правку ради таса. Вип выложу как добью башню. Тест еще продолжается, но такое и запостить не стыдно. http://tasvideos.org/userfiles/info/36450731796831044 А можешь примерно померять сколько кадров выигрывает тот урон в 2-1, полученный благодаря лишнему хп?
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Skilled player (1431)
Joined: 11/26/2011
Posts: 655
Location: RU
feos wrote:
А можешь примерно померять сколько кадров выигрывает тот урон в 2-1, полученный благодаря лишнему хп?
Потестил немного это место, в 2-1 и пришел к выводу что оба этих необязательных повреждения... необязательны. Избегая повреждения отстал всего на 1 кадр (и не удивлюсь если получится сравнять или даже обогнать). Иными словами совсем ничего не выигрывает. Таким образом, к началу 2-1 оптимально будет оставить 96 здоровья вместо 136. Если есть возможность употребить эти "лишние" 40 хп на первом уроне хоть с какой то отдачей - это следует делать без колебаний.
I show you how deep the rabbit hole goes. Current projects: NES: Tetris "fastest 999999" (improvement, with r57shell) Genesis: Adventures of Batman & Robin (with Truncated); Pocahontas; Comix Zone (improvement); Mickey Mania (improvement); RoboCop versus The Terminator (improvement); Gargoyles (with feos)
Site Admin, Skilled player (1234)
Joined: 4/17/2010
Posts: 11251
Location: RU
Неожиданненько! Ну зато я теперь эту чертову башню как свои пять пальцев знаю, ей не победить и не убежать. [offtopic]Чож там Трункейтед такого никак сделать не может, что его столько ждать приходится?[/offtopic]
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Skilled player (1431)
Joined: 11/26/2011
Posts: 655
Location: RU
Если будешь переделывать 1-3, то я беглым взглядом заметил пару небольших косяков: Около ~4300 забыл махнуть крыльями перед цеплянием к стене, 7 кадров на ровном месте потеряно. Ну и раз здоровье позволяет там же об огонек еще раз можно махнуть. Около ~5400, наверх можно выбраться быстрее цепляясь к левой стене.
feos wrote:
[offtopic]Чож там Трункейтед такого никак сделать не может, что его столько ждать приходится?[/offtopic]
Тот эпизод давно позади, правда пришлось практически все делать мне одному... зря только ждал. Но, как бы то ни было, ща >80% летательного уровня завершено. Осталось лишь аккуратно размочить три тарелки в конце и наконец перейдем к Шляпнику.
I show you how deep the rabbit hole goes. Current projects: NES: Tetris "fastest 999999" (improvement, with r57shell) Genesis: Adventures of Batman & Robin (with Truncated); Pocahontas; Comix Zone (improvement); Mickey Mania (improvement); RoboCop versus The Terminator (improvement); Gargoyles (with feos)
Site Admin, Skilled player (1234)
Joined: 4/17/2010
Posts: 11251
Location: RU
Продираюсь сквозь кромешный ад поломавшегося поведения врагов. Так и сжирают все что я наоптимизировал в сравнении с последней версией. Чувствую мы еще взвоем при создании чистовика. Оптимизация сама по себе уже кажется банальщиной.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Skilled player (1431)
Joined: 11/26/2011
Posts: 655
Location: RU
feos wrote:
Продираюсь сквозь кромешный ад поломавшегося поведения врагов. Так и сжирают все что я наоптимизировал в сравнении с последней версией. Чувствую мы еще взвоем при создании чистовика. Оптимизация сама по себе уже кажется банальщиной.
Это лишь преддверие ада, настоящий ад разверзнется когда доберемся до уровня 3-2. Поведением обитающих там летучих дронов управляет сам первородный хаос. Вот там можно будет познать всю глубину отчаяния в полной мере :)
I show you how deep the rabbit hole goes. Current projects: NES: Tetris "fastest 999999" (improvement, with r57shell) Genesis: Adventures of Batman & Robin (with Truncated); Pocahontas; Comix Zone (improvement); Mickey Mania (improvement); RoboCop versus The Terminator (improvement); Gargoyles (with feos)
Site Admin, Skilled player (1234)
Joined: 4/17/2010
Posts: 11251
Location: RU
Слоупочный кристмас презент. http://tasvideos.org/userfiles/info/44292010871528801 Мерял по кадру сброса позиции. Намерял 87 кадров разницы, 36 кадров с моего прошлогоднего варианта. В некоторых местах одной оптимизацией обгонял, в других из-за таймеров терял, в треьих из-за таймеров опять обгонял. Протестил все что мог, могу подробней рассказать по интересующим местам. Ничего не хочу обещать, но выставил первый приоритет именно гаргульям. Вроде щас вообще ни в чем нету завалов: - судить есть кому - меймовский ревиндер в последнем релизе - в бизхоке все тихо, да и багов вообще не нашел за эту сессию (что не дало мне продолжить сразу же год назад, а потом навалилась туева хуча всего) - публиковать много ума не надо - через 2 недели отпуск На выдрочку скрипта потратил аж 3 дня. EDIT: Босс труп. Не спрашивай что случилось, я без понятия. http://tasvideos.org/userfiles/info/44294549217065730
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Skilled player (1431)
Joined: 11/26/2011
Posts: 655
Location: RU
О, нежданчик подъехал! Подробно еще не анализировал, так что пока особо хитрых вопросов нет. Приятно видеть долгожданный прогресс по гаргошам, рад что все сдвинулось с мертвой точки!
I show you how deep the rabbit hole goes. Current projects: NES: Tetris "fastest 999999" (improvement, with r57shell) Genesis: Adventures of Batman & Robin (with Truncated); Pocahontas; Comix Zone (improvement); Mickey Mania (improvement); RoboCop versus The Terminator (improvement); Gargoyles (with feos)
Site Admin, Skilled player (1234)
Joined: 4/17/2010
Posts: 11251
Location: RU
А пока вы кипятите мы уже жарим http://tasvideos.org/userfiles/info/44339572515313580
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Skilled player (1431)
Joined: 11/26/2011
Posts: 655
Location: RU
Одобряю такие темпы, пока вроде все отлично, продолжай жарить! Про 2-1 есть одна мысль. Помню в районе 7777 об огненный шар можно исхитриться получить одинарный урон, а не двойной. Может использовать эту лишнюю двадцатку здоровья в районе 8100-8200?
I show you how deep the rabbit hole goes. Current projects: NES: Tetris "fastest 999999" (improvement, with r57shell) Genesis: Adventures of Batman & Robin (with Truncated); Pocahontas; Comix Zone (improvement); Mickey Mania (improvement); RoboCop versus The Terminator (improvement); Gargoyles (with feos)
Site Admin, Skilled player (1234)
Joined: 4/17/2010
Posts: 11251
Location: RU
Будем посмотреть. Я тут на радостях еще и в пол проскочил в 2-2 без отключения вентилятора:
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
1 2
5 6 7