Overview
Section titled “Overview”
Starship
A folded single-seat starfighter that answers an orbital beacon. Set the beacon down and the hull drops from low orbit, flares its retros, and settles onto the marked tile. Recall it and the engines spool the ship back up through the atmosphere, leaving the beacon in your pack.
- Type:Combat, Utility
- Rarity:legendary
- Stackable: Yes
A deployable starship beacon. Plant it down and the ship descends from orbit and lands on the marked tile — press R while placing to set its heading. Recall it (pick it up) and the ship lifts off and climbs out of the atmosphere, folding back into the beacon in your pack. Board a landed ship to fly it.
Sprite baking
Section titled “Sprite baking”The piloted ship is not a single sheet — it’s a multi-sheet rig driven by
ship.ts.
Every sheet is baked from one 3D model with the Blender headless baker
(kbve-model-sprites, source at packages/python/kbve/kbve/sprite/). Full baker
flag reference lives in the Blender doc; this
page is the ship-specific recipe so it isn’t lost.
| What | Path |
|---|---|
| Source model + skins | apps/agones/arpg/web/scripts/ship-src/ — fighter1.obj (+ .fbx), idolknight.jpg (engines on), idolknight_off.jpg (off) |
| Baked sheets (LFS) | apps/agones/arpg/web/public/assets/arcade/arpg/environment/structures/ship/ |
| Space-mode model copy | apps/agones/arpg/web/public/assets/arcade/arpg/models/ship/ (r3f SpaceScene loads the same OBJ) |
Model + skins are in-repo (moved off ~/Downloads in 9560dbb94) so bakes are
reproducible. idolknight_off.jpg is generated from the on skin via
kbve-skin-variant --hue green (kills the engine glow). After any re-bake + commit,
run ./kbve.sh -lfs arpg register origin — the sheets live on arpg.git LFS, not
the repo root (see Blender doc).
Sheet layout
Section titled “Sheet layout”Animated sheets are 4096x8192 = 512px frames, 8 anim cols × 16 dir rows,
row-major index dir * frames + f (Phaser reads it as frames: 8, directions: 16).
Atmosphere cutscenes are 8192x512 = 16 frames × 1 facing. --res 512 is
mandatory — 256px looked bad in-game (9560dbb94). Drive sub-states:
off → powerOn → lift → fly ⇄ {idle | move | bank}.
| Sheet | --anim-mode | --anim-frames | Dims | Skin | Behaviour |
|---|---|---|---|---|---|
ship.png | static | 1 | 2048×2048 | off | parked, engines dark |
ship_on.png | static | 1 | 2048×2048 | on | parked, engines lit |
ship_lift.png | lift | 8 | 4096×8192 | on | spool-up: rises once, holds at top |
ship_idle.png | idle | 8 | 4096×8192 | on | Hover — vertical bob loop |
ship_move.png | move | 8 | 4096×8192 | on | flying: bob (phase +90°) + roll sway |
ship_bank.png | bank | 8 | 4096×8192 | on | monotonic roll L→R; game indexes by turn-rate to HOLD a lean |
ship_leaving_atmosphere.png | launch | 16 | 8192×512 | on | ascension — cinematic climb to space |
ship_entering_atmosphere.png | launch (frames reversed) | 16 | 8192×512 | on | descension — its own sheet, the ascent baked with frames reversed |
ship.ts plays both atmosphere sheets forward off their own texture — entering is
not auto-reversed in-engine, so it ships as a separate baked sheet. (The only
in-engine reverse is land, which replays the lift sheet backward for a ground
descent — there is no separate land/powerOn/powerOff sheet.)
Common flags (all sheets)
Section titled “Common flags (all sheets)”--frames 16 --pitch 90 --elev 35 --yaw-offset 0 --real-shadowStatic sheets add --anim-frames 1; animated add --anim-frames 8 --anim-mode <mode>;
atmosphere cutscenes use --frames 1 --anim-frames 16 --anim-mode launch (1 facing,
16-frame ascent — bake leaving, reverse the frames for entering).
Shadows — always --real-shadow for animated sheets
Section titled “Shadows — always --real-shadow for animated sheets”Two shadow modes (see Blender doc):
--real-shadow(use this) — a Cycles shadow-catcher on a fixed ground plane. The cast shadow stays planted on the floor while the hull bobs/lifts, so the growing gap reads as genuine hover.lift/idle/move/bankall use it.- Fake (post-process default) —
sprite_postprocess.pyderives the shadow from each frame’s silhouette bottom (bbox[3]), which rises with a vertical bob → on the hover loop the shadow glues to the hull and floats. Looks wrong for any bobbing sheet.
--bob is the Y-wobble amplitude (fraction of model size) — lower = less wobble
(0.06 default bobbed too hard). Current values: idle (hover) 0.015, move (flying)
0.01 (both deliberately tiny; the ship should barely undulate). --lift 0.6 =
resting hover height.
The bob is one full sine cycle over the anim loop, so its speed is the sheet’s
playback fps in ship.ts SHIP_SHEETS, not a bake flag — drop move/idle fps there
if the bob still cycles too fast after the amplitude fix.
Re-bake recipes
Section titled “Re-bake recipes”Hover (ship_idle) — low wobble + grounded shadow:
uv run --project packages/python/kbve kbve-model-sprites -- \ --model apps/agones/arpg/web/scripts/ship-src/fighter1.obj \ --skin apps/agones/arpg/web/scripts/ship-src/idolknight.jpg \ --out ship_idle --frames 16 --anim-frames 8 --anim-mode idle --res 512 \ --elev 35 --pitch 90 --yaw-offset 0 --lift 0.6 --bob 0.015 --real-shadowMove / lift / bank — same flags, swap --anim-mode {move|lift|bank} and --out. move
uses --bob 0.01 (+ --sway 8 roll); lift/bank ignore --bob (lift ramps to
--lift, bank holds it).
Ascension / descension (atmosphere cutscenes)
Section titled “Ascension / descension (atmosphere cutscenes)”launch mode is the cinematic: the hull accelerates upward (ease-in t²), pitches
nose-to-sky, and shrinks to fake distance — so the shadow plane (kept by --real-shadow)
falls away beneath it = a real “leaving the planet” read. ship.ts plays both sheets
forward, so bake two sheets: ascension forward, descension as the ascent with its
frames reversed.
# ascension — ship_leaving_atmosphere.pnguv run --project packages/python/kbve kbve-model-sprites -- \ --model apps/agones/arpg/web/scripts/ship-src/fighter1.obj \ --skin apps/agones/arpg/web/scripts/ship-src/idolknight.jpg \ --out ship_leaving --frames 1 --anim-frames 16 --anim-mode launch --res 512 \ --elev 35 --pitch 90 --yaw-offset 0 --real-shadow \ --launch-height 5 --launch-pitch 70 --launch-shrink 0.12Descension (ship_entering_atmosphere.png) = the same ascent with frame order
reversed. The baker has no reverse flag, so bake launch as above into a temp dir,
then reverse the 16 frame_NN.png before stitching the sheet (rename ascending →
descending, or reverse the strip). Same --launch-* knobs as ascension so the two read
as exact opposites.
Cinematic tuning knobs (defaults shown — bump for more drama):
| Flag | Meaning | Default |
|---|---|---|
--launch-height | ascent height × model size | 5 |
--launch-pitch | nose-up pitch deg at apex | 70 |
--launch-shrink | final scale (fakes distance) | 0.12 |
After baking, copy <out>/sheet.png → the asset dir as <sheet>.png, keep ship.ts
SHIP_SHEETS frame sizes at 512, then ./kbve.sh -lfs arpg register origin.
