ent-lang demos

Programs written in ent-lang, a language of entities, components and systems, compiled to WebAssembly with ent build --web and running here in your browser. Click a page, then use the keys it lists.

Natively the same programs run on all cores; in the browser each runs on one thread.

Each fills the browser's tab. On a phone they answer touches, and those played or steered with keys show their keys under them.

Games

A maze with dots, four ghosts and the mouth

A maze game

A maze, a mouth and four ghosts: the pellets and the ghosts are entities, the maze a text that functions read. Sound too.

←↑→↓ steer, Enter again
A road across a green board, foes walking it

Towers

A tower defence game: foes walk a road, towers beside it shoot them. Ten waves, twenty lives, two maps.

click a tower, then a field; Space next wave
A dark field with foes, shots and gems

Swarm

A shoot-'em-up on a field much bigger than the window, with foes, shots and sparks in their thousands.

Enter start, WASD move, mouse aims, B stress
A snake on a checkered board

Snake

Every piece of the snake is an entity that knows for how many more steps it stays. The board is as big as fits.

Space start, arrows or WASD turn

Simulations

A car backing into a gap between parked cars

Parking in a tight spot

Real vehicles' numbers, ultrasonic sensors and camera vision with its blind zone, what the car believes beside the truth, a car that parks itself, a trailer, and a car park where six park at once.

A parks itself, arrows drive, N/P place, 1–5 vehicle, V view, H trailer
Three ring roads of cars and a time-space plot

Ring roads

Sugiyama's 22 cars on a 230 m ring, where a jam forms that nothing caused; lanes with trucks and passing; the road over the last minutes below.

Space holds, ↑/↓ time faster or slower
Four streets meeting at a junction

Junctions

Four streets meet and the cars find their way through: lights, a roundabout, a priority road, stops at every street; and a highway with on- and off-ramps.

1–7 choose the scene
A sun with planets and moons

Orrery

A sun, planets, moons and a station around a moon: every body knows only its orbit around the one it circles.

Space holds the bodies still
Coloured balls in a box

Bounce

Balls in a window: the smallest program with the window device.

Space holds, left mouse button pulls the balls

Layout

A side bar, cards and a footer

Layout

Boxes that say how big they are to be and which box they are in; where they end up is worked out every frame.

right mouse drags the side bar, Space stacks the cards, wheel scrolls
Thirty numbered boxes and four buttons

Clay: transitions

Thirty boxes that move, change colour, come and go in half a second each: every box an entity.

click the buttons, click a box
A document viewer with a menu bar

Clay: video demo

A header with a menu that drops down, a side bar of documents, and the chosen one in a box that scrolls.

point at File, click a document, wheel scrolls