> Markdown version of [/videos/100642-css-is-doomed](https://www.wearedevelopers.com/videos/100642-css-is-doomed). Every page supports `.md` or `Accept: text/markdown`. Links point to the HTML versions so they work for humans too. Agent guide: [/agents.md](https://www.wearedevelopers.com/agents.md). --- # CSS is DOOMed After accidentally blowing up a 1980s oscilloscope with the Web Audio API, Niels Leenheer built a playable Doom engine using thousands of HTML divs and modern CSS. - **Speakers:** Niels Leenheer - **Event:** HalfStack Vienna 2026 - **Published:** November 19, 2026 - **Duration:** 36:35 - **URL:** https://www.wearedevelopers.com/videos/100642-css-is-doomed - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/5e990f0427a13ca5851df5da24cd2425/thumbnails/thumbnail.jpg?time=120766ms ## Summary What starts as an obsession with laser projectors and retro vector displays quickly escalates into blowing up a 1980s oscilloscope using the Web Audio API, and ultimately culminates in building a playable version of Doom rendered almost entirely in CSS. Niels Leenheer demonstrates how he first recreated vector graphics by injecting CSS-animated SVGs into the DOM, sampling path coordinates via `getPointAtLength`, and outputting stereo audio waveforms to steer an oscilloscope's X and Y electron deflection plates. After rendering an analog clock, Asteroids, the Chrome Dino game, and a wireframe Doom level on the physical scope, he realized he could repurpose the decoded Doom WAD map data to build a full 2.5D game engine directly in the browser DOM. Instead of relying on `<canvas>` or heavy JavaScript rendering loops, Leenheer's architecture adheres to the philosophy that "JavaScript should only do what only JavaScript can do, because the browser is much better at optimizing than you are." While AI assisted in porting the original C source code to JavaScript for game state and collision detection, the visual rendering relies on thousands of HTML `<div>` elements styled via CSS custom properties. Because Doom is fundamentally a flat 2D map with height values, CSS trigonometry functions (`hypot`, `atan2`) can dynamically calculate wall widths and angles directly from raw X/Y coordinates, positioning surfaces in space with `translate3d` and `rotateY`. Pushing modern CSS specifications to their limits unlocks clever solutions for classic 3D game mechanics. Complex non-rectangular floors and ceilings are carved out using `clip-path` with the human-readable `shape()` function and `evenodd` fill rules. Sector lighting uses CSS `brightness()` filters driven by typed custom properties registered via `@property`, enabling smooth, infinite pulsing light animations. Because CSS lacks a camera object, player movement is inverted: the player remains stationary at the origin while the entire world translates and rotates around them. Furthermore, using standalone transform properties (`translate` and `rotate`) rather than the shorthand `transform` allows projectiles like fireballs to fly through 3D space via CSS animations while simultaneously rotating to face the player (billboarding) without property conflicts. Additional polish comes from stepped background-position animations for sprite sheets, toggling `animation-play-state` between `paused` and `running` for seamless weapon bobbing, and leveraging CSS anchor positioning to keep the player's weapon pinned to a responsive status bar—all while ensuring interactive wall switches use semantic `<button>` elements. **Keywords:** css 3d transforms, doom wad file rendering, web audio api, oscilloscope vector graphics, css trigonometry functions, css custom properties, css @property rule, css clip-path shape function, css anchor positioning, standalone css transform properties, sprite sheet stepped animations, 3d billboarding in css, svg getpointatlength, dom rendering performance, ai code porting c to javascript, semantic html button accessibility ## Chapters 1. **Replacing laser projectors with vintage oscilloscopes for vector graphics** (00:02) — High costs of laser projectors for drawing vector graphics like Asteroids can be bypassed by steering electron beams on a vintage oscilloscope. 1. **Converting SVG animations into Web Audio waveforms for oscilloscopes** (05:02) — Drawing shapes on an oscilloscope requires sampling SVG path coordinates from the DOM and converting them into stereo Web Audio waveforms. 1. **Handling hardware failures and live oscilloscope game demos** (08:49) — After an older oscilloscope exploded during testing, a portable unit demonstrates live vector rendering of a clock, Asteroids, the Chrome Dino game, and Doom. 1. **Rendering Doom levels with CSS 3D transforms and trigonometry** (15:40) — Extracting raw coordinates from Doom WAD files into CSS custom properties enables 3D wall and floor positioning using CSS trigonometry functions. 1. **Creating non-square floors using the CSS clip-path shape function** (20:35) — Complex polygon rooms and cutouts are rendered from square divs by applying the CSS shape function and evenodd clipping paths. 1. **Animating sector lighting and textures with @property and attributes** (22:03) — Registering custom properties as numbers via @property allows smooth CSS brightness filter animations alongside PNG textures loaded from data attributes. 1. **Simulating camera movement, sprite billboarding, and door transitions** (25:31) — Because CSS lacks a native camera, updating custom properties on the scene translates and rotates the entire world around the player while keeping sprites facing forward. 1. **Animating sprite sheets and projectiles with standalone translate properties** (29:00) — Stepped animations cycle through enemy sprite sheets, while standalone translate properties allow fireballs to fly across the room without overriding billboarding rotations. 1. **Smoothing weapon bobbing and aligning UI with anchor positioning** (32:17) — Toggling animation-play-state prevents jarring weapon resets when stopping, while CSS anchor positioning keeps the weapon aligned with a responsive status bar. ## Related Moments - [Rendering a functional game engine using experimental CSS transformations](https://www.wearedevelopers.com/videos/1851-wearedevelopers-live-css-is-doomed) (from "WeAreDevelopers LIVE - CSS is DOOMed") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/a5cdf2911b574a9a77a1a15fa4878d8b/thumbnails/thumbnail.jpg?time=110699ms - [Simulating 3D retro screensavers using modern CSS](https://www.wearedevelopers.com/videos/2155-wearedevelopers-of-agents-and-robots) (from "WeAreDevelopers - Of Agents and Robots") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/0b6109bd96373070cb57d89d728ccee7/thumbnails/thumbnail.jpg?time=466368ms - [Building an arcade game using only CSS and HTML](https://www.wearedevelopers.com/videos/210-playing-games-with-css) (from "Playing Games with CSS") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/042847d2ba44fd2edeb24ecf7e598499/thumbnails/thumbnail.jpg?time=74435ms - [Exploring complex frontend experiments and retro game decompilation](https://www.wearedevelopers.com/videos/1742-wearedevelopers-live-inclusion-accessibility-automation) (from "WeAreDevelopers LIVE – Inclusion, Accessibility & Automation") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/90c389bb29ecfd125459976cb2732696/thumbnails/thumbnail.jpg?time=349135ms - [Pushing CSS limits with 3D rendering and ray tracing](https://www.wearedevelopers.com/videos/1730-wearedevelopers-live-accessibility-isn-t-magic-longevity-devrel-in-times-of-ai-and-more) (from "WeAreDevelopers LIVE - Accessibility isn't magic, Longevity, Devrel in times of AI and more") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/bbb6dc2bdd7f975632640f6b1027544c/thumbnails/thumbnail.jpg?time=170295ms - [Learning modern programming techniques through hackable web games](https://www.wearedevelopers.com/videos/1309-wearedevelopers-live-the-weekly-developer-show-with-chris-heilmann-and-daniel-cranney) (from "WeAreDevelopers LIVE - the weekly developer show with Chris Heilmann and Daniel Cranney") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/970fc1e083e97f741e611dc0c54994d6/thumbnails/thumbnail.jpg?time=158325ms ## Related Articles - [Dev Digest 104 - Fight for your right to 3rd party](https://www.wearedevelopers.com/magazine/390-dev-digest-104-fight-for-your-right-to-3rd-party) - [Dev Digest 112 - The True Crime of AI Development](https://www.wearedevelopers.com/magazine/421-dev-digest-112-the-true-crime-of-ai-development) - [Dev Digest 130 - The Diablo is in the details](https://www.wearedevelopers.com/magazine/470-dev-digest-130-the-diablo-is-in-the-details) - [Building a "shoutout" component in plain HTML/CSS/JavaScript](https://www.wearedevelopers.com/magazine/556-building-a-shoutout-component-in-plain-html-css-javascript) ## Related Jobs - [Staff Frontend Design Engineer - AI & Systems Leader](https://www.wearedevelopers.com/jobs/ext/4629402-staff-frontend-design-engineer-ai-systems-leader) at **GitHub** - [Senior Engineer, Game Mathematician](https://www.wearedevelopers.com/jobs/48550-senior-engineer-game-mathematician) at **Sportradar Media Services GmbH** - [Senior Frontend Engineer](https://www.wearedevelopers.com/jobs/ext/4665402-senior-frontend-engineer) at **Almedia** - [Senior Web Software Architect, AI Experiences](https://www.wearedevelopers.com/jobs/ext/4523834-senior-web-software-architect-ai-experiences) at **TeamViewer Germany GmbH** - [Senior Product Engineer](https://www.wearedevelopers.com/jobs/48544-senior-product-engineer) at **Blacksmith Software** - [Software Development Engineer 4 - Database Engineer](https://www.wearedevelopers.com/jobs/48591-software-development-engineer-4-database-engineer) at **WEX**