1.1.0 — weather, treats, hunger, drift

This commit is contained in:
2026-08-18 13:45:25 -04:00
parent c0a634cab5
commit 820b30468d
7 changed files with 296 additions and 25 deletions

View File

@@ -35,13 +35,28 @@ committing a crime. Emote bubbles float off him — `❗` when he notices you,
canid walks before lying down, and a bed fades in with a breathing lump under
the blanket. Any keypress, click, scroll, or mouse twitch wakes him — groggily.
**Memory.** Visit count, lifetime pets, and his name persist in `localStorage`.
Return after a week and he says so. Pet him ten times and he decides you're
friends; at twenty-five he starts lingering near your cursor instead of
wandering off, and his stealing turns into gift-giving.
**Memory.** Visit count, lifetime pets, treats, and his name persist in
`localStorage`. Return after a week and he says so. Reach ten points of trust
(pets + treats) and he decides you're friends; at twenty-five he lingers near
your cursor instead of wandering off, and his stealing turns into gift-giving.
**Drift.** What he mutters while wandering depends on how you've treated him. Feed
him and he's content. Visit repeatedly without ever touching him and he starts
asking whether anyone's there.
**A shell.** A `>_ den` tab sits in the corner of every page. Open it and you can
`come`, `sit`, `pet`, `fetch`, `sleep`, `where`, `status`, or `name` him.
`come`, `sit`, `pet`, `treat`, `fetch`, `rain`, `snow`, `sleep`, `where`,
`status`, or `name` him.
**Weather.** `denWeather('rain')` and he bolts for the nearest POI to wait it out,
sulking under cover until it stops. `denWeather('snow')` and he loses his mind —
a burst of speed, and his prints linger three times as long in it.
**Treats.** Drop one and he sprints for it. Treats build trust the same way pets
do, and he gets visibly hungry if he hasn't been fed in a while.
**Scrolling.** He's standing on the page, not floating above it — scroll and he
gets carried along, has to scramble back, and arrives out of breath.
**Presence.** Optional. With `den.php` on the server he'll notice how many other
people are on the site and mention that he can smell them.
@@ -119,6 +134,8 @@ denEvent('alarm', { text: 'YIP?! (INTRUDER)' });
denEvent('mischief');
denEvent('sleepy');
denEvent('zoomies');
denEvent('rain'); // also 'snow', 'clear'
denEvent('treat', { x: 400, y: 300 }); // or { el: '#bowl' }
```
`celebrate` is a happy spin with a heart burst. `investigate` sends him on an
@@ -132,6 +149,8 @@ denSay('yip!!'); // speech bubble at his current position
denYip(); // the synthesized squeak
denSetName('crumb'); // returns the sanitized name, or null
denGetName();
denWeather('snow'); // 'rain' | 'snow' | 'clear'
denTreat(x, y); // drop a treat at a point
denOthers; // number, current presence count
```
@@ -180,9 +199,9 @@ npm install -g terser javascript-obfuscator
| file | size | notes |
| --- | --- | --- |
| `src/den.js` | 33 KB | readable source, the one you edit |
| `build/den.min.js` | 20 KB | minified; recommended |
| `build/den.obf.js` | 88 KB | string-encoded and control-flow flattened |
| `src/den.js` | 42 KB | readable source, the one you edit |
| `build/den.min.js` | 25 KB | minified; recommended |
| `build/den.obf.js` | 112 KB | string-encoded and control-flow flattened |
The obfuscated build hides all his dialogue and secrets from casual reading, at
4x the file size. Nothing stops a determined reader — this is spoiler protection,