Cloudflare

Building real-time games using Workers, Durable Objects, and Unity

May 26, 2021Kristian Freeman
Building real-time games using Workers, Durable Objects, and Unity
SummaryAI, from the source post

This post details the technical implementation of a real-time multiplayer game, 'Durable World,' built entirely on Cloudflare's stack. It showcases how Cloudflare Workers, Durable Objects, and WebSockets can be combined to manage game state, synchronize player positions, and handle real-time communication. The post provides code examples for the Durable Object's `Character` module, demonstrating WebSocket setup, session handling, and broadcasting game state updates. It also touches upon the client-side implementation in Unity, highlighting the authoritative client model and how game objects are managed.

More from the Edge Computing with Cloudflare Workers trail