Abyss Vanish
ABYSS VANISH / DEVELOPMENT JOURNAL

Can Our Own Engine Draw the Website?

October 31 to November 1: abyssvanish.com's homepage made into an Abyss Engine UI package, dressed in the jurors' highest-scoring style, Ostinato's, then made to fill the window, with a dark look, gliding scroll and real links; the HTML site stays

Early this morning I asked the media agent whether we should try a website made with Abyss Engine. Its answer was careful: yes, but as a work beside the HTML site, not a replacement. I said, "do it yourself." Less than an hour later the same homepage, the same words, was being drawn stroke by stroke by the engine in the browser, and then I asked it to wear the style our jurors scored highest. Later I found the proportions and handling wrong; with the session that does UI it added filling the window, a dark look, gliding scroll and real links. My verdict: the HTML site stays for now. This is how it went.

Previous: Three Apps on a Database: a Messenger, a Tool, a Plant Diary →

From a question to a page

This entry follows an attempt made from early on October 31 to the next morning. The thread runs: replace or not → the homepage as a UI package → faces and pictures → live → the highest-scoring style → proportions and handling → dark, and scrolling → scrolling as one motion → real links. Our AI media agent built the page, and the UI session built filling the window and the links into the engine; I asked and decided. The scores come from the last round's three AI jurors.

Replace it?

What I asked was: "Shall we try an official site made with Abyss Engine?"

How we worked
The media agent first listed what an engine-drawn page cannot do, then advised: make it a work under /play/ui-pages/, keep the HTML site as the official one, and it would keep the two in step.
What was hard
An engine page is drawn whole on a canvas: search engines, screen readers, browser translation and copying text cannot read its words, and the canvas has one size, so a small screen only shrinks it instead of laying it out again.
What we did
I said to keep going and it wrote a brief for the session that does the UI work; then I said "do it yourself", and it took the brief back and built it.
Still open
To truly replace the site it would have to pass at least three tests first: readable on a phone, findable by search engines, and readable by a screen reader.

The homepage as a UI package

The first version: the homepage drawn by the engine in the HTML site's dark colours
How we worked
It wrote a build script that reads the site's index.html and refuses to build unless every sentence is found in the original, so not a word is its own. The homepage became a dozen sections, each a UI document in Chinese and one in English; the flow is written in .abyss, buttons open the real pages in a new tab with ui.open_url, and the menu glides to its section. The compiler, the page template and the runtime are pinned to d2f4a2ca; the runtime is the same file as the Kerf page on the site, checked by sha256.
What was hard
The first version shared one layout between the languages: every box had to hold the longer English, so the Chinese had wide gaps between paragraphs and an unevenly spaced menu.
What we did
Now each language is laid out for its own words, with its own section positions, menu targets and page height, and the page height changes with the language.
Still open
Text heights are estimated from the words, not measured; too much leaves a little air, too little would cut words off, so it errs on the tall side.

Faces and pictures

The first version in Chinese: boxes sized for the English leave wide gaps between paragraphs
How we worked
The engine's own faces are Latin only. Chinese is set in Noto Sans CJK TC, cut down to the characters this page uses: 16.4 MB as shipped, 254 KB for its 518 characters. English headings and body use the engine's Instrument Serif and IBM Plex.
What was hard
The first build was 6.9 MB, heavier than the earlier UI pages (3.6–4.8 MB); the pictures alone were 2.5 MB, the town seen from above at the top 724 KB of it.
What we did
The pictures went to 256 colours with dithering: the top one became 248 KB and the page 5.3 MB. That is compression, as JPEG is, not retouching.
Still open
The engine alone is 2.9 MB (the wasm 2.78 MB), and every first visit downloads it. Three cold loads each over HTTPS in headless Chromium on this Mac: the engine page drew its first frame in 2.3–3.5 s and received 3.5 MB; the HTML homepage loaded in 1.3–1.9 s with 1.0 MB.

Live

Open the engine-drawn site

How we worked
I said "put it up and let's look". It placed six files at /play/ui-pages/abyssvanish/, compared each one's sha256 on the server, then opened it over HTTPS: the language switch, the menu gliding to each section and "Walk into the town" opening Gen Town in a new tab all worked, with no errors in Chromium or WebKit.
What was hard
On a phone the whole page only shrinks and the words get small; search engines, screen readers and translation still cannot read it.
What we did
The page says it is the version drawn with Abyss Engine, and its header and foot link back to the HTML text version.
Still open
It has not been tried on a real phone or in Firefox, and neither the homepage nor the works list links to it yet: for now this entry is the way in.

The highest-scoring style

Once it was up, I asked it to "pick our highest-scoring design style and apply it to the engine version of the site". Of the fifteen pages the three jurors scored last round, the highest was Ostinato Nº 20 (round twelve, mean 8.28).

Ostinato Nº 20: cream paper, ink, one red-orange, the last line of the headline in red italic
The engine-drawn homepage in Ostinato's style: cream paper, an ink headline, its second line in red-orange
The engine version's foot: the red contact band, and Abyss Vanish in large italic on the dark ground
The same page in English: Where games and imagination meet., the second line in red italic
How we worked
It read the colours and the layout from Ostinato's package: cream paper, ink and one red-orange; big Instrument Serif headlines with the last line in red italic; small tracked monospace labels; ink pills; open sections divided by hairlines instead of boxes; a red contact band, and a dark foot with the name set very large.
What was hard
The hairlines came out as thick brown rules: a translucent panel drawn alone brings the preset's edge and shadow with it, a trap the engine's own notes already record. The English headline's box was also too tall, because the narrow serif was estimated too wide.
What we did
Rules and borders became colours mixed opaque beforehand, and the narrow serif is estimated narrower. Not a word changed, only the look.
Still open
Only Ostinato's colours, type and rhythm were borrowed, not its paper-strip motion; nothing on this page moves yet. Placed again in the new style, it measured once at 3.2 s and 3.6 MB to the first frame.

Proportions and handling

When I looked, my verdict was: not quite okay; the obvious faults are the proportions and how it handles. I had it hand that to the session that does UI, which has the last word on how the engine's interface works.

Filling the window, at phone width (390): the menu moves to a second line and the picture below the text
How we worked
The UI session added "window": "fill" to the engine (abyss-engine f7a1281f): the page fills the browser window instead of being a fixed-size canvas scaled to fit. The media agent laid the homepage out for six column widths (1248, 1088, 928, 600, 340, 300), Chinese and English each, twelve layouts, and picks one by the window's width on load and on resize.
What was hard
On a canvas the browser handles no scrolling or pointer for you: what can be pressed and what can be dragged is the page's own decision.
What we did
Only buttons and links take presses, and they light up under the pointer; a drag anywhere else scrolls.
Still open
Phone widths have only been seen in headless emulation, not on a real phone. This version, three cold loads from this Mac over HTTPS: 2.4–3.8 s and 4.3 MB to the first frame.

Dark, and scrolling

Looking again, I told it: maybe the scrolling needs to feel smoother, and it needs a dark version; on the whole it was very good, thumbs up.

The dark look: the same page on a dark ground with cream type, the red-orange unchanged
How we worked
Every colour became a palette token, and the ◐ beside the language button switches the whole page with ui.palette. Each section is drawn once right after a layout loads; from then on scrolling draws only what is in view.
What was hard
Measured in headless Chromium, scrolling held a steady 60 fps; the roughness was not the frame rate but the wheel jumping notch by notch.
What we did
The measurable part came first; the jumping waited for the next step.
Still open
The words are still only painted on the canvas: you cannot select or copy them, and the browser's Find cannot see them.

Scrolling as one motion

What I had in mind: when an event arrives, don't rush to update right away; gather what the reader does into one motion. It may cost some immediacy, but the visual feedback could be nicer.

How we worked
The wheel no longer moves the page directly; it moves a target, and the view follows it with a time constant of about 140 ms.
What was hard
Five quick notches used to be five jumps.
What we did
Now five notches are one glide that settles at 600 pixels.
Still open
The glide is written in the page itself; if the UI session builds it into the engine, the page's copy goes.

The next morning the UI session made links real in the engine (abyss-engine 902c18b1). I said it could go up.

How we worked
A component can carry an "href", and the browser places a real link over its spot on the canvas. The site's own pages open in the same tab; App Store, Google Play and email open as they always do; Tab moves between the links. The old way, ui.open_url opening a new tab, is gone.
What was hard
Meanwhile the homepage's words had changed: Gen Town's first download became about 90 MB and Viper's gameplay score 6. The build checks the engine version's words against the live homepage, found the old ones and refused to build.
What we did
Rebuilt with the homepage's words as they are now, and put up again a minute later.
Still open
Apart from the links, the words are still only on the canvas: search engines, screen readers and browser translation cannot read them. Three cold loads from this Mac over HTTPS on November 5: 2.1–3.3 s and 3.4 MB to the first frame; the HTML homepage, measured on October 31, took 1.3–1.9 s and 1.0 MB.

Not yet

I had said the HTML site does not need replacing yet, and later that I could answer whether to replace it once there is a version that satisfies me. With the proportions and handling fixed, I said it was very good on the whole and gave it a thumbs up; the dark look, gliding scroll and real links came after. But the three tests, a phone, search engines and screen readers, are not passed yet, so the HTML site stays the official one and the engine version stays at /play/ui-pages/abyssvanish/ as a work, its words kept in step with the homepage.

閱讀中文版All entries