Skip to content
Cloudflare

Multiplayer Doom on Cloudflare Workers

May 18, 2021Celso Martinho17 min read
Opens blog.cloudflare.com
What the post coversAI, from the source post

This post details the technical challenges and solutions involved in porting multiplayer Doom to run on Cloudflare Workers and Durable Objects.

  • It covers compiling Chocolate Doom to WebAssembly using Emscripten, adapting the game's main loop for an event-driven browser environment, and implementing a new network module (`net_websockets.c`) to tunnel UDP-based game traffic over WebSockets.
  • Key technical contributions include creating a fake IP address for routing, implementing a packet queue to buffer TCP-based WebSocket traffic, and demonstrating the feasibility of low-latency, real-time multiplayer gaming on the edge.
Read the full post on blog.cloudflare.com · 17 min (opens in a new tab)

More from the Edge Computing with Cloudflare Workers trail