fix asset paths for subdirectory hosting, bump to 0.1.1
ci/woodpecker/push/woodpecker Pipeline was successful

The deployed build is served from /file/<name>-<version>/, but Vite
emitted absolute /assets/ URLs and BootScene loaded sprites from
/sprites/. Set base: "./" in vite.config.ts and make the sprite
paths relative so everything resolves next to index.html.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-01 23:14:20 +02:00
co-authored by Claude Fable 5
parent 25b3314e1b
commit e2221f634b
4 changed files with 15 additions and 7 deletions
+1 -1
View File
@@ -5,5 +5,5 @@
"desc": "A small pixel-art platformer: hop, jump, and outwit moving spikes and disappearing tiles across 10 levels. Made with Phaser 3.", "desc": "A small pixel-art platformer: hop, jump, and outwit moving spikes and disappearing tiles across 10 levels. Made with Phaser 3.",
"site": "https://git.teletypegames.org/games/trickster-tiles", "site": "https://git.teletypegames.org/games/trickster-tiles",
"license": "MIT License", "license": "MIT License",
"version": "0.1.0" "version": "0.1.1"
} }
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "trickster-tiles", "name": "trickster-tiles",
"private": true, "private": true,
"version": "0.1.0", "version": "0.1.1",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
+5 -5
View File
@@ -15,18 +15,18 @@ interface SpriteAsset {
} }
const SPRITE_ASSETS: SpriteAsset[] = [ const SPRITE_ASSETS: SpriteAsset[] = [
{ key: Player.TEXTURE_KEY, path: "/sprites/player.svg", width: Player.SIZE, height: Player.SIZE }, { key: Player.TEXTURE_KEY, path: "sprites/player.svg", width: Player.SIZE, height: Player.SIZE },
{ key: Exit.TEXTURE_KEY, path: "/sprites/exit.svg", width: Exit.WIDTH, height: Exit.HEIGHT }, { key: Exit.TEXTURE_KEY, path: "sprites/exit.svg", width: Exit.WIDTH, height: Exit.HEIGHT },
{ key: Platform.TEXTURE_KEY, path: "/sprites/platform.svg", width: 40, height: 40 }, { key: Platform.TEXTURE_KEY, path: "sprites/platform.svg", width: 40, height: 40 },
{ {
key: ObstacleSpikeNormal.TEXTURE_KEY, key: ObstacleSpikeNormal.TEXTURE_KEY,
path: "/sprites/spike-normal.svg", path: "sprites/spike-normal.svg",
width: ObstacleSpikeNormal.WIDTH, width: ObstacleSpikeNormal.WIDTH,
height: ObstacleSpikeNormal.HEIGHT, height: ObstacleSpikeNormal.HEIGHT,
}, },
{ {
key: ObstacleSpikeTricky.TEXTURE_KEY, key: ObstacleSpikeTricky.TEXTURE_KEY,
path: "/sprites/spike-tricky.svg", path: "sprites/spike-tricky.svg",
width: ObstacleSpikeTricky.WIDTH, width: ObstacleSpikeTricky.WIDTH,
height: ObstacleSpikeTricky.HEIGHT, height: ObstacleSpikeTricky.HEIGHT,
}, },
+8
View File
@@ -0,0 +1,8 @@
import { defineConfig } from "vite";
// The game is served from a versioned subdirectory
// (https://teletypegames.org/file/<name>-<version>/), so all asset
// URLs must be relative to index.html.
export default defineConfig({
base: "./",
});