nowfound

Dev tools · October 1, 2024

AP

A port of DOOM that runs (almost) entirely on the GPU

I've been recently working on porting standard C library functions to work on the GPU https://libc.llvm.org/gpu/. A colleague of mine suggested using it to run DOOM, so that's what I did. It runs on both AMD and NVIDIA GPUs and it is completely playable. This works by targeting C code directly for the GPU via cross-compilation in clang, looks something like this https://godbolt.org/z/hh44a6vKr. The LLVM C library will provide the headers, C library functions, and the kernel that calls the main function, so we only need to compile the DOOM source code…

What it does

In the maker’s words, at launch

I've been recently working on porting standard C library functions to work on the GPU https://libc.llvm.org/gpu/. A colleague of mine suggested using it to run DOOM, so that's what I did. It runs on both AMD and NVIDIA GPUs and it is completely playable. This works by targeting C code directly for the GPU via cross-compilation in clang, looks something like this https://godbolt.org/z/hh44a6vKr. The LLVM C library will provide the headers, C library functions, and the kernel that calls the main function, so we only need to compile the DOOM source code targeting my GPU to get an executable. Then it's just a matter of writing a loader utility to launch this program on the GPU using the appropriate vendor runtime libraries (AMD's HSA or CUDA). Now, it's not entirely on the GPU because we still need the CPU's operating system to do a few things. The loader utility has a thread continuously scanning some memory for 'syscall' requests from the GPU. Currently the only parts running on the CPU for this demo are standard I/O, reading input keys from SDL, and writing the rendered framebuffer to the SDL window. The only modifications made to the DOOM source code itself were done to allow rendering with multiple threads for better FPS.

Does the same job

all alternatives →
  • IB
    I built a RISC-V emulator that runs DOOMMay 2026 · github.com · ▲50

    Demo: https://www.youtube.com/watch?v=f5uygzEmdLw Hi HN, I built a RISC-V emulator that implements the RV32IM instruction set and a minimal syscall interface to run DOOM. A few weeks ago, I got my first output with a simple hello world assembly program. Since then I have been working tirelessly to get DOOM to run. I needed to figure out how to run C programs first, and came across newlib, which allows the underlying environment to implement the syscall stubs one by one until the programs run. I have also added ELF loading, but currently only a single `PT_LOAD` segment is…

  • GA
    Gore – A Doom Engine Port in Go2025 · github.com · ▲9

    Hi HN, I’ve been working on Gore – a port of the classic Doom engine written in pure Go, based on a ccgo C-to-Go translation of Doom Generic. It loads original WAD files, uses a software renderer (no SDL or CGO, or Go dependencies outside the standard library). Still has a bit of unsafe code that I'm trying to get rid of, and various other caveats. In the examples is a terminal-based renderer, which is entertaining, even though it's very hard to play with terminal-style input/output. The goal is a clean, cross-platform, Go-native take on the Doom engine – fun to hack on, easy to read,…

  • TP
    Twitch Plays Doom2017 · ▲113

    This is the inevitable post after jeff_harris released restful-doom https://news.ycombinator.com/item?id=14919534 twitch-plays-doom is a Python Twitch IRC->restful-doom proxy to control doomguy with a staggering 8 second delay. The project was Saturday night's 'I wonder if I can make this work' session. Since it's been live there has been a team of four successfully make it to half way through E01M01. I've since added godmode to the chat (you can guess the command). This was fun, hope others get some enjoyment out of it. Twitch Stream/Chat…

  • TD
    TTF-DOOM – A raycaster running inside TrueType font hintingApr 2026 · github.com · ▲68

    TrueType fonts have a hinting VM that grid-fits glyphs. It has a stack, storage area, conditionals, function calls, and it turns out it's Turing-complete. So I built a raycasting engine in the hinting bytecode. The glyph "A" in the font has 16 vertical bar contours. The hinting program reads player coordinates from font variation axes via GETVARIATION, does DDA ray marching against a tile map in the storage area, and repositions bar heights with SCFS. It ends up looking like a crude Wolfenstein-style view. Small visuzlization:…

  • RyzenClaw + RadeonClawMar 2026 · ▲67

    Run OpenClaw locally on your AMD PC

  • AM

More dev tools this month

the category →
  • Dograh592

    The open source VAPI alternative

    Dev tools · 25d ago · dograh.com

  • Meridian530

    Don't let your work go unnoticed. Get promoted!

    Dev tools · 20d ago · meridiona.com

  • x1516

    Lovable for iPhone apps go from idea to App Store

    Dev tools · 11d ago · x1.new

  • Open-source GTM skills for technical founders

    Dev tools · 29d ago · gtmcofounder.com

  • OpenTrailPaper is open-source bike computer firmware for the LilyGO T5S3 4.7" E-Paper PRO. It supports offline maps, GPX routes, FIT recording and Bluetooth sensors.

    Dev tools · 2d ago · opentrailpaper.com

  • Nuphos380

    The AI-Native DevOps Workspace.

    Dev tools · 24d ago · nuphos.ai

Launched alongside, October 2024

the whole month →
  • buzzabout1,267

    Audience insights from 1B+ online discussions in 2 mins

    AI · 2024 · buzzabout.ai

  • bolt.new1,233

    Prompt, run, edit & deploy full-stack web apps

    AI · 2024 · bolt.new

  • Feta1,217

    Run smarter stand-ups, build better products

    AI · 2024 · feta.io

  • Trag955

    AI code review companion

    AI · 2024 · usetrag.com

  • Turn Notion databases into portals & apps with no code

    Dev tools · 2024 · softr.io

  • One inbox for all your work discussions

    Work · 2024 · generalcollaboration.com