
11/15/2021 · Erwin van der Koogh, Guido Zuidhof
What this post added
This post details the architecture and implementation of a game jam entry, 'Full Tilt,' which leverages Cloudflare Workers and Durable Objects for on-demand, geographically distributed game rooms. It explains the use of Durable Objects for creating stateful 'mini servers' or 'rooms' that clients can connect to via WebSockets. A 'Room Hub' Durable Object is introduced to manage the mapping between short, human-readable room codes and the randomly generated Durable Object IDs, ensuring that game rooms are created geographically close to the end-user. The post also discusses the trade-offs between WebRTC and a serverless approach for communication and the design of the room code generation to avoid confusion.