I think the issue I was having was a weird interaction between drawOffset()
and draw(x,y, sourceRect)
. I recreated a minimal example that works:
function playdate.update()
gfx.clear()
counter += 1
yPos = height - counter
--gfx.setDrawOffset(-24, counter)
floor:draw(0, 0, 0, yPos, 400, 240)
coins:draw(0, 0, 0, yPos, 400, 240)
end
In the process a possible bug was discovered, reported here: Tilemap behaves unexpectedly when drawOffset is set