1. No engine. No WebGL. No 3D models.
One plain JS file draws on a 2D canvas. That is all.
Drawn natively. Every frame is maths per character.
One plain JS file draws on a 2D canvas. That is all.
Each character cell asks: what do I see first, looking through me?
A ray solves each formula to find where it touches. No triangles.
Sea and island are height fields. Sails are curved cloth. Grass and spray are dots.
The ship is 169 shapes. The whole scene is 444. A ray still tests about one.
Each shape has a box. Nearest first, the ray stops at its first hit.
Moon, lamps and the lighthouse beam add up. Brighter spot, denser glyph.
A shadow ray per lamp. A solid in the way means no light. Colour is the material, in 8 brightness levels.
Rays per frame at the default glyph size. Bigger screen, more cells, until the cell cap holds 4K down.
On a desktop, web workers cast and draw bands of rows on the other cores. Desktops keep every row and every shadow, and never grow glyphs. Only a slow phone turns shadows off, then grows glyphs up to 1.5x.
You walk in 10 cm hops. Before each hop the page asks two questions.
Is there ground, and is it no more than 0.6 m above or below the last hop? Is a solid in the way between 0.3 m and 1.7 m above your feet? Each solid is an invisible box, 25 cm wider on every side. A yes to either stops you on the spot.
In one fixed list in memory. The page loads no models and no pictures. Only the sound loops are fetched.
Each shape is a box plus a formula. The list is built once and never reloaded. The sea and the clouds are formulas, worked out for each ray. The hills and roads are formulas sampled once onto a grid. Trees and grass come from fixed seeds, so they stand in the same place on every visit.
A window is an opening that a room shares with the wall around it. A ray goes through it and carries on.
The ray carries on from where the room stands in the scene. So a room shows through its panes and the outside shows through its openings. The page looks at the far side only for the screen area of the openings. No window has its own drawing pass.
Zoom out with Ctrl/Cmd − for more, finer characters. Zoom in with + for bigger ones and a lighter load. Chromium and WebKit behave the same.
Cells at a 1440 x 900 window. From 100% to 150% the cell count stays the same: the glyphs keep to whole device pixels. The cell cap holds the zoom-out end at 76,000.
One ray per cell, plus shadow rays for lit cells. Glyphs are 0.9 of the old 6.5 to 11 px range up to 2560 by 1440 CSS pixels, and taller above that, because the cell cap is 76,000 and falls with the square root of the stage area above 2560 by 1440 (about 51,000 cells at 3840 by 2160). Cells are whole device pixels. The counts assume a glyph 0.6 times as wide as tall, a 393 by 852 phone at pixel ratio 3, and desktops at pixel ratio 1. Frame time depends on the device, so it is not listed here.
| Screen | Cells (rays) |
|---|---|
| iPhone 15 Pro | 107 x 142 = 15,194 |
| 1440 x 900 | 288 x 100 = 28,800 |
| 1920 x 1080 | 320 x 108 = 34,560 |
| 2560 x 1440 | 426 x 144 = 61,344 |
| 3840 x 2160 (4K) | 349 x 120 = 41,880 |
.:~-=+* in the dim colour of the empty sky; the star hash of each cell breaks bands of one glyph into grain.
Only edges where the cloud thins toward the moon are pale, and those nearest the moon are palest.
Thin cloud dims the stars and the moon, and thick cloud hides them.
A buffer of 1° sky texels keeps the cloud density and moon-side rim of each direction.
Without reduced motion, a texel refreshes about ten times a second when a sky cell reads it.
The elevation rows take turns to spread refresh work across frames.
Turning reuses fresh texels but computes unseen or expired texels.
With reduced motion, each render refreshes the texels it reads, including after movement or a change to the motion setting. .`',:;~-=+*#%@▒▓█ and one of eight colour levels per material.
Ground grass uses mostly short marks and sparse tall blades; shade increases gaps and reduces tall blades.
The renderer caps each tuft's projected height at 1/14 of the screen height before rounding blades to whole cells.
Blades use | ( ) \ / with pale moonlit tips.
Far tufts are dimmer.
Leaves pick glyphs from ,.:;&%@ by brightness, one for each 20 cm patch, and draw no outline edges.
Bark uses strokes that follow its limb on screen, with ( ) on the sides of upright trunks; palm rings and birch marks cross the limb.
Road dirt, muted earth, pale paving marks and foam keep their texture glyphs with a minimum brightness that decreases in fog.
Random 2 cm specks vary ground blade lean and blend the greens and the edges between grass, sand and road.
The fountain pool and upper bowl use animated texture glyphs instead of the density ramp.
Fountain droplets use : ' ,; spray and splashes also use ., and mist uses . `.
The house's paintings are glyph textures that site/art.py converts ahead of time from public-domain works.
Each texel keeps one glyph from .:-=+*#%@ and one of a few colours; room light sets the colour level.
A painting far from you reads a half or quarter size copy of its texture.
Flames in the house use fixed glyphs from an orange base to pale tips, so the idle house needs no redraws.
Windows and gun ports are openings that each room shares with its outside walls.
A ray through one goes on in the scene on the other side, from where the room stands in it, so the room shows through its panes and the outside through its openings.
Each frame culls the far side only for the screen area of the openings, so no window needs its own rendering pass.
An edge glyph (| - / \ _) is drawn wherever one surface meets a farther one, and along hill crests.requestAnimationFrame moves you, the sea, the ship and its sails, and redraws the grid on a canvas.
A ray tests solids whose screen box reaches its tile of cells, nearest first.
It stops when no remaining solid can be nearer than its hit.
With web workers, each frame paints the newest frame the workers drew: bitmaps of every row, then the map and the sign.
A new frame starts while fewer than two are in hand; time waits for the workers, so a slow desktop shows fewer frames, not a coarser grid.
Without workers, the canvas keeps unchanged rows after the intro.
Devices without (pointer: coarse) draw rows with changed cells again from their full text-run positions.
Touch devices redraw only each run of changed cells and its neighbouring cells; runs fewer than five cells apart share one redraw.
Grass and tree wind animation uses a 12 Hz clock; other scene changes can repaint grass and tree cells between wind updates.
Tree bending increases with height along the shared wind direction; leaf clumps also move across that direction.
Fountain water moves on a 24 Hz clock; other scene changes can repaint its cells between water updates.
The mini map draws again each frame, even when its cells do not change.
The pop-up sign also draws again each frame; the cells it covered draw again when it moves or closes.
Devices with (pointer: coarse) draw one glyph per fillText call to limit WebKit's text cache.
Every canvas draws at the display's pixel ratio, so the browser never rescales it, and each cell is a whole number of device pixels wide and tall so glyphs stay sharp.
Other devices draw one run of one colour per call.
The backing-store area stays at or below 4096 * 4096 device pixels; this does not limit each dimension to 4096.
Large high-DPR windows use a lower rendering ratio, which can fall below 1.
Grid measurement clears the complete canvas, including padding, even when the backing-store size does not change.
The intro overlay uses CSS dimensions to cover the transformed canvas at any rendering ratio.
The first grid measurement waits for fonts; if the requested font fails to load, the scene uses a fallback font.
The base glyph size uses a 0.9 zoom factor and an area-based minimum.
Above 2560 by 1440 CSS pixels, the cell cap falls with the square root of the stage area.
At 3840 by 2160, the base grid has about 51000 cells.
Low multiplies the complete base glyph size by 1.5 before rounding each cell to whole device pixels.
Door and hatch crossings reset Auto's adaptive scale but retain Low's multiplier.
See the harbor README for graphics and motion settings.
Resizes wait until the viewport settles, then update the canvas immediately before the next draw.
In Auto, slow phone rendering first disables shadow rays, then uses glyphs up to 1.5 times larger.
Fast rendering restores a finer grid.
In Auto, missed frames also reduce a phone's detail relative to the measured display refresh rate.
Before counting slower callbacks as painting load, the renderer skips one repaint to measure the display period without that load.
This sample also detects display refresh changes during continuous input.
Each door or hatch crossing requests the same unloaded sample, so timing from the previous scene does not hide room painting load.
The house redraws only after movement, looking, resizing, or another change that requires a new frame.
The cabin and gun deck also redraw while swaying with the hull.
Reduced motion stops exterior animation and idle ship-room redraws; see the harbor README for ship motion.1 - progress * progress.
Desktop drawing keeps the colour runs; touch drawing sends each glyph directly to the existing single-glyph painter.
The mini map, signs, and touch pad stay hidden until the intro ends.AudioContext and fetches six mono loops.
Settings and the speaker button control sound.
Each loop runs through a gain and an HRTF PannerNode with the inverse distance model, so it fades with distance from you.
The sea, wind and fire loops move to their nearest emitter: the waterline or a ship side, a tree, or the fireplace or a lantern in the room you are in.
The listener and the emitters update at most 20 times a second, not every frame, and move smoothly between updates.
Rooms lower the outdoor loops and turn on their fire or lantern.
A muted or hidden page, or an open menu, suspends the context.site/build.py builds the points of interest with the README's Features list and More docs row, and the changelog.site/ reaches a Crewship host or worker image.