QOL changes
This commit is contained in:
parent
44768ead9d
commit
93952ad87e
50
toomgis.p8
50
toomgis.p8
@ -198,14 +198,14 @@ end
|
|||||||
levels = {
|
levels = {
|
||||||
{
|
{
|
||||||
mapy=1,
|
mapy=1,
|
||||||
bad_item_ratio=0.12,
|
bad_item_ratio=0.08,
|
||||||
unit="CM",
|
unit="CM",
|
||||||
time=120,
|
time=120,
|
||||||
next=2,
|
next=2,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
mapy=5,
|
mapy=5,
|
||||||
bad_item_ratio=0.16,
|
bad_item_ratio=0.12,
|
||||||
unit="M",
|
unit="M",
|
||||||
time=90,
|
time=90,
|
||||||
next=3,
|
next=3,
|
||||||
@ -214,11 +214,13 @@ levels = {
|
|||||||
mapy=9,
|
mapy=9,
|
||||||
bad_item_ratio=0.18,
|
bad_item_ratio=0.18,
|
||||||
unit="KM",
|
unit="KM",
|
||||||
time=60,
|
time=90,
|
||||||
next=nil,
|
next=nil,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
horizon = 64
|
horizon = 64
|
||||||
|
min_speed = 1
|
||||||
|
max_speed = 4
|
||||||
|
|
||||||
|
|
||||||
function start_level(n)
|
function start_level(n)
|
||||||
@ -228,7 +230,7 @@ function start_level(n)
|
|||||||
tbody = {}
|
tbody = {}
|
||||||
px = 0
|
px = 0
|
||||||
py = 0
|
py = 0
|
||||||
vx = 0
|
vx = min_speed
|
||||||
vy = 0
|
vy = 0
|
||||||
yacc = 0
|
yacc = 0
|
||||||
streak = 0
|
streak = 0
|
||||||
@ -237,6 +239,13 @@ function start_level(n)
|
|||||||
lvl = levels[n]
|
lvl = levels[n]
|
||||||
lvl_end_time = time() + lvl.time
|
lvl_end_time = time() + lvl.time
|
||||||
reset_items()
|
reset_items()
|
||||||
|
-- initial items on screen
|
||||||
|
for item in all(items) do
|
||||||
|
-- all good
|
||||||
|
item.n = flr(rnd(12)+2)
|
||||||
|
item.x = 30 + rnd(80)
|
||||||
|
item.y = rnd(90) + 5
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function reset_items()
|
function reset_items()
|
||||||
@ -381,19 +390,6 @@ function level_upd()
|
|||||||
warnings = 2
|
warnings = 2
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
if btn(➡️) then
|
|
||||||
vx += 0.1
|
|
||||||
end
|
|
||||||
if btn(⬅️) then
|
|
||||||
vx -= 0.05
|
|
||||||
end
|
|
||||||
if vx < 0 then
|
|
||||||
vx = 0
|
|
||||||
elseif vx > 4 then
|
|
||||||
vx = 4
|
|
||||||
end
|
|
||||||
|
|
||||||
-- jump
|
-- jump
|
||||||
if btnp(❎) and py == 0 then
|
if btnp(❎) and py == 0 then
|
||||||
yacc = 6
|
yacc = 6
|
||||||
@ -435,12 +431,18 @@ function level_upd()
|
|||||||
sfx(5, 0)
|
sfx(5, 0)
|
||||||
hitbody()
|
hitbody()
|
||||||
streak = 0
|
streak = 0
|
||||||
|
vx = max(vx - 1, min_speed)
|
||||||
|
if vx < min_speed then
|
||||||
|
vx = min_speed
|
||||||
|
end
|
||||||
else
|
else
|
||||||
sfx(6, 0, 0, 4*streak2mult())
|
local mult = streak2mult()
|
||||||
for i=1,streak2mult() do
|
sfx(6, 0, 0, 4*mult)
|
||||||
|
for i=1,mult do
|
||||||
add2body(item.n)
|
add2body(item.n)
|
||||||
end
|
end
|
||||||
streak += 1
|
streak += 1
|
||||||
|
vx = min(vx + 0.1*mult, max_speed)
|
||||||
end
|
end
|
||||||
item.n = 0
|
item.n = 0
|
||||||
end
|
end
|
||||||
@ -455,7 +457,7 @@ function level_upd()
|
|||||||
to_check.n = flr(rnd(12)+2)
|
to_check.n = flr(rnd(12)+2)
|
||||||
end
|
end
|
||||||
to_check.x = px + 128 + rnd(100)
|
to_check.x = px + 128 + rnd(100)
|
||||||
to_check.y = rnd(90)
|
to_check.y = rnd(80) + 10
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -589,7 +591,7 @@ end
|
|||||||
function explainer_draw()
|
function explainer_draw()
|
||||||
cls(2)
|
cls(2)
|
||||||
rectfill(0, 40, 128, 80, 0)
|
rectfill(0, 40, 128, 80, 0)
|
||||||
print("toomgis loves snacks", 20, 1, 9)
|
print("snacks make toomgis big and fast", 1, 1, 9)
|
||||||
|
|
||||||
for n=0,14 do
|
for n=0,14 do
|
||||||
local ix = 10*n
|
local ix = 10*n
|
||||||
@ -602,9 +604,9 @@ function explainer_draw()
|
|||||||
toomgis_draw(50, 50)
|
toomgis_draw(50, 50)
|
||||||
spr(33, 50, 60, 2, 2)
|
spr(33, 50, 60, 2, 2)
|
||||||
|
|
||||||
print("toomgis hates stinky food", 7, 120, 9)
|
print("stinky makes toomgis upset", 7, 120, 9)
|
||||||
print("❎ jump\n🅾️ shred\n⬅️ move ➡️", 5, 50)
|
print("❎ jump\ngrab/dodge\n", 5, 50)
|
||||||
print("\"too much good\n stuff\"", 70, 55)
|
print("🅾️ shred\nclear screen\n", 70, 50)
|
||||||
end
|
end
|
||||||
|
|
||||||
function explainer_upd()
|
function explainer_upd()
|
||||||
|
Loading…
Reference in New Issue
Block a user