Compare commits
No commits in common. "4bbe47d1587517a277bbf39e5d99c322633095af" and "f5a4ad11c6f17070e32ba51c244b43b48c7a300f" have entirely different histories.
4bbe47d158
...
f5a4ad11c6
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1 @@
|
||||||
src/img/*.png
|
src/img/*.png
|
||||||
.luarc.json
|
|
||||||
|
|
17
flake.lock
17
flake.lock
|
@ -1,21 +1,5 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"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": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1740367490,
|
"lastModified": 1740367490,
|
||||||
|
@ -54,7 +38,6 @@
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"luacats": "luacats",
|
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"playdate-sdk": "playdate-sdk"
|
"playdate-sdk": "playdate-sdk"
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,13 +7,9 @@
|
||||||
url = "github:RegularTetragon/playdate-sdk-flake";
|
url = "github:RegularTetragon/playdate-sdk-flake";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
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";
|
let system = "x86_64-linux";
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
playdate-sdk-pkg = playdate-sdk.packages.${system}.default;
|
playdate-sdk-pkg = playdate-sdk.packages.${system}.default;
|
||||||
|
@ -22,14 +18,12 @@
|
||||||
mkShell {
|
mkShell {
|
||||||
env = {
|
env = {
|
||||||
PLAYDATE_SDK_PATH = playdate-sdk-pkg;
|
PLAYDATE_SDK_PATH = playdate-sdk-pkg;
|
||||||
LUACATS_PATH = luacats.outPath;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
just
|
just
|
||||||
lua-language-server
|
lua-language-server
|
||||||
playdate-sdk-pkg
|
playdate-sdk-pkg
|
||||||
nushell
|
|
||||||
tup
|
tup
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
5
justfile
5
justfile
|
@ -10,7 +10,4 @@ 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:
|
|
||||||
tools/gen-luarc.nu
|
|
||||||
|
|
|
@ -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
|
: player.ase |> aseprite --batch %f --save-as %o |> %B.png
|
||||||
|
|
Binary file not shown.
Binary file not shown.
BIN
src/img/player.png
Normal file
BIN
src/img/player.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
|
@ -9,12 +9,11 @@ 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(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()
|
playerSprite:add()
|
||||||
|
|
||||||
atlas = gfx.imagetable.new("img/level_01")
|
atlas = gfx.imagetable.new("img/level_01")
|
||||||
|
@ -48,5 +47,5 @@ function playdate.update()
|
||||||
|
|
||||||
gfx.sprite.update()
|
gfx.sprite.update()
|
||||||
playdate.timer.updateTimers()
|
playdate.timer.updateTimers()
|
||||||
atlas:drawImage(2, 16, 16)
|
atlas:drawImage(2, 32, 32)
|
||||||
end
|
end
|
||||||
|
|
|
@ -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)
|
|
||||||
}
|
|
|
@ -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": []
|
|
||||||
}
|
|
Loading…
Reference in a new issue