Back to articles
I Built a Doom Clone in One HTML File

I Built a Doom Clone in One HTML File

via Dev.to JavaScriptMartin Patino

The first version of Cthulhu just walked into a wall and stayed there. Six tentacles flailing, third eye glowing, zero threat. I'd spent two days on the rendering — bezier curves, phase transitions, attack patterns — and the thing couldn't navigate around a pillar. That's how most of Hell Crawler went. Build something that looks right, realize it doesn't work right, tear it apart, rebuild. The game you can play here is the version where things finally came together. What the game actually is Clear every room. Kill every demon. Save your family. Yeah, the story is ridiculous. It's a top-down dungeon shooter — 7 procedurally-linked rooms, 9 enemy types, weapons ranging from a pistol to a chainsaw, a vehicle combat level, a bomb defusal level, and a Cthulhu boss fight at the end. The whole thing lives inside a single <script is:inline> tag in an Astro page. About 3,500 lines of vanilla JavaScript hitting the Canvas API directly. No build step, no game engine, no npm packages. I wanted to

Continue reading on Dev.to JavaScript

Opens in a new tab

Read Full Article
8 views

Related Articles