initial commit

This commit is contained in:
2024-05-29 17:38:50 +03:00
commit 85225f7c2d
25 changed files with 1405 additions and 0 deletions

55
source/main.lua Normal file
View File

@@ -0,0 +1,55 @@
-- CoreLibs
import "CoreLibs/object"
import "CoreLibs/graphics"
import "CoreLibs/sprites"
import "CoreLibs/timer"
import "CoreLibs/crank"
local pd <const> = playdate
local gfx <const> = pd.graphics
TAGS = {
Pickup = 1,
Player = 2,
Hazard = 3
}
Z_INDEXES = {
Ground = 100,
Pickup = 50,
Player = 20
}
local font = gfx.font.new('font/Mini Sans 2X')
gfx.setFont(font)
-- Libraries
import "lib/AnimatedSprite"
playdate.display.setRefreshRate(50)
-- Game
import "level"
level = nil
local function initialize()
-- Make it different, every time!
math.randomseed(playdate.getSecondsSinceEpoch())
-- Init all the things!
level = Level()
playdate.resetElapsedTime()
end
initialize()
function pd.update()
gfx.sprite.update()
pd.timer.updateTimers()
pd.drawFPS(10,0)
if level then
level.update()
end
end