by winchxyz
A 3D sandcastle simulator that runs entirely on the GPU. No engine, no libraries, no asset files, no build step. Built in one prompt with Claude Code.
# Add to your Claude Code skills
git clone https://github.com/winchxyz/tidewrighttidewright is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by winchxyz. A 3D sandcastle simulator that runs entirely on the GPU. No engine, no libraries, no asset files, no build step. Built in one prompt with Claude Code. It has 54 GitHub stars.
tidewright's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/winchxyz/tidewright" and add it to your Claude Code skills directory (see the Installation section above).
tidewright is primarily written in JavaScript. It is open-source under winchxyz on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh tidewright against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
A 3D sandcastle simulator that runs entirely on the GPU. No engine, no libraries, no asset files, no build step — one WebGL2 context, ~7 000 lines of JavaScript and GLSL, and a beach that actually obeys the angle of repose.

Long before the maps, this coast was a country. It sank in one night — not from war, but because it forgot its own name. The sea keeps what it takes, yet keeps it badly: every tide it tries to hand the kingdom back, grain by grain, and every tide it thinks better of it and pulls the whole thing under.
A tidewright is someone who catches the grains before the water changes its mind.
The whole thing — simulation, renderer, nine art styles, lore, interface — came out of a single request to Claude Code:
"Create me a fully playable release-ready game. On GPU. Game about sandcastle simulator, where I can build things with sand and etc. I need it in 3D and not a voxel game. Make it with maximum effort, show me best what you can create. Use all your power, knowledge and make best graphics and best game design. Surprise me with graphics, lore and everything."
Everything after that was refinement in the same session. See the numbers at the foot of this file.
In your browser: https://winchxyz.github.io/tidewright/
From a file: clone and double-click index.html. Every script is a classic
<script src> tag, so it just runs from file:// with no server. (Only
localStorage is unreliable there — saving is wrapped in a fallback and
degrades to in-memory.)
From a server, if you want saves to persist:
node server.js
then open http://localhost:5173.
WebGL2 with EXT_color_buffer_float and EXT_float_blend — any Chrome, Edge or
Firefox from the last few years, on a GPU from roughly the last decade. Safari 16+
works. If float render targets aren't available it says so plainly rather than
showing you a black screen.
It renders at your display resolution by default; drop Render scale in Settings if your GPU is having a hard time. There is no network traffic of any kind after the initial page load.
There are three ways in.
Slack Water is the cozy one, and it's where the day lives. No tide, no clock, every mould and every toy unlocked, and a full sunrise-to-stars day cycle running over the shore — the sun comes up behind the dunes and goes down over the water, which is the entire reason anyone builds on a west-facing beach. Scrub the time with the slider, hold it where you like it, or let it run at slow, gentle or brisk. Two soft tides walk up to the edge of your work across the day and walk back again, and neither of them takes anything.
Endless Sand takes the arithmetic away. The pail is bottomless and the sea stays where it is, so you can build without first working out where the material is coming from. Everything else is the same beach — sand still slumps at its angle of repose, still needs wetting to stand, still sets as it dries. You are only spared the bookkeeping.
The Novena is the campaign: nine tides, each giving you a stretch of low water to build in and then taking it back, higher and rougher each time, from high morning at the first tide to full dark at the ninth. Between them the sun crosses the sky exactly once — the light in tide V is not a different preset, it is the same sun, lower.
Your score is Remembrance: sand you have raised above the coming high-water line, weighted by how well you packed it. Loose sand counts for almost nothing. The sea knows the difference and so does the scoreboard.
Dry sand cannot stand. Each grain has an angle it refuses to exceed — about 33° dry. Water bridges the grains and lets you go past vertical. Too much water and the bridges join up, the capillary squeeze disappears and it runs like soup. Then pat it: compaction is the other half of strength, and a damp packed wall will outlive an unpacked one by whole tides.
A readout follows your cursor with the moisture, the packing, how much sand is left above the hardpack, and a plain-English verdict — damp — good, now pat it, soaked — it will run, hardpack — nothing left to dig. Learn to read it and the rest of the game follows. A single line above the workbench always says the next useful thing.
Four places, not six.
One surface, one radius, one type ramp throughout.
Sand is conserved to the grain. Digging fills your pail; pouring empties it. You are not making sand, you are moving the coast around — so dig your moat where you want a moat and the spoil becomes your keep. The classic beginner's mistake is a borrow pit behind the castle, which the sea then climbs like a stair.
The transfer is real, not bookkeeping. Sand you pour leaves the spout as tens of thousands of GPU-simulated grains that arc, fall, and only raise the ground where they actually land — pour off a ridge and the pile forms downslope, where the sand went, not under the cursor. The spade throws a visible sheet back over your shoulder as you drag it, and the mould lifts sand over its rim as it fills. Deposition is exact: each grain scatters its volume across precisely twenty-five texel centres, so what leaves the pail is what arrives.
And the pail remembers. Its wetness is the volume-weighted average of everything you have shovelled into it, so sand collected wet stays wet when you pour it — enough to stand steep the moment it lands. Left alone it dries in the sun at about a percent a second, and the pail chip in the HUD tells you where it is. Wet a patch before you dig it and you are carrying mortar; dig the dry back-beach and you are carrying dust.
There is close to two metres of loose sand over the hardpack across a working area some 36 m wide, which is deep enough that a proper moat cuts below sea level — and when it does, it fills with water on its own. Nothing scripts that; the sea surface simply renders wherever it is above the ground.
Every tool is tagged in the interface with what it does to the amount of sand in the world, because that is the only real distinction between several of them:
| takes sand | Shovel, Carve — into your pail |
| adds sand | Pail, Mould, Rampart, Drip — out of your pail |
| no sand | Pat, Water, Level, Adorn — changes what the sand is like |
Water and Drip are the pair people mix up. Water raises the moisture of sand that is already there so it can stand steeper; it builds nothing. Drip takes sand from your pail and dribbles it out already soaked, a blob at a time, to grow spires. Water changes what's there; Drip adds new.
The two sand-takers differ in what they leave behind: the Shovel bites wide and shallow and banks the ground's wetness into your pail as it goes, while Carve cuts a narrow, deep line for gates and stairs. Both throw the spoil where you can see it.
Ten plastic shapes out of the bottom of the beach bag: round turret, square keep, gatehouse, star fort, ziggurat, spire, scallop, fish, crab, starfish.
They work the way they work on a real beach — in two halves:
, and
., and press.What comes out is precisely as wet as what went in. Turn out a dry mould and it collapses into a cone in front of you. Turn out a soaked one and it runs. Wet the ground before you scoop.
Twelve of them: pennant, parasol, pinwheel, lantern, pail-and-spade, toy boat, scallop, starfish, driftwood, kelp, bottle, cairn. The pinwheel spins with the wind, the parasol and the sails and the kelp move in it, the lanterns actually light the sand around them, and all of them lean as the sand shifts underneath and go over when the water reaches them.
Waves break where the water goes thin, and they take the bottom of a wall first. Nothing here is knocked over; things are undermined and then fall. A moat spends a wave — filling a ditch is work, and the work comes out of the wave. A packed berm on the seaward side turns what's left. The surface film runs downhill and soaks in where it settles, and sand that saturates loses almost all of its angle of repose — so a moat draining landward doesn't wash your keep away, it quietly turns the ground under it to slurry, which is worse.
Settings → Look. Same simulation, same sun, same castle — only the shading
changes, and it changes live. All nine are one uStyle uniform threaded
through the terrain, water, sky, prop and composite shaders. Not nine
renderers; nine ways of separating the same light.
The same castle, nine times:
Salt & Light |
![Bucket & Spa |