diff --git a/.gitignore b/.gitignore index eeb6598..ac7cff2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ src/img/*.png -.luarc.json diff --git a/flake.lock b/flake.lock index d24df7d..3af5933 100644 --- a/flake.lock +++ b/flake.lock @@ -1,21 +1,5 @@ { "nodes": { - "luacats": { - "flake": false, - "locked": { - "lastModified": 1740447442, - "narHash": "sha256-naorkTPkgJiEevBfpdRQtbCikN5YGiqWeIAWzCsEW4Q=", - "owner": "notpeter", - "repo": "playdate-luacats", - "rev": "7e56adacbbaceef923f24d898706aa3dec2225c1", - "type": "github" - }, - "original": { - "owner": "notpeter", - "repo": "playdate-luacats", - "type": "github" - } - }, "nixpkgs": { "locked": { "lastModified": 1740367490, @@ -54,7 +38,6 @@ }, "root": { "inputs": { - "luacats": "luacats", "nixpkgs": "nixpkgs", "playdate-sdk": "playdate-sdk" } diff --git a/flake.nix b/flake.nix index 263a0d0..e3cc328 100644 --- a/flake.nix +++ b/flake.nix @@ -7,13 +7,9 @@ url = "github:RegularTetragon/playdate-sdk-flake"; inputs.nixpkgs.follows = "nixpkgs"; }; - luacats = { - url = "github:notpeter/playdate-luacats"; - flake = false; - }; }; - outputs = { self, nixpkgs, playdate-sdk, luacats }: + outputs = { self, nixpkgs, playdate-sdk }: let system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; playdate-sdk-pkg = playdate-sdk.packages.${system}.default; @@ -22,14 +18,12 @@ mkShell { env = { PLAYDATE_SDK_PATH = playdate-sdk-pkg; - LUACATS_PATH = luacats.outPath; }; nativeBuildInputs = [ just lua-language-server playdate-sdk-pkg - nushell tup ]; }; diff --git a/justfile b/justfile index cde05dd..f71d7ed 100644 --- a/justfile +++ b/justfile @@ -10,7 +10,4 @@ simu: build cook-assets: @(which aseprite > /dev/null) || (echo "Missing aseprite program"; exit 1) - -tup - -setup: - tools/gen-luarc.nu + tup diff --git a/src/img/Tupfile b/src/img/Tupfile index 766965e..04c14dc 100644 --- a/src/img/Tupfile +++ b/src/img/Tupfile @@ -1,2 +1,2 @@ -: level_01.ase |> aseprite --batch --export-tileset %f --sheet %o |> %B-table-16-16.png +: level_01.ase |> aseprite --batch --export-tileset %f --sheet %o |> %B-table-32-32.png : player.ase |> aseprite --batch %f --save-as %o |> %B.png diff --git a/src/img/level_01.ase b/src/img/level_01.ase index b62a629..ca8a6dd 100644 Binary files a/src/img/level_01.ase and b/src/img/level_01.ase differ diff --git a/src/img/player.ase b/src/img/player.ase index b1263b8..6454979 100644 Binary files a/src/img/player.ase and b/src/img/player.ase differ diff --git a/src/img/player.png b/src/img/player.png new file mode 100644 index 0000000..3d5b500 Binary files /dev/null and b/src/img/player.png differ diff --git a/src/main.lua b/src/main.lua index 792cb77..fa5c03e 100644 --- a/src/main.lua +++ b/src/main.lua @@ -9,12 +9,11 @@ local playerSprite = nil local atlas = nil function gameInit() - playdate.display.setScale(2) local playerImage = gfx.image.new("img/player") assert(playerImage) playerSprite = gfx.sprite.new(playerImage) - playerSprite:moveTo(100, 60) -- (200,120) is the center of the Playdate screen + playerSprite:moveTo(200, 120) -- (200,120) is the center of the Playdate screen playerSprite:add() atlas = gfx.imagetable.new("img/level_01") @@ -48,5 +47,5 @@ function playdate.update() gfx.sprite.update() playdate.timer.updateTimers() - atlas:drawImage(2, 16, 16) + atlas:drawImage(2, 32, 32) end diff --git a/tools/gen-luarc.nu b/tools/gen-luarc.nu deleted file mode 100755 index d2d1b47..0000000 --- a/tools/gen-luarc.nu +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env nu - -def main [] { - const here = path self . - let sample = open ($here | path join luarc_sample.json) - mut updated = $sample | update "workspace.library" { $env.LUACATS_PATH} - $updated | save --force ($here | path join .. .luarc.json) -} diff --git a/tools/luarc_sample.json b/tools/luarc_sample.json deleted file mode 100755 index 0cf1799..0000000 --- a/tools/luarc_sample.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json", - "diagnostics.globals": ["import"], - "diagnostics.severity": { - "duplicate-set-field": "Hint" - }, - "format.defaultConfig": { - "indent_style": "space", - "indent_size": "4" - }, - "runtime.builtin": { - "io": "disable", - "os": "disable", - "package": "disable" - }, - "runtime.nonstandardSymbol": ["+=", "-=", "*=", "/=", "//=", "%=", "<<=", ">>=", "&=", "|=", "^="], - "runtime.version": "Lua 5.4", - "workspace.library": [] -}