Edge Computing with Cloudflare Workers
Building real-time games using Workers, Durable Objects, and Unity

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

5/26/2021 · Kristian Freeman

What this post added

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 used together to manage game state, synchronize player positions, and handle real-time communication. The post provides code examples for the Durable Object's `Character` module, including session handling, message broadcasting, and player state management. It also discusses the client-side implementation in Unity WebGL, focusing on how player input and game state are managed and synchronized with the server.

Read the original post ↗