Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion docs/game.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ npm run dev
- **The pier:** out from the dock's water edge, east of the fish pile, a pier of the dock's own boards runs north over the water and turns west along it, an upside-down L, a step up from the dock with its first boards a ramp. Fish dip a little deeper as they swim under it (and under the voting boat). It's there in every stage; on election day the voting boat moors along its far side
- **Bins:** beside the places things are picked up, to throw away what you're carrying: steel kitchen bins behind the fish pile on the dock, by the water at the pier's foot, by the farmer's rice stack and the rice patch on the farm path (stage 2), and, down in the cellar (stage 3), open oil drums in the hearth room and by the fish circle in the prep hall. Stand at one and press **E** (on a touch screen, tap **Toss**). What's thrown away doesn't come straight back: after a toss, nothing's picked up (the fish pile, the rice, the cellar's plates, machines and counter) till you've stepped out of the spot and back in
- **Tutorial (stage 1):** a new player is shown the market one idea at a time, each when it first matters. A gold arrow bobs over where to go, with a gold ring on the ground under it and a bubble saying what to do there; while that spot is off-screen, the bubble waits at the edge of the screen with a gold tail pointing the way. First the loop, in order: stand on the 🎣 pad to fish, pick up the slices from the pile, drop them on the counter's 🐟 pad, and collect the cash. Then buying, cheapest first: Bigger arms ($30), a level at the 📈 Upgrade square ($40), and the auto harpoon ($90). Each is a goal: a message says what's next ("Next goal: Bigger arms, $30"), and a chip under the HUD shows it with the cash so far and a bar filling up, turning gold once there's enough. Then the arrow leads to it: on a tile, "stand on it and hold E" (or Buy on a touch screen, going by whether the Buy button is in use); on the Upgrade square, which is learnt by buying a level there, "tap" or "click one in the list". Anything bought ahead of its turn counts. When a tile that needs a better rating comes on offer, a tip says what it needs, with the ★ in the HUD pulsing, until it's been in view for 9 seconds. Each idea is learnt by doing it, and the arrow steps aside while you stand where it points (except where you buy, where what to do needs saying). The last of the basics (usually the harpoon) brings up a banner with confetti for 4 seconds: Well done, Tutorial complete, and under it "The rest is up to you. Go make it big!" The rating tip is for later and doesn't bring it back. A player never sees an idea twice: what they've learnt is kept on the device, so Restart doesn't bring it back, and in the save, so it follows a signed-in player to their other devices. Saves from before the tutorial count what they've already done: anything bought means the loop, buying and the harpoon are known (a save since keeps its own lessons, so reloading mid-tutorial skips nothing)
- **Settings (⚙️, top right),** in four groups. *You:* sign in for cloud saves, and **Your look** (below). *Graphics & sound:* **Graphics** (below), which opens into Auto, Low or High and shows the choice on its row, and **Sound**, which opens into the effects, the ambience and the music, each with a mute button and a volume from 1 to 10 (7 is the game's mix; each step is about 2 dB), remembered on the device. *Game:* **Controls**, which opens into How to play (the controls card) and a switch for the Buy button on screen (on unless turned off, kept on the device), and Restart. *About:* **Report a bug or idea** (see [Reports](#reports)); **Buy me a coffee**, which opens the game's [Ko-fi page](https://ko-fi.com/chefcontrol) in a pop-up window of its own (a new tab where pop-ups are blocked), so the game stays put; and last, **Credits & Copyrights**, which opens into the notices for the music and sound. Like Sound, Controls, Graphics and the credits each open and close with a click. While the menu is closed, a dot on the gear shows the cloud's state. After 10 minutes of play on a device, a toast says once where Buy me a coffee is and the gear pulses, unless the player has already found it
- **Settings (⚙️, top right),** in four groups. *You:* sign in for cloud saves, and **Your look** (below). *Graphics & sound:* **Graphics** (below), which opens into Auto, Low or High and shows the choice on its row, and **Sound**, which opens into the effects, the ambience and the music, each with a mute button and a volume from 1 to 10 (7 is the game's mix; each step is about 2 dB), remembered on the device. *Game:* **Controls**, which opens into How to play (the controls card) and a switch for the Buy button on screen (on unless turned off, kept on the device), and Restart. *About:* **Report a bug or idea** (see [Reports](#reports)); **Buy me a coffee**, which opens the game's [Ko-fi page](https://ko-fi.com/chefcontrol) in a pop-up window of its own (a new tab where pop-ups are blocked), so the game stays put; **Privacy notice**, which opens [the privacy notice](#privacy-notice) in a tab of its own, in every build; and last, **Credits & Copyrights**, which opens into the notices for the music and sound. Like Sound, Controls, Graphics and the credits each open and close with a click. While the menu is closed, a dot on the gear shows the cloud's state. After 10 minutes of play on a device, a toast says once where Buy me a coffee is and the gear pulses, unless the player has already found it
- **Your look (👕 in the settings):** dress the player from the crowd's wardrobe, free: a man's or a woman's build, six skin tones, eight hair colours and cuts (short, a quiff, curls, bald on top, long, a ponytail, a bun or a bob), a cartoon face the way PEAK does them (eyes: dots, round, sparkly, happy ^^, sleepy, lashes, angry brows or a wink; a mouth: none, a smile, a grin, the tongue out, an "o", flat, a smirk or a frown), a moustache, beard, goatee or earrings, glasses, rosy or freckled cheeks, and the colours of your top, trousers, skirt (worn in spring and summer) and shoes (snow boots in winter). Anyone can wear anything; 🎲 mixes up a whole look the way the crowd's are. While the panel is open the camera comes down in close for a head-to-toe look (rising higher if a wall or a counter is in the way), the player turns to face it and tries the look on in spring clothes with nothing on their head, so the hood or a hat doesn't hide it; walking off or Done puts the season's clothes back on over it. The look goes with the save (and to the cloud, for players who sign in), and stays on the device through a Restart
- **Fish:** stand on the 🎣 pad to hook fish; they get chopped into fish slices automatically
- **Sell fish (stage 1):** pick slices up from the pile, drop them on the counter's 🐟 pad, and walk over the cash to collect it. Walk-in customers pay $4 a slice; once the drive-up window is built, drivers on the road buy 4–8 at a time at $6
Expand Down Expand Up @@ -292,6 +292,13 @@ On the casino boat, a sign hangs from the wall behind the bar, over its window e
- All of this is in `firestore.rules`; the rules are tested against the Firestore emulator in `test/rules/`.
- **Becoming issues:** a workflow in the private repo `ChefControl/floe-market-reports` turns each report into an issue every 30 minutes, with the picture inline. It deletes pictures and saves after 30 days (7 for reports sent before the game said 30). Its code and setup are in [`intake/`](intake/README.md).

### Privacy notice

`public/privacy.html` is the privacy notice for the web game and the Steam version, on the site at `/privacy.html` and linked from the settings (Privacy notice, under About). It says what each version keeps, why, where, for how long and who sees it, and how to ask to see or delete it.
- **It's the owner's text.** Any change to what the game keeps or sends (a field in Firestore, what a report carries, how long the intake keeps it, a new service or a request to another site) changes the notice in the same PR, with the owner's OK, and moves its "Last changed" date.
- **It stands alone:** no script, nothing from another site; its heading font is the game's own Baloo 2 from `public/fonts`.
- **Steam:** the store page links it too (#153), and the Steam build keeps the settings row (#160).

## Development

TypeScript + [three.js r186](https://threejs.org/), bundled with [Vite](https://vite.dev/). All textures are drawn at runtime on canvas. The fonts and the emoji ship with the game (`public/fonts`, cut down to what it writes by `scripts/fonts/build.py`), so it fetches none from the web.
Expand Down Expand Up @@ -449,6 +456,7 @@ Each deploy removes the last one's files, and GitHub Pages lets browsers keep th
| `src/report.ts` | Report a bug or idea: its window, opened from the settings, the picture of the game, the notice of what's sent, and reports waiting for the cloud |
| `src/sketch.ts` | Draw-a-Bug: the report's picture big over the game, to circle what's wrong in red (yellow for an idea) |
| `src/sendFx.ts` | The moment a report is sent: a bulb lighting up for an idea, a swatter squashing a bug |
| `public/privacy.html` | The privacy notice, linked from the settings (see [Privacy notice](#privacy-notice)) |
| `src/firebase.ts` / `src/cloud.config.ts` | Cloud saves on Firebase (Google sign-in, Firestore), downloaded on the loading screen and started a few seconds in / the Firebase project's config |
| `src/wallet.ts` | Money |
| `src/errors.ts` | On-screen error reporting (with a Report this button), the last few errors for bug reports, and reloading once when a deploy removed a file the page needs |
Expand Down
4 changes: 4 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,9 @@
/* the Ko-fi link, to buy the maker a coffee: a settings row like the others, opening Ko-fi in a window of its own (kofi.ts) */
#kofi{ box-sizing:border-box; text-decoration:none; }
#kofi i{ margin-left:auto; font-style:normal; opacity:.6; }
/* the privacy notice (public/privacy.html), in a tab of its own: in every build, Steam's too */
#privacy{ box-sizing:border-box; text-decoration:none; }
#privacy i{ margin-left:auto; font-style:normal; opacity:.6; }
/* the categories (Graphics, Sound, Credits & Copyrights): a row with a chevron, opening into a panel under it */
#settings .cat .chev{ margin:0 4px 4px auto; width:9px; height:9px; flex:none; border-right:2.5px solid currentColor; border-bottom:2.5px solid currentColor; transform:rotate(45deg); transition:transform .2s; }
#settings .cat[aria-expanded="true"] .chev{ transform:translateY(4px) rotate(-135deg); }
Expand Down Expand Up @@ -1503,6 +1506,7 @@ <h2 class="sgroup">Game</h2>
<h2 class="sgroup">About</h2>
<button id="reportCat" type="button" aria-haspopup="dialog" hidden><span class="ic" aria-hidden="true">🐞</span><span id="reportName">Report a bug or idea</span><i aria-hidden="true">›</i></button>
<a id="kofi" href="https://ko-fi.com/chefcontrol" target="_blank" rel="noopener"><span class="ic" aria-hidden="true">☕</span>Buy me a coffee<i aria-hidden="true">↗</i></a>
<a id="privacy" href="privacy.html" target="_blank" rel="noopener"><span class="ic" aria-hidden="true">🛡️</span>Privacy notice<i aria-hidden="true">↗</i></a>
<button id="creditsBtn" class="cat" type="button" aria-expanded="false" aria-controls="creditsCard"><span class="ic" aria-hidden="true">©</span>Credits &amp; Copyrights<i class="chev" aria-hidden="true"></i></button>
<div id="creditsCard" class="catPanel" role="region" aria-labelledby="creditsBtn" hidden>
<h3>Music</h3>
Expand Down
Binary file modified public/fonts/emoji.woff2
Binary file not shown.
Loading
Loading