-- title: bomber guy
-- author: pixelbath
-- desc: a grid-based bomb action game that bears no resemblance to any other game
-- script: lua
t=0
gridSize=16
p1={
x=0,
y=0,
bombout=0,
bombmax=1,
bomblvl=1,
speed=1,
can_pass_block=0,
can_pass_bomb=0,
is_fireproof=0,
has_remote=0,
is_left=1,
is_up=0,
}
items={
{ 'fireup', 64 },
{ 'bombup', 66 },
{ 'spedup', 68 },
{ 'blckps', 70 },
{ 'bombps', 72 },
{ 'fproof', 74 },
{ 'remote', 76 },
}
field_offset={10,10}
field_data={}
spr_block=32
spr_block_dis={34,36,38,40,42,44}
spr_door=46
function draw_player()
spr(256, p1.x+field_offset[1], p1.y+field_offset[2], 0, 1, 0, 0, 2, 2)
end
-- on a 4:3 screen:
-- fixed tile width: 15
-- fixed tile height: 13
-- Bomberman 1:
-- total width: 17
-- total height: 13
function generate_level(level_num, is_bonus)
field_data={}
for y=0,12 do
for x=0,16 do
field_data[y][x] = 0
local draw_cell = false
if x==0 or x==16 then
draw_cell = true
end
if not draw_cell and math.fmod(y, 2) and math.fmod(x, 2) == 0 then
draw_cell = true
end
if draw_cell then
field_data[y][x] = 1
end
end
end
end
function TIC()
if btn(0) then
p1.y=p1.y-p1.speed
end
if btn(1) then
p1.y=p1.y+p1.speed
end
if btn(2) then
p1.x=p1.x-p1.speed
end
if btn(3) then
p1.x=p1.x+p1.speed
end
cls(13)
draw_player()
t=t+1
end
--
-- 000:6666666666666666666666666666666666666666666666666666666666666666
-- 001:6666666666666666666666666666666666666666666666666666666666666666
-- 002:dcccccccedddddddedddddddedddddddedddddddedddddddedddddddeddddddd
-- 003:ccccccccdddddddcdddddddcdddddddcdddddddcdddddddcdddddddcdddddddc
-- 016:6666666666666666666666666666666666666666666666666666666666666666
-- 017:6666666666666666666666666666666666666666666666666666666666666666
-- 018:edddddddedddddddedddddddedddddddedddddddedddddddedddddddeeeeeeee
-- 019:dddddddcdddddddcdddddddcdddddddcdddddddcdddddddcdddddddceeeeeeed
-- 032:ffffffff0ccccdddcdddddddedddddddeeeeddddfffff000dddcfffcedddcfcd
-- 033:fcccccffddddddcfdddddddfdddddddfddeeddff0fffffffccccddddddddddde
-- 034:222222222cccc444c4444444344444443333444422222622444c222c3444c2c4
-- 035:2ccccc22444444c244444442444444424433442222222222cccc444444444443
-- 036:6666222222ccc444cc444444344444442334444426666666444c66224444c22c
-- 037:2ccccc26444444c244444442444444424433442222222662cccc444444444444
-- 038:666662222ccccc44c4444cccc4444444334444446666666644c666664444c666
-- 039:2ccccc66444444c6cccc44464444444244444c66666666666ccc444444444444
-- 040:6666666666666ccc644cccccc44ccccccc4444446666666644c66666cc44c666
-- 041:66666666ccc44466cccccc46ccccc44644444c66666666666ccc44444ccccccc
-- 042:66666666666664446644cccc644ccccc664444446666666644666666cc446666
-- 043:6666666644666666cccc4666ccccc466444466666666666666664444444ccccc
-- 044:66666666666666666666664c66644ccc666666666666666666666666cc466666
-- 045:6666666666666666c4666666cc446666666666666666666666666666644ccccc
-- 046:0011111101e2222f1e23332f1231132f1212222f1222222f122dd22f121dd11f
-- 047:111110002222e10023332e1023113210222212102222221022dd221011dd1210
-- 048:dddddfdddddddfee0000ccd0dddddddcddddddddddddddddddddddddfffeedde
-- 049:dddddddddddddddd00fffff0c0fccccddfcdddddefddddddefedddddffffffff
-- 050:44444244444442332222cc424444444c44444444444444444444444466233443
-- 051:444444444444444422222222c22cccc442c44444324444443234444422222222
-- 052:444442c4444442342222cc424444444c44444444444444444444444466233443
-- 053:444444444444444466622222c66cccc446c44444324444443234444462222266
-- 054:c44446c4444c666322666666444444cc44444444cccc44444444444466634226
-- 055:444ccccc4444444466666622666cccc4c6c44444424444443234444462266666
-- 056:cccc4666444c666666666666444444ccccccccc4cccccc444444444666666666
-- 057:44cccccc6444444466666666666cccc4c6c4ccccc6444ccc6664444466666666
-- 058:c4444666666666666666666644444444ccccccc4444444664444666666666666
-- 059:64444ccc6666666666666666666666444644cccc6666444c6666666466666666
-- 060:66666666666666666666666666666666cccc4466666666666666666666666666
-- 061:66666666666666666666666666666666666444cc666666666666666666666666
-- 062:121ee111122ff22f1222222f1232232f1213332f1221112f1e22222fffffffff
-- 063:11ee121022ff22102222221023223210233312102111221022222e10fffffff0
-- 064:aaaaaaaaaaaaaaaaaa666666aa666661aa666112aa661333aa613444aa134244
-- 065:aaaaaaaaaaaaaaaa161616aa313231aa334341aa444341aa444441aa244441aa
-- 066:aaaaaaaaaaaaaaaaaa666666aa666660aa66660faa6600ffaa60ffeeaa0fecdf
-- 067:aaaaaaaaaaaaaaaaf06666aa066666aad06666aafe0066aaeeee06aafffee0aa
-- 068:aaaaaaaaaaaaaaaaaa666666aa666666aa666666aa666666aa661111aa614333
-- 069:aaaaaaaaaaaaaaaa211111aa143321aa311216aa422216aa311216aa222216aa
-- 070:aaaaaaaaaaaaaaaaaa666666aaccbbbbaa660ddfaaccbbbfaa660fffaaccbbbb
-- 071:aaaaaaaaaaaaaaaa666666aab00000aaccccd0aadddde0aafffff0aaccddd0aa
-- 072:aaaaaaaaaaaaaaaaaa666666aacccccbaa66660faaccbbbfaa60ffeeaabbbbbb
-- 073:aaaaaaaaaaaaaaaaf06666aab66666aad06666aafe0066aaeeee06aafffee0aa
-- 074:aaaaaaaaaaaaaaaaaa663466aa623466aa634463aa634432aa623411aa222421
-- 075:aaaaaaaaaaaaaaaa662342aa362443aa463443aa234444aa114444aa124244aa
-- 076:aaaaaaaaaaaaaaaaaa666666aa666665aa6665c6aa664444aa643333aa633fff
-- 077:aaaaaaaaaaaaaaaa655cc6aac56666aa666666aa444466aa333346aafff336aa
-- 080:aa144144aa144444aa134311aa613441aa661134aa666611aaaaaaaaaaaaaaaa
-- 081:144441aa414441aa124431aa224316aa431166aa116666aaaaaaaaaaaaaaaaaa
-- 082:aa0fedffaa0fffffaa00ffffaa6000ffaa660000aa666600aaaaaaaaaaaaaaaa
-- 083:ffffe0aafffff0aaffff00aaff0006aa000066aa006666aaaaaaaaaaaaaaaaaa
-- 084:aa13ff32aa2f44f2aaf4de4faaf4ef3faa6f33f6aa66ff66aaaaaaaaaaaaaaaa
-- 085:22ff21aa2f44f1aaf4de4faaf4ef3faa6f33f6aa66ff66aaaaaaaaaaaaaaaaaa
-- 086:aa660dddaaccbbbeaa660ccfaaccbbdfaa660000aa666666aaaaaaaaaaaaaaaa
-- 087:ddfdd0aafffff0aaccdde0aacdddd0aa000000aa666666aaaaaaaaaaaaaaaaaa
-- 088:aa0fedffaabbbbbfaa00ffffaacbbbffaa660000aa666600aaaaaaaaaaaaaaaa
-- 089:ffffe0aafffff0aaffff00aaff0006aa000066aa006666aaaaaaaaaaaaaaaaaa
-- 090:aa441441aa442111aa444421aa444421aa444411aa444412aaaaaaaaaaaaaaaa
-- 091:144144aa111244aa124444aa124444aa114444aa214444aaaaaaaaaaaaaaaaaa
-- 092:aa63fee3aa63fe32aa63fe22aa63fe22aa63fef2aa63feefaaaaaaaaaaaaaaaa
-- 093:3eef36aa23ef36aa22ef36aa22ef36aa2fef36aafeef36aaaaaaaaaaaaaaaaaa
--
--
-- 000:0000cccc000ccccc00cccccc00c11ccc00c3261100c3353300bc333300dbcccc
-- 001:ccc00000cccc0000ccccc000cc11c0001623c0003533c000333cb000cccbd000
-- 002:0000cccc000ccccc00cccccc00cc111100cc133200ccc33300bcccc3000bcccc
-- 003:ccc00000cccc0000ccccc0001cccc000611610005335300033333000ccccb000
-- 010:00000000000000000000000c000000ef000ffe0000fffffe00fdceff0ffccdff
-- 011:0cc00000c000000000000000e000000000ff0000defff000fffff000ffffff00
-- 012:00000000000000000000000000000000000000ef000ffe0000fffffe00fdceff
-- 013:0000000000cc00000c000000c0000000fe000000000ff000edefff00ffffff00
-- 014:00000000000000000000000c000000ef000ffe0000fffffe00fdceff0ffccdff
-- 015:00cc0000cc00000000000000fe000000000ff000edefff00ffffff00fffffff0
-- 016:0ccdbccc0bcca98a03bbaaa90332999a0000bbca000babb9000cca0000022100
-- 017:ccbdcc0089accb00aaabb30099923300cbb00000bbab00000acc000001220000
-- 018:00000bcc0000a9bb0000aabc0000aaab000088a300000882000000cc00000022
-- 019:cccb0000bba00000cc900000cca000003380000023000000cb00000021000000
-- 026:0ffdcfff00ffffff00ffffff000fffff0000ffff000000ff0000000000000000
-- 027:ffffff00fffff000fffff000ffff0000fff00000f00000000000000000000000
-- 028:0ffccdff0ffdcfff00fff0ff000fffff0000ffff000000ff0000000000000000
-- 029:fffffff0fffffff0ffffff00fffff000ffff0000ff0000000000000000000000
-- 030:0ffdcfff00ffffff00ffffff000fffff0000ffff000000ff0000000000000000
-- 031:fffffff0ffffff00ffffff00fffff000ffff0000ff0000000000000000000000
-- 032:0000011100001344000134440013334401333333013333c301333c1301333c13
-- 033:111000004431000044431000443331003333331033c333103c1333103c133310
-- 034:0000111100013444001334440013334401333333013333c301333c1301333c13
-- 035:111100004443100044433100443331003333331033c333103c1333103c133310
-- 036:00001111001134440133444413333334133333c313333c1313333c1312333333
-- 037:1111000044431100444433104333333133c333313c1333313c13333133333321
-- 038:000001110000134400013444001333440133333301333c330133c1c30133c1c3
-- 039:111000004431000044431000443331003333331033c333103c1c33103c1c3310
-- 040:000000000000111000013441001333440013333300133c330001c1c30001c1c3
-- 041:000000000111000014431000443331003333310033c331003c1c10003c1c1000
-- 042:0000000000000000000034000003334400033c33000031c3000001c3000001c3
-- 043:0000000000000000004300004433300033c330003c1300003c1000003c100000
-- 044:00000000000000000000300000033c00000031c0000001c3000000c300000033
-- 045:00000000000000000003000000c330000c1300003c1000003c00000033000000
-- 046:0000000000000000000000000000000000003c00000003000000000000000000
-- 047:0000000000000000000000000000000000c30000003000000000000000000000
-- 048:0133333301233331001233330001223300001222000001110000000000000000
-- 049:3333331013333210333321003322100022210000111000000000000000000000
-- 050:0123333300123331001222330001122200000112000000010000000000000000
-- 051:3333321013332100332221002221100021100000100000000000000000000000
-- 052:0123333100122333000122220000112200000011000000000000000000000000
-- 053:1333321033322100222210002211000011000000000000000000000000000000
-- 054:01333c3301233331001233110001223300001222000001110000000000000000
-- 055:33c3331013333210113321003322100022210000111000000000000000000000
-- 056:00133c3300133331001233110001223300001111000000000000000000000000
-- 057:33c3310013333100113321003322100011110000000000000000000000000000
-- 058:00003c3100033331000233110000223000000000000000000000000000000000
-- 059:13c3000013333000113320000322000000000000000000000000000000000000
-- 060:0000033100003310000233000000200000000000000000000000000000000000
-- 061:1330000001330000003320000002000000000000000000000000000000000000
-- 062:0000030000003300000000000000000000000000000000000000000000000000
-- 063:0030000000330000000000000000000000000000000000000000000000000000
-- 064:0000000000000088000008cc0000008b000008cc00008bbc0008aaaa008abaca
-- 065:000000000000000080000000c8000000cb800000aab80000baab8000aacaa800
-- 066:000000080000008c0000008c0000008c000008cc00008bbc0008aaaa008abaca
-- 067:0000000080000000c8000000b8000000cb800000aab80000baab8000aacaa800
-- 068:0000000000000000000000080000008c000008cc00008bbc0008aaaa008aba8a
-- 069:0000000088000000cc800000b8000000cb800000aab80000baab8000aa8aa800
-- 070:000000080000008c0000008c0000008c000008cc00008bbc0008aaaa008abcaa
-- 071:0000000080000000c8000000b8000000cb800000aab80000baab8000aacaa800
-- 072:0000000000000000000000000000fff0000fabbf00faaabb00faaaaa00faacaa
-- 073:0000000000000000000000000fff0000fbbaf000bbaaaf00aaaaaf00aacaaf00
-- 074:000000000000000000000000000000000000ab00000aaabb000aacaa0000afca
-- 075:0000000000000000000000000000000000ba0000bbaaa000aacaa000acfa0000
-- 076:000000000000000000000000000000000000a000000aac000000afc000000fca
-- 077:00000000000000000000000000000000000a000000caa0000cfa0000acf00000
-- 078:0000000000000000000000000000000000000000000000000000ac0000000a00
-- 079:00000000000000000000000000000000000000000000000000ca000000a00000
-- 080:08abac8a08aaac8a08aaaaaa0f9aaaa800f99aaa000fffff00fa9f0000ffff00
-- 081:ac8aa800ac8aaaf0aaaaaaf08aaaa9f0aa9fff00fff9af0000ffff0000000000
-- 082:08abac8a08aaac8a08aaaaaa0f9aaaa800f99aaa000fffff00fa9f0000ffff00
-- 083:ac8aa800ac8aaaf0aaaaaaf08aaaa9f0aaa99f00fffff00000f9af0000ffff00
-- 084:08abac8a08aaacca08aaaaaa0f9aaaa800fff9aa00fa9fff00ffff0000000000
-- 085:ac8aa800accaaaf0aaaaaaf08aaaa9f0aaa99f00fffff00000f9af0000ffff00
-- 086:08abc8ca08aac8ca08aaacaa0f9aaaa800f99a88000fffff00fa9f0000ffff00
-- 087:ac8ca800ac8caaf0aacaaaf08aaaa9f088a99f00fffff00000f9af0000ffff00
-- 088:000fcfca000fcfca00faacaa00faaaaf00f9aaff000f99aa0000ffff00000000
-- 089:acfcf000acfcf000aacaaf00faaaaf00ffaa9f00aa99f000ffff000000000000
-- 090:00000fca00000fca0000acaf000aaaaf0009aaff000099a00000000000000000
-- 091:acf00000acf00000faca0000faaaa000ffaa90000a9900000000000000000000
-- 092:000000ca000000aa00000aaf0000aaf00009aa00000090000000000000000000
-- 093:ac000000aa000000faa000000faa000000aa9000000900000000000000000000
-- 094:000000000000000000000a000000aa0000000000000000000000000000000000
-- 095:000000000000000000a0000000aa000000000000000000000000000000000000
-- 096:0000023300002224000024240002224402234224222242423323344233444242
-- 097:3320000043200000442200002434300022222200222432222424433324242443
-- 098:0000000000000000000000000000000020002000022022222322332333333333
-- 099:0000000000000000000000000000000020002000022022222322332333333333
-- 100:0000000000000000000000000000000020002000022022222322332333333333
-- 101:0000000000000000000000000000000020220000222000003220000033220000
-- 112:3342424433324244223324320223242200224342000423420000223400000223
-- 113:4244244322444333424233222443222024232200443240004322000033200000
-- 114:3333333332332323202202220000200000000000000000000000000000000000
-- 115:3333333332332323202202220000200000000000000000000000000000000000
-- 116:3333333332332323202202220000200000000000000000000000000000000000
-- 117:3320000032200000222000002002000000000000000000000000000000000000
-- 128:0000223400022234002224340222233422243344224434443333344444444444
-- 129:4322000043420000443220004434422044432222444332224444433344444444
-- 130:0000000000000000000000002000020222222222333332333334333344444444
-- 131:0000000000000000000000002000020222222222333332333334333344444444
-- 132:0000000000000000000000002000020222222222333332333334333344444444
-- 133:0000000000000000000000000002200022220000322000004322000044320000
-- 144:4444444433344444223344442223334402242344002243440002433400002234
-- 145:4444444444444333444333224443222244324220443420004322200043220000
-- 146:4444444443333333332333232222222220220202000000000000000000000000
-- 147:4444444443333333332333232222222220220202000000000000000000000000
-- 148:4444444443333333332333232222222220220202000000000000000000000000
-- 149:4432200043220000322000002222000000022000000000000000000000000000
-- 160:0002334402222344222233442223334433333444333344444444444444444444
-- 161:4432200043322200443322024433322244333323444334344444444444444444
-- 162:0000000002002200020222022223222223333323334434343444434444444444
-- 163:0000000002002200020222022223222223333323334434343444434444444444
-- 164:0000000002002200020222022223222223333323334434343444434444444444
-- 165:0020020202002222222222202222222022222000332222203332220044322000
-- 176:4444444444444444433444443333444422334444222333440222334400223444
-- 177:4444444444444344444333334443332344332222433232024432220044332000
-- 178:4444444434434344233343332223232322222222020022020020000000000000
-- 179:4444444434434344233343332223232322222222020022020020000000000000
-- 180:4444444434434344233343332223232322222222020022020020000000000000
-- 181:4332200043322220332222022222220022222220222220002002222000000022
-- 192:2223444423334444333434443434444444444444444444444444444444444444
-- 193:4444320044333222444443334444433444444444444444444444444444444444
-- 194:2002020023232222333233333433433444444444444444444444444444444444
-- 195:2002020023232222333233333433433444444444444444444444444444444444
-- 196:2002020023232222333233333433433444444444444444444444444444444444
-- 197:2022020222202222222223203322332243333220444333224444322044443320
-- 208:4444444444444444444444443444444433444444333344442233344402233444
-- 209:4444444444444444444444444444444444444443444444434443332244443202
-- 210:4444444444444444444444443444433433333333332232332222222202002002
-- 211:4444444444444444444444443444433433333333332232332222222202002002
-- 212:4444444444444444444444443444433433333333332232332222222202002002
-- 213:4444332244443220444322224433320033233220232332002222222000200022
--
--
--
-- 000:00000000ffffffff00000000ffffffff
-- 001:0123456789abcdeffedcba9876543210
-- 002:0123456789abcdef0123456789abcdef
--
--
-- 000:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000304000000000
--
--
-- 000:00001010000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
--
--
-- 000:1a1c2c5d275db13e53ef7d57ffcd75a7f07038b76425717929366f3b5dc941a6f673eff7f4f4f494b0c2566c86333c57
--