WikiWayne
Local AIWikiBenchGamesPrompt LabGrok BotAI ToolsTech NewsAboutBlogContact

As an Amazon Associate I earn from qualifying purchases. This site contains affiliate links.

WikiWayne

Independent notes on local AI, real hardware, Grok, and the games that come out of that stack.

Categories

  • Local AI Hub
  • Local AI Glossary
  • Local AI
  • AI Tools
  • Tech News

Quick Links

  • About Wayne
  • Games
  • Grok Bot
  • Contact
  • Links
  • ADHD MaxxxingSponsored
  • WikiBench
  • Methodology
  • Editorial Standards
  • Disclosures
  • Privacy Policy
  • Sitemap

Follow on X

Hardware, local models, Grok, and what I actually ship.

Follow @wikiwayne
WikiWayne© 2026
PrivacyWikiBenchMethodologyEditorialDisclosuresTermsSitemap
Home/Prompt Lab/Midnight Koi Pond

Midnight Koi Pond

PL-185MediumFluids & particlesCanvas 2D

Smooth chain-bend fish animation that stays in bounds, water shading and taps tied to real event counters.

Remastered from PL-118 (original text not on file)

Midnight Koi Pond
Download fileMade for ChatGPT, Claude, Gemini, Grok and other AI tools

How to run

  1. Download the file or copy the prompt.
  2. Upload or paste it into any AI chat or coding tool, and send.
  3. Save the HTML it gives you as a file and open it in Chrome.
  4. Open it with ?test=1 and look in the browser console for the TEST lines.

What it tests

Smooth chain-bend fish animation that stays in bounds, water shading and taps tied to real event counters.

The checks

Show the 5 checks
  1. At t = 0 at 1280x720: all stats() counters are zero; counts() is {koi: 12, lanterns: 5, pads: 7, fireflies: 24}; pond().b x 2 is at least 85% of the window height (the pond is 634 px tall); every body point of every koi lies inside the ellipse scaled to 0.97; every link between neighbouring body points is 14 px long (within 0.2); every lantern center lies inside the ellipse scaled to 0.9; the four corners of layout().hud lie outside the pond ellipse; the mean luminance over the whole canvas is at least 0.07 (luminance = (0.2126 R + 0.7152 G + 0.0722 B) / 255).
  2. At 1280x720, after attract(false), sampling koi() every 0.5 s for 20 s (40 samples): every body point of all 12 koi stays inside the ellipse scaled to 0.99; every link is 14 px long (within 0.7); the angle between neighbouring links is at most 32 degrees everywhere; each koi's speed is between 70 and 90 px/s while not seeking; and checking every single frame of the 20 s, no koi's heading changes by more than 1.6 degrees in one frame (shortest angular difference, wrapping at 360).
  3. At 1280x720, after attract(false) and advance(3.0): among the 12 koi pick the one whose point 100 px ahead of its head (along its heading) lies inside the ellipse scaled to 0.55 and is nearest the pond center; a real pointerdown on the canvas at that point gives taps 1, ripples 1, sounds 1 and one pellet; advance(0.5) shows a ripple with age between 0.45 and 0.55 whose radius is 45 (within 3) at the tap point; advance(0.5) more (t = 1.0 after the tap) gives fed 1, taps 1, ripples 2, sounds 2 and no pellets left; a pointerdown at (4, 4) (outside the pond) leaves taps at 1.
  4. At 1280x720, after attract(false) and setLayer(name, false) for "koi", "pads", "lanterns" and "fireflies": in the rectangle 240 x 120 centered on the pond center, the standard deviation of the luminance is at least 0.03 with caustics on and below 0.015 after setLayer("caustics", false); with caustics on again, at least 20% of the rectangle's pixels change by 6 or more in some color channel between advance(0) and advance(1.0); the mean luminance of the rectangle with caustics on is at least 0.12; with all layers back on, the pixel at the center of lantern 0 has red at least 200 and red minus blue at least 40.
  5. On a fresh load with the demo running: at t = 2.9 taps is 0; at t = 3.2 taps is 1; at t = 8.2 taps is 2; at t = 13.4 taps is 3; at t = 14.0 taps is 4; at t = 19.2 taps is 5; at t = 24.2 taps is 6; at t = 27.7 taps is 6, fed is at least 5, ripples equals taps + fed, sounds equals taps + fed, and the run has zero console errors.

Runs by model

No runs posted yet. Be the first: post yours and tag @wikiwayne.

Show the full prompt
MIDNIGHT KOI POND: Twelve Bendy Koi, Drifting Lanterns, Ripples and Tap-to-Feed
HOOK OBJECT: window.__koi

Build "MIDNIGHT KOI POND": a top-down night view of an oval pond drawn in Canvas 2D (no libraries). Twelve long, bendy koi swim slow loops under five drifting paper lanterns, lily pads and blinking fireflies, with a moving net of caustic light on the pond floor. Tap or click the water to drop a food pellet: it rings the surface with ripples and the nearest koi dash over to eat it. It is fun to keep watching because the fish never stop, every tap makes the pond answer, and the lantern light slides across the water.

LOOK
- Style: moonlit and warm, moon-blue water with amber lantern glow. Palette: night bank #0A1018, rim stone #2B3038, water center #12485E to edge #06222F, caustic light #7FE3FF, moon reflection #DCE6FF, lantern body #FFB347 with glow #FF9A3C, koi white #F6F1E7, koi orange #F26A2E, koi black #1C1C22, lily pad #2F7A4B with edge #1F5A38, lotus flower #FF9FC8, pellet #FFD27A, firefly #D8FF6A, HUD text #E8F1F7.
- Unit u = min(window width, window height) / 720 (1 at 1280x720, 0.54 at 390x844), used for every size, speed and distance below that is written in u. The pond is an ellipse centered in the window with semi-axes a = 0.45 x window width and b = 0.44 x window height, so it is 88% of the window height tall at any size (634 px at 1280x720), drawn with a 12 u rim stone ring. The water is a radial gradient from #12485E in the center to #06222F at the rim. A soft moon reflection (#DCE6FF at 18% opacity, radius 70 u) sits at (center x + 0.35 a, center y - 0.30 b).
- Koi: 12. Each is a chain of 10 body points (point 0 is the head) joined by 9 links of exactly 14 u (body length 126 u), drawn as one smooth tapered body (widest 20 u at point 2, 4 u at the tail point) with a two-lobed tail fin 18 u long and two pectoral fins. Coat by index i: i mod 3 = 0 white with 2 orange patches; 1 orange with a white belly stripe; 2 white with orange and 2 black spots. Cruise speed of koi i is 70 + 20 r_i u/s, with r_i from the seeded generator (seed 360, values 0 to 1). At t = 0 each head sits inside the ellipse scaled to 0.5, with a seeded heading, and its body trails straight behind it.
- Lanterns: 5 floating paper lanterns, each a rounded square 36 u wide in #FFB347 with a glowing halo of radius 90 u (#FF9A3C fading to nothing, additive). Lantern i (0 to 4, in the order listed) is at x = cx + 0.55 a cos(w t + p), y = cy + 0.5 b sin(0.8 w t + q), with w = 0.06 + 0.01 i rad/s, p = 1.2566 i and q = 0.9 i (cx, cy = pond center; t in seconds). Each lantern throws a warm reflection of its halo on the water (a radial gradient of radius 90 u, additive, drawn on the water layer under the koi) and a wobbling spark ring. The "lanterns" layer switch hides the lantern bodies, halos and reflections together.
- Lily pads: 7 pads at offsets from the pond center of (fx a, fy b): (-0.55, -0.25), (-0.30, 0.45), (0.10, -0.50), (0.50, -0.20), (0.55, 0.30), (0.05, 0.55), (-0.62, 0.20), with radii 30, 34, 38, 44, 32, 40, 36 u. Pads are numbered 0 to 6 in the order listed; pads 1, 3 and 5 carry a lotus flower 12 u across. Pads are drawn over the koi.
- Fireflies: 24, each drifting on a seeded circle of radius 20 u around a seeded spot inside the ellipse scaled to 0.9 at 0.5 rad/s, blinking with brightness max(0, sin(2 pi t / period + phase)) where the period is 2 to 4 s (seeded); a glowing dot of radius 10 u in #D8FF6A.
- Caustics: a net of light on the water. At a point (X, Y) in u measured from the pond center, s = (sin(0.05 X + 0.6 t) + sin(0.06 Y - 0.5 t) + sin(0.03 (X + Y) + 0.4 t)) / 3 and the caustic strength is k = (1 - |s|)^8; draw it additively in #7FE3FF at alpha 0.35 k over the whole pond (a 160x90 buffer scaled up is fine). It slides at about 12 u/s.
- Draw order: bank and rim, water, caustics, lantern reflections, koi, ripples, pellets, lily pads, lantern glows, lanterns, fireflies, HUD.
- HUD: a small box in the top-left corner, at least 12 px and at most 14 px text on two lines (for example "taps 0 / fed 0" and "ripples 0 / sounds 0"), at most 150 px wide and 40 px tall, with its top-left corner at (8, 8). All four corners of the box lie outside the pond ellipse. A small "M" mute button sits at the top-right corner, 44 px square.
- FIRST FRAME (t = 0, no input): the pond fills 88% of the window height, 12 koi spread in the water, 5 lanterns lit, 7 pads, 24 fireflies, the caustic net visible, ripples none, pellets none, all counters 0.

MOTION / PLAY
- Controls: tap, click or press on the water (pointerdown) drops a pellet. Pressing M or the mute button toggles mute (master gain 0.6 or 0). Everything works with touch.
- Cruise steering: each koi's heading drifts by a seeded random rate between -60 and +60 degrees per second, redrawn every 1.5 s, and its heading can turn at most 90 degrees per second (1.5 degrees per frame). Each body point i follows point i - 1, kept exactly 14 u behind it along the line between them. When the head is outside the ellipse scaled to 0.65 (that is (x/a)^2 + (y/b)^2 > 0.65^2 around the pond center), the heading steers toward the pond center at the maximum turn rate until the head is back inside.
- Pellets: a tap inside the pond ellipse drops one pellet (radius 5 u). If the tap lies outside the ellipse scaled to 0.6 the pellet is placed at the nearest point on that scaled ellipse (a radial projection toward the pond center is fine); a tap outside the pond ellipse itself does nothing. At most 6 pellets exist; a seventh tap removes the oldest uneaten pellet silently. A pellet that is not eaten for 12 s disappears silently. Whenever a pellet disappears for any reason (eaten, expired or removed as the oldest), every koi that was seeking it goes back to cruising.
- Seeking: when a pellet drops, the 3 koi whose heads are nearest to it start seeking it. A seeking koi turns toward the pellet at up to 180 degrees per second, and its speed rises toward 220 u/s at no more than 400 u/s^2. It eats the pellet when its head comes within 18 u: the pellet disappears, `fed` goes up, and every koi that was seeking that pellet goes back to cruising. A koi whose speed is above its cruise speed plus 5 keeps the 180 degrees per second turn limit while it slows down (at no more than 400 u/s^2), and the 0.65 wall push is switched off for seeking koi.
- Ripples: a tap makes one ripple ring at the pellet spot, and an eaten pellet makes one ripple ring at the mouth. A ring's radius grows at 90 u/s for 1.6 s while its alpha fades from 0.8 to 0; draw it as a thin light ring (#DCE6FF) with a darker ring just inside it, and bend the caustic light a little across it. Rings pass over koi, not through lanterns.
- The hook also exposes pond() returning {cx, cy, a, b}, koi() returning 12 objects {x, y, heading (degrees), speed (u/s), seeking, pts: 10 [x, y] pairs}, lanterns() returning 5 {x, y}, pads() returning 7 {x, y, r}, counts() returning {koi, lanterns, pads, fireflies}, pellets() returning {x, y, age}, ripples() returning {x, y, r, age}, feed(x, y) (the same code path as a tap), setLayer(name, on) for "koi", "pads", "lanterns", "fireflies" and "caustics" (false hides that layer), attract(on) (false turns the demo off), pixels(x, y, w, h) returning the RGBA bytes (Uint8ClampedArray, row by row from the top-left) of that CSS-px rectangle of the canvas, and layout() returning { hud } as {x, y, w, h} in CSS px. All positions are CSS px. With ?test=1 the canvas pixel ratio is 1. setCameraOrbit(azimuthDeg, elevationDeg, scale) applies the CSS 3D transform perspective(1400px) rotateY(azimuth) rotateX(-elevation) scale(scale) to the canvas, default (0, 0, 1); pointer input only has to work at the default. Hook calls are not user input and do not pause the demo.
- ATTRACT MODE: with no input, a hands-free demo starts on load and loops every 28 s, tapping the water with the same code path as a user tap at pond-relative spots (fx a, fy b) from the center: at 3.0 s (-0.40, -0.20), at 8.0 s (0.35, 0.30), at 13.0 s (-0.15, 0.40), at 13.8 s (0.40, -0.30), at 19.0 s (0.10, -0.45), at 24.0 s (-0.45, 0.25); then it holds until 28.0 s, when everything cuts back to the t = 0 state (3.0 + 5.0 + 5.0 + 0.8 + 5.2 + 5.0 + 4.0 = 28 s). Counters keep their values across the cut. Any input takes over; the demo resumes after 8 s with no input.

SOUND
- A tap -> a soft plip (sine sweeping 520 Hz to 260 Hz in 0.18 s).
- A koi eating a pellet -> a gulp (sine 220 Hz rising to 330 Hz in 0.12 s with a quick fade).
- Quiet ambience: two sines at 110 Hz and 164.8 Hz at gain 0.03, and a very faint high chime (1,319 Hz sine, 0.8 s decay, gain 0.02) every time a lantern's x position passes the pond center.
- With no AudioContext (before the first tap, and in ?test=1) nothing is played, but the sound triggers are still counted.

COUNTERS
stats() returns { fps, taps, fed, ripples, sounds }.
- taps: +1 exactly when a pellet is dropped (a real tap, a hook feed or a demo tap inside the pond). A tap outside the pond does not count. Never on a timer, never on load.
- fed: +1 exactly when a koi eats a pellet.
- ripples: +1 each time a ripple ring is created (one per tap, one per eaten pellet). It always equals taps + fed.
- sounds: +1 each time the plip or the gulp is triggered, whether or not sound is on. It always equals taps + fed.
- On screen: all four in the HUD box, readable in a paused frame and never over the pond.

CHECKS for ?test=1
With ?test=1, run an accelerated self-test that measures real positions and real events (not self-set flags) and logs "TEST n PASS" or "TEST n FAIL: reason" to the console and to window.__testResults:
Each check starts from a fresh load; advance() steps in 1/60 s increments.
1. At t = 0 at 1280x720: all stats() counters are zero; counts() is {koi: 12, lanterns: 5, pads: 7, fireflies: 24}; pond().b x 2 is at least 85% of the window height (the pond is 634 px tall); every body point of every koi lies inside the ellipse scaled to 0.97; every link between neighbouring body points is 14 px long (within 0.2); every lantern center lies inside the ellipse scaled to 0.9; the four corners of layout().hud lie outside the pond ellipse; the mean luminance over the whole canvas is at least 0.07 (luminance = (0.2126 R + 0.7152 G + 0.0722 B) / 255).
2. At 1280x720, after attract(false), sampling koi() every 0.5 s for 20 s (40 samples): every body point of all 12 koi stays inside the ellipse scaled to 0.99; every link is 14 px long (within 0.7); the angle between neighbouring links is at most 32 degrees everywhere; each koi's speed is between 70 and 90 px/s while not seeking; and checking every single frame of the 20 s, no koi's heading changes by more than 1.6 degrees in one frame (shortest angular difference, wrapping at 360).
3. At 1280x720, after attract(false) and advance(3.0): among the 12 koi pick the one whose point 100 px ahead of its head (along its heading) lies inside the ellipse scaled to 0.55 and is nearest the pond center; a real pointerdown on the canvas at that point gives taps 1, ripples 1, sounds 1 and one pellet; advance(0.5) shows a ripple with age between 0.45 and 0.55 whose radius is 45 (within 3) at the tap point; advance(0.5) more (t = 1.0 after the tap) gives fed 1, taps 1, ripples 2, sounds 2 and no pellets left; a pointerdown at (4, 4) (outside the pond) leaves taps at 1.
4. At 1280x720, after attract(false) and setLayer(name, false) for "koi", "pads", "lanterns" and "fireflies": in the rectangle 240 x 120 centered on the pond center, the standard deviation of the luminance is at least 0.03 with caustics on and below 0.015 after setLayer("caustics", false); with caustics on again, at least 20% of the rectangle's pixels change by 6 or more in some color channel between advance(0) and advance(1.0); the mean luminance of the rectangle with caustics on is at least 0.12; with all layers back on, the pixel at the center of lantern 0 has red at least 200 and red minus blue at least 40.
5. On a fresh load with the demo running: at t = 2.9 taps is 0; at t = 3.2 taps is 1; at t = 8.2 taps is 2; at t = 13.4 taps is 3; at t = 14.0 taps is 4; at t = 19.2 taps is 5; at t = 24.2 taps is 6; at t = 27.7 taps is 6, fed is at least 5, ripples equals taps + fed, sounds equals taps + fed, and the run has zero console errors.

KEEP IT SHORT
- Keep the whole file under about 1,500 lines (soft target) so you can write it in one pass and finish well inside 15 minutes.
- Save lines with helpers, loops and instancing, not by dropping features. Everything above must really work: no placeholders, no TODOs.

BUILD RULES (all required):
- Deliver ONE self-contained HTML file: inline CSS and JS, no build step, no local assets. Libraries only from a CDN. If you use Three.js, use exactly this import map: {"imports":{"three":"https://cdn.jsdelivr.net/npm/three@0.160.0/build/three.module.js","three/addons/":"https://cdn.jsdelivr.net/npm/three@0.160.0/examples/jsm/"}}
- It must open straight from disk in desktop Chrome and on an iPhone (Safari), fill the full screen, handle resize and touch, and stay smooth (target 60 fps).
- It must look stunning in the very FIRST frame: no black screen, no loading wait, no tiny subject. The main subject fills at least 50% of the screen height.
- SOUND (required): all sound is made in code with Web Audio (no audio files). Show a small "🔊 TAP FOR SOUND" chip; on the first tap create ONE AudioContext, route everything through a master gain of 0.6 into a DynamicsCompressor, and hide the chip. Also expose enableAudio() on the hook object named at the top.
- Expose the hook object named at the top with: setCameraOrbit(azimuthDeg, elevationDeg, distance) (or an equivalent camera setter), advance(seconds) that steps the simulation exactly that much for still captures, enableAudio(), and stats() returning {fps, ...the counters named above}. Use a fixed random seed of 360 so every run is the same.
- Every on-screen counter must count a real event you can see happen. No fake numbers.
- No text overlapping the subject; any label must be readable in a paused frame.
- No brand logos, no real people, no copyrighted characters, brand names or logos.

FAILURE MODES TO AVOID
- Koi that are stiff sticks, kink in sharp angles, change length, or leave the pond through the rim or hide under the bank.
- Koi that all move in lockstep, stop moving, or cross every pellet without eating it.
- A tap that does nothing, a ripple that does not grow, or koi that do not react within a second.
- A pond that is too dark to read, or a pond with no visible caustic light; lantern glow that does not light the water.
- Pellets or ripples drawn outside the pond, or taps outside the pond that still count.
- Counters stuck at 0, ticking on a timer, or not matching taps + fed.
- A pad or lantern that jumps instead of drifting smoothly.
- Text over the pond, or a HUD box too small to read.
- A demo that stops tapping, or crashes in the first 10 s.
- The same variable declared twice, or methods called on objects that don't exist yet.

SELF-TEST LOOP
- If you can run code: build the file, open it, read the console, run ?test=1, and take screenshots at 3 s, 10 s and 30 s at 1280x720 and 390x844. Look at the screenshots and fix what looks wrong. Fix and retest until all 5 checks pass with zero console errors. Mark anything you could not run as UNMEASURED; never invent results.
- If you are chat-only: go through this prompt line by line, check your code against each line, and fix anything that would fail. Then write one corrected, complete file.
- Final answer: ONE complete HTML file in ONE code block, then the 5 checks marked PASS, FAIL or UNMEASURED. No snippets, no "rest unchanged".

Built one? Post it on X and tag @wikiwaynePost on X

More Medium prompts

Floating Islands Biplane

MediumLandscapes & nature
PL-0844 runs

Electric Roadster

MediumMachines
PL-0744 runs

Football Field

MediumCreatures & characters
PL-0734 runs

More Fluids & particles prompts

Bouncing Bubbles

EasyFluids & particles
PL-0644 runs

Chladni Plate

HardFluids & particles
PL-1661 run

Primordial Matrix

HardFluids & particles
PL-1581 run