← Public packages
@kentcdodds/space-shooter
Vertical scrolling spaceship shooter built with Three.js, playable on phone or desktop
AGENTS.md
32 lines · 1.4 KB · Markdown@kentcdodds/space-shooter
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/space-shooter 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 thespace-shooter:prefix. Package apps share an origin, so keep that prefix distinct from the pirate shooter's. - Gameplay changes should usually be mirrored in
@kentcdodds/pirate-shooter, which shares the same game loop.