# Cursor Sandcastles

> A small 3D beach of wet sand you can build on while the tide comes in.

URL: [Original article](https://mattcool.tech/posts/cursor-sandcastles)

Published: 2026-09-28T16:00:00.000Z

Tags: features

Another cursor experiment, following [Cursor Monarchs](/posts/cursor-monarchs/), [Cursor Ivy](/posts/cursor-ivy/), and [Cursor Sphere](/posts/cursor-sphere/). Design heavily inspired by [Sandcastle](https://store.steampowered.com/app/3216520/Sandcastle/) on Steam. I havent tried it yet but it looks like a super cozy game.

## Wet Sand Holds

The beach is a grid. Each cell stores its height, water depth, moisture, and how firmly the sand is packed. The bucket stamps a wet tower, the wall tool packs a ridge, and the spade digs. Loose, dry sand slumps when a slope gets too steep, so towers soften as they dry.

A small shallow-water simulation moves water between neighboring cells. The tide changes the level around the island, cuts below the water table fill from below, and fast flow shifts loose sand. Press **Wave** to see if your wall holds!

For the water lighting, I use twelve overlapping waves to approximate a moving net of caustics on the sand. Scottie's [CAUSTIC//LITE explanation](https://github.com/ScottieFox/caustic-volume#how-it-works) goes into the idea in more detail. The caustics look way better in their version.

## Under the Sand

This is a native Astro component using the [Three.js](https://threejs.org/docs/) already on the site. An [orthographic camera](https://threejs.org/docs/pages/OrthographicCamera.html) looks straight down at a sand height field and a water mesh that stretch behind the post. The simulation updates only the rows near your screen; the rest waits until you scroll to it.

The castle lasts until you leave the page. Or until the sea gets it.
