From 08cbd078565d6f90c2d92bbfdea45e43bda366a8 Mon Sep 17 00:00:00 2001 From: James Turk Date: Sun, 9 Apr 2023 22:44:09 -0500 Subject: [PATCH] game works, version 0.8 --- toomgis.p8 | 184 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 180 insertions(+), 4 deletions(-) diff --git a/toomgis.p8 b/toomgis.p8 index 71cfa33..d8d6303 100644 --- a/toomgis.p8 +++ b/toomgis.p8 @@ -16,6 +16,8 @@ function _draw() gameover_draw() elseif state == "winscreen" then winscreen_draw() + elseif state == "explainer" then + explainer_draw() end end @@ -30,6 +32,8 @@ function _update() gameover_upd() elseif state == "winscreen" then winscreen_upd() + elseif state == "explainer" then + explainer_upd() end end @@ -97,13 +101,13 @@ function ampm_upd() ampm_t += 1 if ampm_t > 350 then - start_level(1) + start_explainer() ampm_t = 0 end tangle -= 0.02 - if btn(❎) then - start_level(1) + if btnp(❎) then + start_explainer() end end @@ -227,7 +231,6 @@ function reset_items() end function level_draw() - -- background --rectfill(0, 0, 128, horizon, lvl.sky) --rectfill(0, horizon, 128, 128, lvl.gnd) @@ -503,7 +506,50 @@ function winscreen_upd() py += 0.5 end +function start_explainer() + state = "explainer" + scene_start = time() + tbody = {} + -- for i=2, 14 do + -- add2body(i) + -- add2body(i) + -- end +end +function explainer_draw() + cls(2) + rectfill(0, 40, 128, 80, 0) + print("toomgis loves snacks", 20, 1, 9) + + for n=0,14 do + local ix = 10*n + spr(n+2, ix, 20+10*sin(t()+n/14)) + local iy = 100+10*cos(t()+n/14) + spr(n+18, ix, iy) + draw_stink(ix, iy) + end + + toomgis_draw(50, 50) + spr(35, 50, 60, 2, 2) + + for n=0,14 do + end + print("toomgis hates stinky food", 7, 120, 9) + + print("❎ jump\n🅾️ shred\n⬅️ move ➡️", 5, 50) + + print("\"too much good\n stuff\"", 70, 55) + +end + +function explainer_upd() + if time() - scene_start > 10 then + start_level(1) + end + if btnp(❎) then + start_level(1) + end +end -- @@ -604,6 +650,136 @@ __gfx__ 00000000880880c0090990990c0c0880909909900bb0bb000bbbbb900ed88ed000000000070707070d7d7d700a9a9a900ffffff0cc0cc0cc0550555000000000 00000000666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666600000000 00000000555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555500000000 +__label__ +00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00009999999999999999999900009999999000099999999000099999999000000000000000000000000000000000000000000000000000000000000000000000 +00009999999999999999999900009999999000099999999000099999999000000000000000000000000000000000000000000000000000000000000000000000 +00009999999999999999999900009999999000099999999000099999999000000000000000000000000000000000000000000000000000000000000000000000 +00009999999999999999999900009999999000099999999000099999999000000000000000000000000000000000000000000000000000000000000000000000 +00009999999999999999999900009999999000099999999000099999999000000000000000000000000000000000000000000000000000000000000000000000 +00009999999999999999999900009999999000099999999000099999999000000000000000000000000000000000000000000000000000000000000000000000 +00009999999999999999999900009999999000099999999000099999999000000000000000000000000000000000000000000000000000000000000000000000 +00009999999999999999999900009999999000099999999000099999999000000000000000000000000000000000000000000000000000000000000000000000 +99999999999900009999999900009999999999999999999999999999999000000000000000000000000000000000000000000000000000000000000000000000 +99999999999900009999999900009999999999999999999999999999999000000000000000000000000000000000000000000000000000000000000000000000 +99999999999900009999999900009999999999999999999999999999999000000000000000000000000000000000000000000000000000000000000000000000 +99999999999900009999999900009999999999999999999999999999999000000000000000000000000000000000000000000000000000000000000000000000 +99999999999900009999999900009999999999999999999999999999999000ddd0ddd0ddd00dd0ddd0dd00ddd00dd00000000000000000000000000000000000 +99999999999900009999999900009999999999999999999999999999999000d0d0d0d0d000d000d000d0d00d00d0000000000000000000000000000000000000 +99999999999900009999999900009999999999999999999999999999999000ddd0dd00dd00ddd0dd00d0d00d00ddd00000000000000000000000000000000000 +99999999999900009999999900009999999999999999999999999999999000d000d0d0d00000d0d000d0d00d0000d00000000000000000000000000000000000 +99999999999900009999999900009999999000099999999000099999999000d000d0d0ddd0dd00ddd0d0d00d00dd000000000000000000000000000000000000 +99999999999900009999999900009999999000099999999000099999999000000000000000000000000000000000000000000000000000000000000000000000 +99999999999900009999999900009999999000099999999000099999999000000000000000000000000000000000000000000000000000000000000000000000 +99999999999900009999999900009999999000099999999000099999999000000000000000000000000000000000000000000000000000000000000000000000 +99999999999900009999999900009999999000099999999000099999999000000000000000a00000000000000000000000000000000000000000000000000000 +999999999999000099999999000099999990000999999990000999999990000000000000a0affff0000000000000000000000000000000000000000000000000 +99999999999900009999999900009999999000099999999000099999999000ccc00cc0accaccc4fcc0ccc00cc000000000000000000000000000000000000000 +999999999999000099999999000099999990000999999990000999999990000c00c0c0cacacccfcff00c00c00000000000000000000000000000000000000000 +888888888888000088888888000088888880000888888880000888888880000c00c0c0c8c8c8cfcff00c00ccc000000000000000000000000000000000000000 +888888888888000088888888000088888880000888888880000888888880000c00c0c0c8c9c8cfc4c00c0000c000000000000000000000000000000000000000 +888888888888000088888888000088888880000888888880000888888880087c00cc09cc98c8cfccc0ccc0cc0000000000000000000000000000000000000000 +88888888888800008888888800008888888000088888888000088888888008700000996488864f74000000000000000000000000000000000000000000000000 +88888888888800008888888800008888888000088888888000088888888047470000aa6444666444700000000000000000000000000000000000000000000000 +888888888888000088888888000088888880000888888880000888888880444700554a6444646477700000000000000000000000000000000000000000000000 +88888888888800008888888800008888888000088888888000088888888047770088bb6444666ffff00000000000000000000000000000000000000000000000 +888888888888000088888888000088888880000888888880000888888889ffff008f996444666ffcccccc0000000000000000000000000000000000000000000 +000088888888000088888888000088888880000888888880000888888889ffff00ff9966446f9fcc1111cc000000000000000000000000000000000000000000 +00008888888800008888888800008888888000088888888000088888888aaffa00f4aaa6666999c1111f1c000000000000000000000000000000000000000000 +00008888888800008888888800008888888000088888888ccc7888888888affa008f4a4aaaaaaac1f1ff1c000000000000000000000000000000000000000000 +000088888888000088888888000088888880000888888881164888888888aa800088bbb4a444a4c1ff111c000000000000000000000000000000000000000000 +00008888888800008888888800008888888000088888888116488888888aa8800008999bbb88abc1fff11c000000000000000000000000000000000000000000 +00008888888800008888888800008888888000088888888f164888888880aa0000000999999899cc1111cc000000000000000000000000000000000000000000 +00008888888800008888888800008888888000088888888ff648888888808a00000000aa9999995cccccc0000000000000000000000000000000000000000000 +00008888888800008888888800008888888000088888888ff648888888800000000000aaaa454544545400000000000000000000000000000000000000000000 +00000000888888888888888800008888888000088888888116688888888888800000000aaa454545555500000000000000000000000000000000000000000000 +00000000888888888888888800008888888000088888888ccc688888888888800000000000000004545444000000000000000000000000000000000000000000 +00000000888888888888888800008888888000088888888000a888888888888000222222220000045454e4400000000000000000000000000000000000000000 +00000000888888888888888800008888888000088888888000a888888888888002222222222000004e444e440000000000000000000000000000000000000000 +00000000888888888888888800008888888000088888888000a888888888888022444444442200004e4004e40000000000000000000000000000000000000000 +000000008888888888888888000088888880000888888880000888888888888022455445542200004e4004e40000000000000000000000000000000000000000 +0000000088888888888888880000888888800008888888800008888888888880225c7447c522000044e444e40000000000000000000000000000000000000000 +00000000888888888888888800008888888000088888888000088888888888822247444474222000044eee400000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000004545400000022224444442222000004447770000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000005555500000022224777742222000000064446600000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000005554545400000022029444492022000000064446660000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000ff8884545400000202029999992020200000064446060000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000fff8f87555500000202020999902020204444064446660000000000000000000000000000000000000 +000000000000000000000000000000000000000000000ffafff7454540000020202409904202024eee4464446600000000000000000000000000000000000000 +000000000000000000000000000000000000000000000afaff4447454000002020404ff404e202e444e46644600a000000000000000000000000000000000000 +0000000000000000000000000000000000000000000a0aaaa84777999000000020040ff049e294e4004e46666a0a000000000000000000000000000000000000 +00000000000000000000000000000000000000000000aaaaf8ffff9999060000000aaaaaaaae6666004e400a0aaaa00000000000000000000000000000000000 +0000000000000000000000000000000000000000000088888fffffaa8a0066660009aa77aaaa4545444e4000aaaa000000000000000000000000000000000000 +0000000000000000000000000000000000000000000089988ffff8aaaa0088880009aa778aae45459999aaa08888800000000000000000000000000000000000 +000000000000000000000000000000000000000000008989800ff8aa800087870009a8888aea5cccccc99aff8998800000000000000000000000000000000000 +00000000000000000000000000000000000000000000088800000aa8800078780009a877aaaecc1111ccaaf48989800000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000aa055a57870009aaaaaaeec1111f1caaff4888000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000008a0a8a88880009aaaaaa04c1f1ff1caafffff0000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000a0aaaa0000000eaaaa004c1ff111caa4ff4f0000000000000000000000000000000000000 +00002222222222222222000000002222222000022222222000022222222af000000000000004c1fff11c9f9ffff0000000000000000000000000000000000000 +0000222222222222222200000000222222200002222222200002222222288000099990000004cc1111cc99999f00000000000000000000000000000000000000 +00002222222222222222000000002222222000022222222000022222222880009999990000004ccccccaaaaaa000000000000000000000000000000000000000 +0000222222222222222200000000222222200002222222200002222222298000aaaa8a000000044444a444a44000000000000000000000000000000000000000 +000022222222222222220000000022222220000222222220000222222228000088aaaa00777000000bbb88abb000000000000000000000000000000000000000 +00002222222222222222000000002222222000022222222000022222222f000008aa800644466000099998999000000000000000000000000000000000000000 +00002222222222222222000000002222222000022222222000022222222f00000aa8800644466600009999990000000000000000000000000000000000000000 +00002222222222222222000000002222222000022222222000022222222f000000aa000644460600000000000000000000000000000000000000000000000000 +00002222000022222222222200002222222222222222222222222222222000ddd0dd000644466600000000000000000000000000000000000000000000000000 +000022220000222222222222000022222222222222222222222222222220000d00d0d00644466000000000000000000000000000000000000000000000000000 +000022220000222222222222000022222222222222222222222222222220000d00d0d00664460000000000000000000000000000000000000000000000000000 +000022220000222222222222000022222222222222222222222222222220000d00d0d00066660000000000000000000000000000000000000000000000000000 +00002222000022222222222200002222222222222222222222222222222000ddd0d0d00000000000000000000000000000000000000000000000000000000000 +00002222000022222222222200002222222222222222222222222222222000000000000000000000000000000000000000000000000000000000000000000000 +00002222000022222222222200002222222222222222222222222222222000000000000000000000000000000000000000000000000000000000000000000000 +00002222000022222222222200002222222222222222222222222222222000000000000000000000000000000000000000000000000000000000000000000000 +00002222000022222222222200002222222000022222222000022222222000000000000000000000000000000000000000000000000000000000000000000000 +00002222000022222222222200002222222000022222222000022222222000000000000000000000000000000000000000000000000000000000000000000000 +00002222000022222222222200002222222000022222222000022222222000ccc0ccc00cc0ccc000000cc0ccc000000000000000000000000000000000000000 +00002222000022222222222200002222222000022222222000022222222000c0c00c00c000c0000000c0c0c00000000000000000000000000000000000000000 +00002222000022222222222200002222222000022222222000022222222000cc000c00ccc0cc000000c0c0cc0000000000000000000000000000000000000000 +00002222000022222222222200002222222000022222222000022222222000c0c00c0000c0c0000000c0c0c00000000000000000000000000000000000000000 +00002222000022222222222200002222222000022222222000022222222000c0c0ccc0cc00ccc00000cc00c00000000000000000000000000000000000000000 +00002222000022222222222200002222222000022222222000022222222000000000000000000000000000000000000000000000000000000000000000000000 +00001111111111111111000000001111111000011111111000011111111000000000000000000000000000000000000000000000000000000000000000000000 +00001111111111111111000000001111111000011111111000011111111000000000000000000000000000000000000000000000000000000000000000000000 +00001111111111111111000000001111111000011111111000011111111000000000000000000000000000000000000000000000000000000000000000000000 +00001111111111111111000000001111111000011111111000011111111000000000000000000000000000000000000000000000000000000000000000000000 +00001111111111111111000000001111111000011111111000011111111000ccc00cc00cc0ccc00cc0ccc00cc000000000000000000000000000000000000000 +000011111111111111110000000011111110000111111110000111111110000c00c0c0c0c0ccc0c0000c00c00000000000000000000000000000000000000000 +000011111111111111110000000011111110000111111110000111111110000c00c0c0c0c0c0c0c0000c00ccc000000000000000000000000000000000000000 +000011111111111111110000000011111110000111111110000111111110000c00c0c0c0c0c0c0c0c00c0000c000000000000000000000000000000000000000 +000011111111000000000000000011111110000111111110000111111110000c00cc00cc00c0c0ccc0ccc0cc0000000000000000000000000000000000000000 +00001111111100000000000000001111111000011111111000011111111000000000000000000000000000000000000000000000000000000000000000000000 +00001111111100000000000000001111111000011111111000011111111000000000000000000000000000000000000000000000000000000000000000000000 +00001111111100000000000000001111111000011111111000011111111000000000000000000000000000000000000000000000000000000000000000000000 +00001111111100000000000000001111111000011111111000011111111000000000000000000000000000000000000000000000000000000000000000000000 +00001111111100000000000000001111111000011111111000011111111000000000000000000000000000000000000000000000000000000000000000000000 +00001111111100000000000000001111111000011111111000011111111000000000000000000000000000000000000000000000000000000000000000000000 +00001111111100000000000000001111111000011111111000011111111000000000000000000000000000000000000000000000000000000000000000000000 +00001111111100000000000000001111111000011111111000011111111111100000000000000000000000000000000000000000000000000000000000000000 +00001111111100000000000000001111111000011111111000011111111111100000000000000000000000000000000000000000000000000000000000000000 +00001111111100000000000000001111111000011111111000011111111111100000000000000000000000000000000000000000000000000000000000000000 +00001111111100000000000000001111111000011111111000011111111111100000000000000000000000000000000000000000000000000000000000000000 +00001111111100000000000000001111111000011111111000011111111111100000000000000000000000000000000000000000000000000000000000000000 +00001111111100000000000000001111111000011111111000011111111111100000000000000000000000000000000000000000000000000000000000000000 +00001111111100000000000000001111111000011111111000011111111111100000000000000000000000000000000000000000000000000000000000000000 +00001111111100000000000000001111111000011111111000011111111111100000000000000000000000000000000000000000000000000000000000000000 +00001111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00001111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00001111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00001111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00001111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00001111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00001111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00001111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + __map__ 272800000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b8b8b8b800000000000000000000000000000000000000000000000000 3738000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b8b8b8b8b4b8b8bdb3bdb8b8b8b8b3b1b1b3b8b8b8b8bebebebebebebebeb8b2b8b8bdb8b8beb8b6b8b8b1b4b8b8b8b8b8b8b8b8b8b8b8b8bcb8b9b8bebebebdb1b8b9beb4b8b3b1b8bdb2b8b1b8