Aspect ratio calculator / Dragon over Blackridge

Dragon over Blackridge

A dragon, a village and a castle in 3D text. It fires, they fire back, and the camera circles it all.

ASCII · 2026 series · All animations

Nothing to press: the dragon breathes, the village and the castle fire back, and the camera circles the valley, in a round of 15 seconds that repeats. Drag to turn the view yourself, and press 1, 2 or 3 to fire by hand. Press Sound (or M) to turn the sound on; it starts off. Free under the MIT License.

What it is

A dragon sits on a ridge above a valley. Below it are a river, a village of 19 houses, a castle with five towers, and dozens of pine trees. All of it is a real three-dimensional scene, and all of it is drawn with letters and symbols: W, #, = and - for surfaces from bright to dark, O for lit windows, and @, %, * and + for fire. The camera slowly circles the whole scene, so you see the dragon from every side.

The battle runs by itself. The dragon breathes a long flame down the valley, and the ballistae in the village and in the castle answer with bolts that arc up toward its head. You can also fire by hand, drag the view around, or switch the automatic parts off.

What happens in each round

WhoWhat it does
The dragonBreathes a flame of about 800 sparks that runs from its mouth across the valley. In each 15-second round it breathes twice.
The village (2 ballistae)Fires two bolts at the dragon, twice in a round. Each bolt flies in a high arc and bursts into sparks where it lands.
The castle (3 ballistae)Fires three bolts at a time, three times in a round.
The cameraCircles the valley once in about 30 seconds. Drag, or use the arrow keys, and it stops so you can look where you like.
The soundOff until you press Sound or the M key. When it is on you hear a roar for the breath, a string twang and a whoosh for each bolt, a thud and a low groan when a bolt lands, and a faint wind underneath. A slider sets the volume. The sounds are made in your browser as they play, so there are no audio files.
The countersBelow the picture: how many breaths the dragon has taken and how many bolts have landed.

Nobody wins. The dragon is never hurt, the village never burns down, and when the round ends it starts again.

How the scene is drawn

The scene is built from about 7,000 flat triangles with a position in three dimensions. Each frame the program works out where every triangle falls on the screen, how brightly the sun lights it, and what is in front of what. Each cell of the screen then gets one letter: a bright letter for a lit surface, a dark one for a shadowed one.

There is one detail here that belongs to this site. A letter is taller than it is wide. In this scene each cell is 7 pixels wide and 8 tall, so a picture drawn as if the cells were square would look squeezed. The program stretches the height by 7/8 to make up for it, which is why a round tower looks round. The picture is a grid of about 158 by 78 letters on a computer, and 112 columns wide on a phone.

How to take it

Press Download the HTML file above to get dragon-over-blackridge.html, or press Copy the code and save it as a file ending in .html. It is one file with no libraries and works offline. To record a video, open the picture-only view and record your screen.

View the code
Loading…

Embed it on your page

<iframe src="https://aspect.tools/blackridge-dragon" style="border:0;width:100%;max-width:1180px;aspect-ratio:16/14.6" title="Dragon over Blackridge" loading="lazy"></iframe>

License and credit

MIT License. You can use it, change it, share it and sell things made with it, for personal or commercial work. The one condition: keep the copyright and license notice that is at the top of the file.
Dragon over Blackridge, 2026 series, by aspect.tools (https://aspect.tools/dragon-over-blackridge), MIT License

A visible credit is appreciated but not required.

How to change it

What to changeWhereExample
Turn the automatic battle offautoBattle in CONFIGautoBattle: false,
Who fires and whenAUTO_PLAN, seconds into the round and who fires[2.0, 'dragon'],
How long a round lastsAUTO_PERIOD, in secondsconst AUTO_PERIOD = 20;
How fast the camera turnsorbitSpeed, in radians per secondorbitSpeed: 0.1,
How big the dragon isdragonSizedragonSize: 2.0,
How far away the camera isstartDistancestartDistance: 40,
Where the houses standthe places list in village, one x and z per house[1.1, 1.4],
The dragon’s coloursdragonScale, rust, bone and membrane, as hex codesrgb('d0766b')

Questions

Do I have to click anything?

No. The dragon, the village and the castle fire on their own in a 15-second round, and the camera circles the valley by itself. You can fire by hand or turn the view yourself whenever you like.

Who wins?

Nobody. The dragon is never hurt and the village never burns, so the round simply starts over. It is a scene to watch and play with, not a game with a score.

How do I fire by hand?

Press 1 for the dragon's breath, 2 for the village ballistae and 3 for the castle ballistae, or click or tap the dragon, the village or the castle, or the buttons under the picture.

How do I turn the view?

Drag with the mouse or a finger, or use the arrow keys after clicking the picture. Turning stops the automatic orbit. The 360 degree orbit button starts it again.

Does it work on a phone?

Yes. The picture is drawn with a coarser grid of letters on a small screen, and you can drag to turn it. A larger screen shows more detail.

Does it have sound?

Yes, and it starts off. Press the Sound button or the M key to turn it on. A browser only lets a page make sound after you have pressed something, which is why it cannot start by itself. The volume slider is next to the button.

Does it slow my computer down?

It redraws about 30 times a second while something is moving, and it stops drawing while the tab is hidden.

Can I use it in my own project?

Yes. It is under the MIT License for personal and commercial use. Keep the license notice at the top of the file.

Related tools and guides