Emscripten + GZDoom = WASM for a Web Browser, but I'm stuck

Need help running various source ports? Did your computer break? Ask here.

Moderators: GZDoom Developers, LZDoom Developers, UZDoom Developers

Forum rules
Please be as descriptive as possible in your posts (list your hardware and operating system, the version of the source port you are using, any mods you are running and how they're being loaded, etc.)
This will help others to give you a solution!
User avatar
Jay0
 
 
Posts: 98
Joined: Tue Aug 21, 2018 9:31 pm
Preferred Pronouns: She/Her
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Brazil

Re: Emscripten + GZDoom = WASM for a Web Browser, but I'm stuck

Post by Jay0 »

(and if you wish to upstream any of the emscripten support changes, feel free to open a PR - contributions are always welcome)
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3266
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain

Re: Emscripten + GZDoom = WASM for a Web Browser, but I'm stuck

Post by drfrag »

Wenas. Yeah i didnt realize it was that until today. I mentioned it here:
viewtopic.php?p=1264574#p1264574
ololoken
Posts: 9
Joined: Wed Dec 17, 2025 2:24 am

Re: Emscripten + GZDoom = WASM for a Web Browser, but I'm stuck

Post by ololoken »

Jay0, drfrag, thanks a lot!
Well, I'm not sure about PR. It's told that zdoom officially supports only 64-bit platforms, and wasm64 isn't working everywhere yet https://caniuse.com/wf-wasm-memory64.
User avatar
Rachael
Posts: 13988
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: Emscripten + GZDoom = WASM for a Web Browser, but I'm stuck

Post by Rachael »

One thing I have learned over the years with development - if you need something like that but it is not provided everywhere - the best thing to do is go full steam ahead with the new requirements.

A) Over time, support comes in anyway
B) It also helps incentivize developers of the platforms missing the features you need, to go ahead and provide them.

One thing that factors into that calculation is that a lot of desktop browsers and a few of the key mobile browsers do already provide it. From what I can see it is already quite accessible with many platforms as it is.
ololoken
Posts: 9
Joined: Wed Dec 17, 2025 2:24 am

Re: Emscripten + GZDoom = WASM for a Web Browser, but I'm stuck

Post by ololoken »

milpool
Posts: 2
Joined: Mon Mar 13, 2023 4:06 pm
Preferred Pronouns: He/Him
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: Emscripten + GZDoom = WASM for a Web Browser, but I'm stuck

Post by milpool »

ololoken do you have build instructions? I'm having some trouble getting it to build with emscripten
Cake Logic

Re: Emscripten + GZDoom = WASM for a Web Browser, but I'm stuck

Post by Cake Logic »

I am having a hard time trying to get emcmake to see my SDL2 libraries. How are you meant to compile and link SDL2 to your libraries?
Platform: Windows
Compiler: Emscripten Cmake
Command Used in CMD:
emcmake cmake .. -G "MinGW Makefiles" -DHAVE_VULKAN=OFF -DHAVE_GLES2=ON -DDYN_OPENAL=OFF -DBUILD_SHARED_LIBS=OFF -DHAVE_VM_JIT=OFF -DNO_GTK=ON -DDYN_GTK=OFF -DNO_OPENAL=OFF -DDYN_SNDFILE=OFF -DDYN_MPG123=OFF

Error:
CMake Error at C:/Program Files/CMake/share/cmake-4.3/Modules/FindPackageHandleStandardArgs.cmake:290 (message):
Could NOT find SDL2 (missing: SDL2_LIBRARY SDL2_INCLUDE_DIR)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-4.3/Modules/FindPackageHandleStandardArgs.cmake:654 (_FPHSA_FAILURE_MESSAGE)
cmake/FindSDL2.cmake:166 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
src/CMakeLists.txt:135 (find_package)
bootnet
Posts: 1
Joined: Mon Apr 20, 2026 3:56 pm

Re: Emscripten + GZDoom = WASM for a Web Browser, but I'm stuck

Post by bootnet »

I discovered this post midway through my own journey of trying to do the same. Got a working build pipeline together. Figured I'd drop it here in case it's useful. I myself just wanted an easy way to host and play doom mods directly from my browser.

Live: https://uzdoom.bootnet.io/
Repo: https://github.com/abootnet/uzdoom-wasm

There's a Docker image if you just want to run it (ghcr.io/abootnet/uzdoom-wasm:latest), and auto-setup scripts for Linux and Windows if you want to build from source.

Freedoom 1 and 2 play with sound and saves. Heavy ZScript mods like Brutal Doom and Ashes partially work; a full compat pass is the next target.

A note on tooling: I used Claude Code for much of the implementation, with architecture and testing on my side. I know the org's position on LLM contributions, which is why this is a standalone fork and not a PR against UZDoom.

Return to “Technical Issues”