{"id":50115542,"url":"https://github.com/cloudflare/doom","last_synced_at":"2026-05-23T15:03:15.403Z","repository":{"id":50260654,"uuid":"366861717","full_name":"cloudflare/doom","owner":"cloudflare","description":"Website and Message Router source code for the Multiplayer Doom on Cloudflare Workers tech demo","archived":false,"fork":false,"pushed_at":"2026-05-19T15:24:36.000Z","size":8365,"stargazers_count":200,"open_issues_count":4,"forks_count":27,"subscribers_count":7,"default_branch":"main","last_synced_at":"2026-05-19T15:58:16.013Z","etag":null,"topics":["cloudflare","doom","websockets","workers"],"latest_commit_sha":null,"homepage":"https://silentspacemarine.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudflare.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-05-12T21:46:18.000Z","updated_at":"2026-05-17T13:42:08.000Z","dependencies_parsed_at":"2025-01-26T09:11:18.136Z","dependency_job_id":"bffea70f-91da-488b-9a08-0492c367875f","html_url":"https://github.com/cloudflare/doom","commit_stats":null,"previous_names":["cloudflare/doom"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cloudflare/doom","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudflare%2Fdoom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudflare%2Fdoom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudflare%2Fdoom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudflare%2Fdoom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudflare","download_url":"https://codeload.github.com/cloudflare/doom/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudflare%2Fdoom/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33400251,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T04:15:53.637Z","status":"ssl_error","status_checked_at":"2026-05-23T04:15:53.242Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudflare","doom","websockets","workers"],"created_at":"2026-05-23T15:02:28.468Z","updated_at":"2026-05-23T15:02:56.221Z","avatar_url":"https://github.com/cloudflare.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Multiplayer Doom Workers\n\nThis repo contains two Workers\n\n- Website for https://silentspacemarine.com/ in [Cloudflare Pages][3]\n- Wasm Doom message router, using [WebSockets][1] and [Durable Objects][2]\n\n## Website\n\nAssets are in [./assets][8]\n\nWorker code is in [site/index.js][9]\n\n**You need the following files in ```./assets``` (not included in this repo)**:\n\n * [doom1.wad][15] (md5sum: f0cefca49926d00903cf57551d901abe)\n * [websockets-doom.js][16] - get it from doom-wasm src directory after compilation\n * [websockets-doom.wasm][16] - get it from doom-wasm src directory after compilation\n * [websockets-doom.wasm.map][16] - get it from doom-wasm src directory after compilation\n\n### To publish:\n\n```\nnpm install -g @cloudflare/wrangler@beta\nwrangler login\nwrangler publish --config wrangler-site.toml\n```\n\nAdjust [wrangler-site.toml][4] to your ```account_id``` and ```zone_id```.\n\n## Wasm Doom message router\n\nOur message router has the following requirements:\n\n- Accept Wasm Doom WebSocket connections and build a routing table\n- Receive and parse the incoming messages\n- Broadcast the messages to the corresponding clients\n- Handle some REST APIs to create and validate Doom rooms (sessions)\n\nJust supports the network multiplayer in our [Silent Space Marine][6] showcase project.\n\nRead more about it in our [blog post here][5].\n\nThe router source code is at [router/index.mjs][7]\n\n### To publish:\n\nFirst make sure you have [Durable Objects][10] enabled in your account.\n\nMake sure you have the Durable Objects wrangler (beta) installed:\n\n```\nnpm install -g @cloudflare/wrangler@beta\n```\n\nAdjust [wrangler-router.toml][11] to your ```account_id``` and ```zone_id``` or use the ```CF_ACCOUNT_ID``` and ```CF_ZONE_ID``` environment [variables][14].\n\nRun this command just [once][12]\n\n```\nwrangler login\nwrangler publish --config wrangler-router.toml --new-class Router\n```\n\nLater updates use:\n\n```\nwrangler login\nwrangler publish --config wrangler-router.toml\n```\n\n### Makefile\n\nYou can use ```make``` to deploy the workers.\n\nCreate an ```.env``` file with your account and zone ids:\n\n```\nROUTER_CF_ZONE_ID = 72...........91\nROUTER_CF_ACCOUNT_ID = 0a...............2f\nSITE_CF_ZONE_ID = 13....................a0\nSITE_CF_ACCOUNT_ID = 07.................4f\n```\n\nRun ```make```:\n\n```\nmake publish\n```\n\n## Running Multiplayer Doom locally\n\nYou can run the Website, Wasm Doom and Multiplayer locally, in your computer, using a NodeJS WebSocket router implementation.\n\nFirst install [NodeJS][13] and npm. Then:\n\n```\ncd scripts\nnpm install\n./router.js\n```\n\nPoint your browser to http://0.0.0.0:8000\n\nRead more about Multiplayer Doom on Cloudflare Workers in our [blog post here][5].\n\n[1]: https://developers.cloudflare.com/workers/runtime-apis/websockets\n[2]: https://developers.cloudflare.com/workers/runtime-apis/durable-objects\n[3]: https://developers.cloudflare.com/pages/\n[4]: wrangler-site.toml\n[5]: https://blog.cloudflare.com/doom-multiplayer-workers\n[6]: https://silentspacemarine.com/\n[7]: router/index.mjs\n[8]: assets\n[9]: site/index.js\n[10]: https://developers.cloudflare.com/workers/learning/using-durable-objects\n[11]: wrangler-router.toml\n[12]: https://developers.cloudflare.com/workers/learning/using-durable-objects#publishing-durable-object-classes\n[13]: https://github.com/nvm-sh/nvm#installing-and-updating\n[14]: https://developers.cloudflare.com/workers/cli-wrangler/configuration\n[15]: https://doomwiki.org/wiki/DOOM1.WAD\n[16]: https://github.com/cloudflare/doom-wasm\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudflare%2Fdoom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudflare%2Fdoom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudflare%2Fdoom/lists"}