Aspect ratio calculator / The Imugi and the Tower in ASCII

The Imugi and the Tower in ASCII

A giant serpent on a skyscraper and the helicopters sent to stop it, printed in text. Click them, and they answer.

ASCII · 2026 series · All animations

Click the imugi’s face to bite. Click a helicopter for a missile. The tail follows your pointer. Free under the MIT License.

What it is

A monster-film scene printed with letters and symbols. An imugi has wound itself two and a half times around a skyscraper and lifted its head above the roof. Five military helicopters circle that head at night, over a city of lit windows. The whole scene is a small 3D model that turns slowly, and every part of it is text: # and @ for lit scales, H and 0 for windows, = and - for rotor blades.

In Korean folklore an imugi is a giant serpent that has not yet become a dragon. In many tellings it must wait a thousand years before it can rise into the sky. It has no horns, wings or legs, so this one is a plain, very large snake with a pale belly and yellow eyes.

It reacts to you

What you doWhat happens
Click or tap the imugi’s faceIt opens its jaws, shoots its neck out to the nearest helicopter, catches it, shakes it and crushes it. A new helicopter flies in a few seconds later.
Click or tap a helicopterThat helicopter fires a missile. It steers toward the imugi’s head, leaves a smoke trail and explodes. The imugi flinches and its eyes turn red for a moment.
Move the pointer, or drag a fingerThe tip of the tail goes after it, as far as the tail can reach. After four seconds without movement the tail sways by itself.
Drag left or rightThe scene turns, with a little momentum.
Do nothingEvery few seconds a helicopter fires by itself, and now and then the imugi bites one.
Press SoundTurns on a hiss for the bite, a whoosh for the missile and a boom for the blast (off by default).

The Bite and Missile buttons under the scene do the same as the clicks.

How it is built

The tower, the lower buildings and the streets are fixed blocks. The imugi is rebuilt on every frame from about 130 balls placed along a spiral, a neck curve and a tail curve, so it can crawl, strike and reach. Dark bands travel along the body, which makes it look as if it is sliding around the tower. Each helicopter is a list of about 70 points that is turned to face the tower as it flies.

While the page prints the characters it also notes what is drawn in each cell: nothing, the body, the face, or helicopter number one to five. A click looks up that note, so you can only hit what you can see.

How to take it

Press Download the HTML file above to get ascii-imugi-tower.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.

View the code
Loading…

Embed it on your page

<iframe src="https://aspect.tools/ascii-imugi" style="border:0;width:100%;max-width:660px;aspect-ratio:660/1010" title="The Imugi and the Tower in ASCII" 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.
The Imugi and the Tower in ASCII, 2026 series, by aspect.tools (https://aspect.tools/ascii-imugi-tower), MIT License

A visible credit is appreciated but not required.

How to change it

What to changeWhereExample
The words on screenTITLE, BITE_TEXT, MISSILE_TEXT, HIT_TEXTvar BITE_TEXT = 'G O T O N E !';
Number of helicoptersHELISvar HELIS = 8;
Size of the towerTOWER: half the width, and the height{ half: 8, height: 60 }
How the imugi coilsCOIL: turns, distance from the centre, start and end height{ turns: 4, radius: 11, from: 8, to: 57 }
How far the tail reachesTAILvar TAIL = 40;
Stop the automatic shots and bitesAUTOvar AUTO = false;
Colours of the imugithe mat('imugi'...), mat('imugi2'...) and mat('belly'...) linesmat('imugi', 200, 70, 60) for a red one
Colours of the helicoptersthe mat('heli'...) and mat('heliDark'...) linesmat('heli', 120, 130, 150) for grey

Questions

What is an imugi?

A giant serpent from Korean folklore that has not yet become a dragon. In many tellings it has to wait a thousand years first.

What can I click?

Click the imugi's face to make it bite the nearest helicopter. Click any helicopter to make it fire a missile.

How does the tail follow the pointer?

The tip of the tail moves toward the pointer and stops when the tail is fully stretched. On a phone it follows your finger while you drag.

Can the helicopters kill the imugi?

No. Missiles make it flinch, and it keeps its place on the tower.

Can I use it in my own project?

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

Does it work on phones?

Yes. Tap instead of clicking, and drag sideways with a finger to turn the scene.

Related tools and guides