warning for lag

This commit is contained in:
PossiblyAxolotl 2022-07-10 01:45:39 -06:00
parent cda62e0efd
commit 4b68a6ff67
4 changed files with 18 additions and 18 deletions

View file

@ -48,6 +48,7 @@ local imgExitMen = gfx.image.new("gfx/leave")
local imgSaw = gfx.imagetable.new("gfx/sawblades")
local imgTarget = gfx.image.new("gfx/target")
local imgGrid = gfx.image.new("gfx/grid")
local imgWarn = gfx.image.new("gfx/warningsign")
assert(imgFloppy)
assert(imgAdd)
assert(imgMus)
@ -62,6 +63,7 @@ assert(imgPlayerExit)
assert(imgSaw)
assert(imgTarget)
assert(imgGrid)
assert(imgWarn)
local animFloppy = gfx.animation.loop.new(100, imgFloppy)
@ -485,6 +487,8 @@ function editUpdate()
gfx.drawText("MOVERS",0,0)
elseif math.floor( tileIndex ) == 3 then
gfx.drawText("SPINNERS",0,0)
imgWarn:draw(0,18)
gfx.drawText("VERY LAGGY",18,18)
elseif math.floor( tileIndex ) == 4 then
gfx.drawText("PLAYER",0,0)
elseif math.floor( tileIndex ) == 5 then

View file

@ -30,7 +30,6 @@ next = nil
local gfx <const> = playdate.graphics
local disp <const> = playdate.display
local font <const> = gfx.font.new("gfx/big")
small = gfx.font.new("gfx/font(1)")
gfx.setFont(font)
gfx.setBackgroundColor(gfx.kColorBlack)
@ -138,9 +137,3 @@ function playdate.gameWillTerminate()
playdate.datastore.write({savedLevel=map,savedDeaths=deaths},"savegame")
end
end
function playdate.debugDraw()
gfx.setDrawOffset(0,0)
playdate.drawFPS(0,228)
small:drawText(math.floor( playdate.getCrankPosition() ), 0, 218)
end

View file

@ -56,11 +56,13 @@ function loadSpins(_spins)
s.middle:add()
local sb = {speed=s.speed,arms={},mid=s.middle,time=0}
--local sb = {speed=s.speed,arms=s.arms,armlen=s.armlen,saws = {},arcs = {},time=0}
--[[local sb = {speed=s.speed,layers={},time=0}
--[[for len = 1, s.armlen, 1 do
for len = 1, s.armlen, 1 do
local arc = playdate.geometry.arc.new(s.x,s.y, 20 * len, -720, 720)
sb.layers[#sb.layers+1] = {curve=arc,saws={}}
for arm = 1, s.arms, 1 do
local saw = gfx.sprite.new(loopSaws:image())
local sawPos = arc:pointOnArc(360 / s.arms * arm)
@ -68,11 +70,12 @@ function loadSpins(_spins)
saw:moveTo(sawPos.x,sawPos.y)
saw:add()
sb.saws[#sb.saws+1] = saw
sb.layers[#sb.layers].saws[#sb.layers[#sb.layers].saws+1] = saw
end
end
sb.arcs[#sb.arcs+1] = arc
end]]
spinblades[#spinblades+1] = sb]]
for i = 1, s.arms, 1 do
sb.arms[i] = {}
@ -146,14 +149,14 @@ function updateSaws()
s.time += s.speed
print(s.time)
for len = 1, s.armlen, 1 do
local arc = s.arcs[len]
for len = 1, #s.layers, 1 do
local arc = s.layers[len].curve
for arm = 1, s.arms, 1 do
local sawPos = arc:pointOnArc(arc:length() / 4 / s.arms * arm + (s.time * len))
if s.time > 125 * s.arms or s.time < -125 * s.arms then s.time = 0 end
for arm = 1, #s.layers[len].saws, 1 do
local sawPos = arc:pointOnArc(arc:length() / 4 / #s.layers[len].saws * arm + (s.time * len))
if s.time > 125 * #s.layers[len].saws or s.time < -125 * #s.layers[len].saws then s.time = 0 end
s.saws[arm+((len)*(arm-1))]:moveTo(sawPos.x,sawPos.y)
s.layers[len].saws[arm]:moveTo(sawPos.x,sawPos.y)
end
end
end]]

BIN
Source/gfx/warningsign.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 B