Back to List
CSS is DOOMed: How Modern Web Standards Rendered the Classic FPS Entirely with CSS Transforms
Industry NewsCSSWeb DevelopmentRetro Gaming

CSS is DOOMed: How Modern Web Standards Rendered the Classic FPS Entirely with CSS Transforms

Developer Niels Leenheer has successfully rendered the classic game DOOM using modern CSS, proving the immense progress of web styling capabilities over the last 30 years. While the game logic and state are handled by JavaScript—partially generated with the assistance of Claude AI based on the original C source code—every visual element including walls, floors, barrels, and imps is a <div> element positioned in 3D space using CSS transforms. This project, which evolved from a previous experiment running DOOM on a 1980s oscilloscope, serves as a stress test for browser limits. Although the author initially attempted to handle game logic within CSS, it proved too complex, leading to a hybrid approach that highlights the power of modern CSS rendering.

Hacker News

Key Takeaways

  • Pure CSS Rendering: Every graphical element in the game, from the environment to the enemies, is a standard HTML <div> positioned using CSS 3D transforms.
  • Hybrid Architecture: While rendering is handled by CSS, the game logic and loop run in JavaScript to manage complexity.
  • AI-Assisted Development: The developer used Claude to help port the original DOOM C source code into a JavaScript game loop.
  • Browser Stress Test: The project was designed specifically to find the limits of modern browser performance and demonstrate how far CSS has progressed in three decades.

In-Depth Analysis

From Oscilloscopes to Modern Web Standards

The project originated from the developer's previous success in running DOOM on a 1980s oscilloscope. This prior experience provided the foundational math and the necessary code to extract maps from the original game files. The transition to CSS was driven by a desire to showcase the evolution of web technology. By treating the browser as a 3D engine, the developer transformed the traditional perception of CSS from a simple styling language into a powerful rendering tool capable of handling complex spatial transformations.

The Limits of CSS Logic vs. Rendering

During the proof-of-concept phase, the author explored the possibility of handling game state and logic entirely within CSS. However, while rendering proved to be "absolutely" feasible, the logic required for a functional game like DOOM was deemed too complicated for CSS alone. To maintain focus on the CSS rendering aspect, the developer utilized Claude to create an approximate version of the game loop in JavaScript. This allowed the project to leverage the original DOOM source code—which has been public for years—without the manual labor of a hand-coded port, focusing instead on the innovative use of 3D transforms for the visual output.

Technical Implementation of the 3D World

The core of the engine relies on the 3D capabilities of modern CSS. Every wall, floor, and sprite (like barrels and imps) is represented by a <div>. These elements are manipulated in a 3D space, allowing the browser's rendering engine to handle the perspective and depth that traditionally required dedicated graphics APIs. This approach highlights the significant progress CSS has made over the last 30 years, moving from basic document styling to a tool capable of recreating iconic 3D gaming experiences.

Industry Impact

This project serves as a significant benchmark for the web development industry, demonstrating that modern CSS has reached a level of maturity where it can handle complex 3D rendering tasks previously reserved for Canvas or WebGL. It underscores the potential for "CSS-first" visual experiences and encourages developers to rethink the boundaries between styling and engine-level rendering. Furthermore, the use of AI to port legacy C code to JavaScript highlights a growing trend in how developers can use LLMs to handle repetitive architectural tasks, allowing them to focus on creative and experimental implementations of web standards.

Frequently Asked Questions

Question: Is the game logic also written in CSS?

No. While the developer initially attempted to include game logic and state in CSS, it was found to be too complicated. The game logic and loop are handled by JavaScript, while the rendering is done entirely through CSS.

Question: How are the 3D graphics generated without WebGL?

The game uses standard HTML <div> elements for every object in the game. These elements are positioned and oriented in a 3D environment using CSS transforms, which the browser then renders as a cohesive 3D scene.

Question: What was the role of AI in this project?

The developer used Claude to help port the original DOOM C source code into a JavaScript game loop. This allowed the developer to focus on the CSS rendering challenges rather than manually rewriting the well-known game logic.

Related News

Meituan Showcases AI Innovations at ACL 2026: From Model Evaluation to Reasoning Optimization and Generative Paradigms
Industry News

Meituan Showcases AI Innovations at ACL 2026: From Model Evaluation to Reasoning Optimization and Generative Paradigms

Meituan's technical team has announced the acceptance of six research papers at ACL 2026, a premier international conference in computational linguistics and natural language processing. The papers cover a broad spectrum of cutting-edge AI fields, including large model evaluation, complex process reasoning, and competition-level mathematical thinking optimization. Additionally, the research explores advancements in reinforcement learning and generative recommendation systems. These contributions signify Meituan's strategic focus on building a new paradigm for generative AI, aiming to enhance the logical depth and practical utility of language models. By addressing both theoretical benchmarks and real-world application challenges, Meituan continues to position itself at the forefront of NLP research, contributing to the evolution of how AI systems reason, learn, and interact with users in complex environments.

Meituan LongCat Team Launches General 365: A New Benchmark Revealing Critical Gaps in AI Reasoning Capabilities
Industry News

Meituan LongCat Team Launches General 365: A New Benchmark Revealing Critical Gaps in AI Reasoning Capabilities

The Meituan LongCat team has officially released General 365, a rigorous new benchmark designed to evaluate the reasoning capabilities of modern artificial intelligence. In an initial assessment of 26 mainstream models, the results reveal a significant performance gap across the industry. Even Gemini 3 Pro, currently identified as the most powerful model in the test, achieved an accuracy rate of only 62.8%. Furthermore, the vast majority of the models tested failed to reach the 60% threshold, which is traditionally considered a passing grade. This release by Meituan's technical team establishes a new standard for measuring logical depth in AI and highlights the substantial room for improvement in complex reasoning tasks.

Managing AI Coding with Agent Evaluation: Meituan's Practice in Refactoring 310,000 Lines of Code
Industry News

Managing AI Coding with Agent Evaluation: Meituan's Practice in Refactoring 310,000 Lines of Code

Meituan's technical team has introduced a groundbreaking approach to managing AI-assisted development, focusing on the refactoring of 310,000 lines of code. As AI now generates over 90% of code in certain environments, the primary challenge has shifted from production speed to the management of AI's output quality. The team argues that without unified standards, AI can exponentially increase technical debt and system chaos. To combat this, Meituan implemented an 'Agent evaluation' mindset, utilizing four key pillars: technical debt sorting, rule construction, a standardized Refactoring SOP, and a Pre-PR (Pull Request) mechanism. This strategy successfully transitions code refactoring from a high-cost, specialized project into a sustainable, daily iterative process, ensuring long-term system stability in the era of AI-dominated coding.