diff --git a/Dockerfile b/Dockerfile index a49d5ed..3b9bc55 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ FROM node:22-alpine AS build WORKDIR /app COPY package*.json ./ -RUN npm install +RUN npm install --no-audit --no-fund COPY . . -RUN npm run build +RUN rm -f public/assets/terrain-sheet.png public/assets/flora-sheet.png public/assets/fauna-sheet.png public/assets/player-sheet.png && npm run build FROM nginx:1.27-alpine COPY nginx.conf /etc/nginx/conf.d/default.conf diff --git a/README.md b/README.md index 84804ec..058855d 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,33 @@ # Squirrel Forest -A small 2D adventure-platformer prototype about a squirrel exploring a living woodland full of unusual flora, fauna and mushrooms. +A 2D Phaser adventure-platformer about a squirrel exploring a living woodland full of flora, fauna and unusual mushrooms. -## Prototype loop +## Current prototype -- Explore a continuous side-scrolling forest. -- Run and jump across roots and branches. -- Collect acorns while searching for five unusual mushrooms. -- Pass through named woodland areas with ferns, flowers, frogs and butterflies. -- Find all five forest caps to awaken the Moonlit Grove. -- Follow the fireflies to complete the prototype trail. - -Everything in the first prototype uses Phaser-generated textures, so there are no external art dependencies yet. +- Side-scrolling exploration across five named woodland areas. +- Animated squirrel with separate visual and physics bodies. +- Keyboard and multi-touch movement/jumping. +- One-way log platforms: jump through from below and land from above. +- Acorn collection and five mushroom discoveries. +- Ambient frogs, hedgehogs, butterflies and fireflies. +- Moonlit Grove completion sequence. ## Controls - **Move:** A/D or Left/Right - **Jump:** W, Up or Space -- **Touch:** on-screen left/right/jump controls +- **Touch:** independent left/right and jump controls + +## Structure + +- `src/main.js` — scene orchestration, world content, HUD and input. +- `src/PlayerController.js` — squirrel physics/visual synchronization and animation state. +- `src/worldConfig.js` — shared world/surface geometry and platform metadata. +- `public/assets/player-game-sheet.png` — normalized squirrel animation sheet. +- `public/assets/world-atlas.png/json` — optimized runtime atlas for terrain, flora and fauna. +- `source-assets/` — preserved original source art sheets. + +The original large public source sheets are retained in Git for now, but the production Docker build removes them before Vite runs so they are not shipped to the browser. ## Run @@ -34,13 +44,13 @@ npm run build ## Direction -The intended feel is a cosy exploratory woodland adventure: dense layers of forest, lots of discoverable species, small traversal secrets and environmental storytelling rather than combat-first progression. +The intended feel is a cosy exploratory woodland adventure focused on traversal, discovery, environmental storytelling and small animal interactions rather than combat-first progression. Good next slices: -1. replace generated graphics with a hand-painted squirrel animation set; -2. add climbable trunks and branch-to-branch movement; -3. introduce a field-guide journal for discovered plants, fungi and animals; -4. split the forest into richer biome pockets such as birch grove, damp hollow, old oak canopy and moonlit marsh; -5. add tiny NPC animals and lightweight quests; -6. add ambient audio, leaf particles, weather and a day/night cycle. +1. climbable trunks and branch-to-branch movement; +2. field-guide journal for discovered plants, fungi and animals; +3. richer biome pockets such as birch grove, damp hollow, old oak canopy and moonlit marsh; +4. lightweight animal NPC quests; +5. acorn throwing / interaction using the existing player frames; +6. re-enable audio behind a user gesture once the sound pass begins. diff --git a/index.html b/index.html index 85990f3..6c78765 100644 --- a/index.html +++ b/index.html @@ -10,7 +10,10 @@