Yes, Discord can play DOOM.

Discord joins the coveted category of technology including calculators, smart fridges and TVs, it can play DOOM!

Yes, Discord can play DOOM.

Discord recently announced their Embedded app SDK. This has been anticipated for years, ever since the first Discord-built apps released. This means it's time to answer the age-old question. Can it play DOOM?

How do Embedded apps work?

Basically, Discord proxies a webpage & serves it inside an i-frame (which renders inside Discord). This means there's several layers of seperation between your site and Discord, which isn't important for our use case. Serving static content is the easiest way to get started with Embedded apps, but using the SDK you can create very involved applications with auth, networking & more.

How do we make it play doom?

There's a lot of potential answers for this! If we have users locally install a version of DOOM that serves via a webserver, we can display the game in-app that way. But that's overly complicated, so what if we could render DOOM as HTML instead?

Web Assembly my beloved

As with all good things, OSS is here to save the day. Github user Mattias Gustavsson created This repo, which uses WASM to build DOOM as pure, unadulterated HTML. As the source files of the base DOOM.wad are very small, it's trivial to host them using a free-tier serverless service.

Cloudflare Pages

Once you have your HTML version of DOOM Shareware, re-name it to index.html, put it in a standalone folder, and now you're good to go! Now, we need to get this hosted on Cloudflare using Pages. Navigate to your Cloudflare Dashboard, then Pages & Workers, then create an application & finally, navigate to Pages.

Now you just need to upload your standalone folder with your index.html, and just like that you've now got DOOM being hosted directly from CF Pages! You can also set a custom domain, in our case we set up doom.pnly.io!

Setting up your application

Next, we need to handle the Discord side of things. Let's start on the Developer Portal. From here, we'll make a new Application and navigate to it's Activities tab. Now you're going to paste your URL from your Cloudflare page here!

You can also add art assets for your DOOM Activity, but this is optional but cool.

DOOM in Discord

And now, just like that, you can add your App to a server and play!

But this isn't new?

Discord may have made their SDK public recently, but dedicated developers have been reverse engineering the SDK since 2021!

What's next?

As the URL for the activity is arbitrary, you can really put nearly anything into Discord! We (PNLY) plan to release an activity version of our CraftCord Discord App, allowing friends to infinitely craft stuff in Discord together! I (Panley) am going to try and work out a way to make a generic PiKVM interface for Discord activities, so you can technically play any game inside Discord, so Discord will soon be able to run Crysis.

But what should you make? Something! Anything!

Happy building!