BlogsTemporalGame Development with Temporal

Game Development with Temporal

Game Development with Temporal

2
posts
2023–2024

This post details the development of a live, multiplayer snake game using Temporal Workflows and Activities to showcase its resilience and ability to handle chaos. The game involved multiple independent Workflows for the game, rounds, and individual snakes. The demo simulated real-world failure scenarios by intentionally restarting Workers (via Activities) when apples were eaten and by physically unplugging network cables from tablets running Workers. Temporal's Durable Execution model ensured seamless recovery from these disruptions, demonstrating its robustness in handling unexpected outages. The post also touches on the use of Socket.io for low-latency UI integration and the performance benefits of the Go SDK for worker implementation in resource-constrained environments. It highlights how Temporal allows developers to focus on game logic rather than error handling.

2024

Snakes, chaos, and the resilience of Temporal: A live demo breakdown

12/5/2024

This post details the implementation of a live, multiplayer snake game as a demo for Temporal's resilience. It describes how Workflows were used to manage the game, rounds, and individual snakes. The demo intentionally introduced chaos by restarting Workers when apples were eaten and by physically unplugging network cables, showcasing Temporal's ability to recover from induced outages. The post highlights the use of Socket.io for real-time UI updates and the choice of the Go SDK for worker implementation due to performance needs on tablets. It emphasizes that Temporal's Durable Execution model handles state persistence and recovery, freeing developers from writing explicit error handling code.

2023

The making of Temporal trivia

8/30/2023

This post details the creation of a trivia game using Temporal, showcasing the use of two workflows (`GameWorkflow` and `AddPlayerWorkflow`) to manage game state and player interactions. It describes how Activities are used for external API calls (ChatGPT, profanity filtering) and how Queries and Signals are employed for game state exposure and player input. The post also discusses frontend development iterations (SvelteKit, Flask) and key learnings regarding workflow design, moderation, and iterative development. Future improvements include using Workflow Updates for efficiency and exploring WebSockets for real-time communication.