scale to 2x graphics
This commit is contained in:
parent
2d9c206552
commit
4bbe47d158
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
||||||
src/img/*.png
|
src/img/*.png
|
||||||
|
.luarc.json
|
||||||
|
|
2
justfile
2
justfile
|
@ -10,7 +10,7 @@ simu: build
|
||||||
|
|
||||||
cook-assets:
|
cook-assets:
|
||||||
@(which aseprite > /dev/null) || (echo "Missing aseprite program"; exit 1)
|
@(which aseprite > /dev/null) || (echo "Missing aseprite program"; exit 1)
|
||||||
tup
|
-tup
|
||||||
|
|
||||||
setup:
|
setup:
|
||||||
tools/gen-luarc.nu
|
tools/gen-luarc.nu
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
: level_01.ase |> aseprite --batch --export-tileset %f --sheet %o |> %B-table-32-32.png
|
: level_01.ase |> aseprite --batch --export-tileset %f --sheet %o |> %B-table-16-16.png
|
||||||
: player.ase |> aseprite --batch %f --save-as %o |> %B.png
|
: player.ase |> aseprite --batch %f --save-as %o |> %B.png
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB |
|
@ -9,11 +9,12 @@ local playerSprite = nil
|
||||||
local atlas = nil
|
local atlas = nil
|
||||||
|
|
||||||
function gameInit()
|
function gameInit()
|
||||||
|
playdate.display.setScale(2)
|
||||||
local playerImage = gfx.image.new("img/player")
|
local playerImage = gfx.image.new("img/player")
|
||||||
assert(playerImage)
|
assert(playerImage)
|
||||||
|
|
||||||
playerSprite = gfx.sprite.new(playerImage)
|
playerSprite = gfx.sprite.new(playerImage)
|
||||||
playerSprite:moveTo(200, 120) -- (200,120) is the center of the Playdate screen
|
playerSprite:moveTo(100, 60) -- (200,120) is the center of the Playdate screen
|
||||||
playerSprite:add()
|
playerSprite:add()
|
||||||
|
|
||||||
atlas = gfx.imagetable.new("img/level_01")
|
atlas = gfx.imagetable.new("img/level_01")
|
||||||
|
@ -47,5 +48,5 @@ function playdate.update()
|
||||||
|
|
||||||
gfx.sprite.update()
|
gfx.sprite.update()
|
||||||
playdate.timer.updateTimers()
|
playdate.timer.updateTimers()
|
||||||
atlas:drawImage(2, 32, 32)
|
atlas:drawImage(2, 16, 16)
|
||||||
end
|
end
|
||||||
|
|
0
tools/gen-luarc.nu
Normal file → Executable file
0
tools/gen-luarc.nu
Normal file → Executable file
0
tools/luarc_sample.json
Normal file → Executable file
0
tools/luarc_sample.json
Normal file → Executable file
Loading…
Reference in a new issue