From 9be34a91d63e27b1776443987b03e708ca9e3eb1 Mon Sep 17 00:00:00 2001 From: James Turk Date: Thu, 9 Mar 2023 00:17:50 -0600 Subject: [PATCH] v1.0 --- snowdogs.p8 | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/snowdogs.p8 b/snowdogs.p8 index 2deda16..ce5c346 100644 --- a/snowdogs.p8 +++ b/snowdogs.p8 @@ -37,9 +37,11 @@ function _draw() draw_game() draw_snow() draw_hud() - draw_bounds() + --draw_bounds() elseif mode == "gameover" then - draw_flag() + draw_flag(true) + elseif mode == "win" then + draw_flag(false) end end @@ -113,6 +115,8 @@ function cast_dr() print("dogs", 38, 110, 1) sled_dr() + print("❎ to mush", 45, 75, 1) + draw_heart(100, 80) draw_fan(100, 90) print("the fan", 90, 120) @@ -195,8 +199,8 @@ function draw_hud() print("▒", 108, 0, 0) if distance >= goal then - print("you win!", 35, 64) - -- if distance is near 100 + mode = "win" + -- if distance is near multiple of 1000 elseif distance%1000 < 100 then local mtg = ceil((goal-distance)/1000)*100 print(mtg.." miles to go!", 30, 64) @@ -228,7 +232,7 @@ function sled_upd() steering = 0 end - speed = 1 + (distance / 5000) + speed = 2 + (distance / 3000) if btnp(4) and t() - mush_time > 1 then mush_time = t() @@ -472,7 +476,7 @@ end -->8 --end screens -function draw_flag() +function draw_flag(loser) cls() for x=0,128,1 do @@ -494,7 +498,14 @@ function draw_flag() print("★", star.x, star.y + sin(t()+((star.x+4)/128)) * 5-10, 9) end - print("better luck next year", 20, 115, 9) + if loser then + print("better luck next year", 20, 115, 9) + else + music(0) + local scale = (sin(t()) + 2)*2.5 * 8 + sspr(32, 24, 8, 8, 80-scale/2, 48-scale/2, scale, scale) + print("see you again in '84!", 20, 115, 9) + end end __gfx__