Skip to content

Instantly share code, notes, and snippets.

@swtaarrs
Created July 5, 2022 22:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save swtaarrs/8104bd1e4f2becbad34ba842f59be19a to your computer and use it in GitHub Desktop.
Save swtaarrs/8104bd1e4f2becbad34ba842f59be19a to your computer and use it in GitHub Desktop.
import "CoreLibs/object"
import "CoreLibs/graphics"
local gfx<const> = playdate.graphics
local x, y = 0, 0
local width, height = 20, 20
function playdate.AButtonDown()
x += 10
y += 10
gfx.fillRect(x, y, width, height)
playdate.display.flush()
print(string.format("%.2f", playdate.getElapsedTime()))
end
playdate.display.setRefreshRate(1 / 3)
playdate.stop()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment