← Public packages
@kentcdodds/pirate-side-scroller
Left-to-right pirate ship shooter on the open sea, built with Three.js for phone or desktop
AGENTS.md
34 lines · 1.5 KB · Markdown@kentcdodds/pirate-side-scroller
This package is a hosted app only. It has no callable exports.
Layout
src/app.tsis the Kody fetch handler (kody.app.entry). It renders the HTML shell and links assets usingpackageContext.assetBasePathandpackageContext.clientModuleUrl. Never hard-code those paths.src/main.tsis the browser client (kody.app.client). It injectssrc/markup.tsinto the page and starts the game. It must stay browser-safe: nokody:imports and no CSS imports.public/iskody.app.assets: the stylesheet, the icon, and the web app manifest. The manifest uses relative URLs so it works under the app mount.index.htmlis only used by the local Vite dev server.src/kody-runtime.d.tsdeclares the slice ofkody:runtimethe app uses, so localtscpasses.
Smoke tests
After publishing, call packageAppFetch for @kentcdodds/pirate-side-scroller with
path /. Expect status 200 and HTML that references /_assets/style.css and a
client.<hash>.js module. Then open the hosted URL in a browser and start a
game.
Edge cases
- The high score and mute setting live in
localStorageunder thepirate-side-scroller:prefix. Package apps share an origin, so keep that prefix distinct from the other shooters'. - Gameplay changes should usually be mirrored in
@kentcdodds/pirate-shooter(vertical) and@kentcdodds/space-shooter, which share the same game loop. This version is rotated: the play field is landscape, the player is on the left, and enemies move right to left.