From 47e741f3073af0504a7a204d00597535c80a538d Mon Sep 17 00:00:00 2001 From: James Turk Date: Tue, 25 Apr 2023 23:31:20 -0500 Subject: [PATCH] HUD proto --- games/boybomb.p8 | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/games/boybomb.p8 b/games/boybomb.p8 index c97b844..1b831c2 100644 --- a/games/boybomb.p8 +++ b/games/boybomb.p8 @@ -160,13 +160,20 @@ function start_explainer() end levels = { - {name="lobby", mapx=16, mapy=8, bomb_x=6, bomb_y=7}, - {name="lab", mapx=26, mapy=8, bomb_x=6, bomb_y=7}, + {name="lobby 1", + mapx=16, mapy=8, bomb_x=6, bomb_y=7, + par=2, boss=8, + }, + {name="lab 1", + mapx=26, mapy=8, bomb_x=6, bomb_y=7, + par=5, boss=10, + }, } function start_level(n) start_scene("level") last_gravity = t() exploding = false + level_dets = 0 level_num = n level = levels[n] @@ -229,8 +236,14 @@ function draw_level() end end end - - print(level.name, 90, 6) + print(level.name, 90, 5, 11) + local jx = 86 + print("par "..level.par, jx, 24, 11) + print("dets "..level_dets, jx, 32, 11) + print("chain "..10, jx, 40, 11) + print("crates "..10, jx, 48, 11) + spr(level.boss, 10, 108, 1, 2) + print("stay still and don't \nexplode. we're here to help", 20, 110, 7) bomb_spr.x = bomb_x * 8 bomb_spr.y = bomb_y * 8 @@ -375,6 +388,7 @@ end function explode() exploding = true bomb_spr.speed = 0.1 + level_dets += 1 end -- globals @@ -386,6 +400,8 @@ _scenes.title = {start=nil, draw=draw_title, update=update_title} _scenes.explainer = {start=start_explainer, draw=draw_explainer, update=update_explainer} _scenes.level = {start=nil, draw=draw_level, update=update_level} +total_dets = 0 + GRID_W = 8 GRID_H = 9 BOX_WOOD = 137 @@ -542,16 +558,19 @@ c0c1c1c1c1c1c1c1c1c2c3c4c4c4c4c58b8900000000000000008c00000000008d8d000000000000 d0d1d1d1d1d1d1d1d1d2e3e4e4e4e4e589000000000000000000890000000000898900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 d0d1d1d1d1d1d1d1d1d2c3c4c4c4c4c500000000000000000000890000000000898900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 d0d1d1d1d1d1d1d1d1d2d300000000d500000000000000000000890000000000898900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -d0d1d1d1d1d1d1d1d1d2d300000800d500000000000000008900890000000000898900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -d0d1d1d1d1d1d1d1d1d2d300001800d500000000000000008b00890000000000898900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +d0d1d1d1d1d1d1d1d1d2d300000000d500000000000000008900890000000000898900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +d0d1d1d1d1d1d1d1d1d2d300000000d500000000000000008b00890000000000898900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 d0d1d1d1d1d1d1d1d1d2d300000000d5000000000000008b8900890000000000898900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 d0d1d1d1d1d1d1d1d1d2d300000000d58900000000008b898b00890000000000898900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 d0d1d1d1d1d1d1d1d1d2d300000000d5898b89000089898b89008b8b8b8b8b8b8b8b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 d0d1d1d1d1d1d1d1d1d2d300000000d500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +d0d1d1d1d1d1d1d1d1d2d3d4d4d4d4d500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +d0d1d1d1d1d1d1d1d1d2d3d4d4d4d4d500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 e0e1e1e1e1e1e1e1e1e2e3e4e4e4e4e500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 c3c4c4c4c4c4c4c4c4c4c4c4c4c4c4c500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -d3d4d4d4d4d4d4d4d4d4d4d4d4d400d500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +d3d4d4d4d4d4d4d4d4d4d4d4d4d4d4d500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 e3e4e4e4e4e4e4e4e4e4e4e4e4e4e4e500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +d400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 __sfx__ 490200003465028650216501c6501865016650166501665017650186501b6502065024650296502d6502e6502d6602b66026660236601f6601b66017660146600e6600b6600966008660176600d6700767006670 390100000265002650026500265002650026500265002650026500265002650006000060000600006000060000600006000060000600006000060000600006000060000600006000060000600006000060000600