Skip to content

barmoshe/temporal-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multiplayer Tic-Tac-Toe with Temporal Workflows

A multiplayer Tic-Tac-Toe game implementation using Temporal for state management and synchronization across devices. Inspired by the 4-hour multiplayer game challenge.

tictactoe.mp4

Features

  • Room-based multiplayer gameplay
  • Real-time updates via WebSockets
  • 30-second move timer
  • Automatic win/draw detection
  • State persistence with Temporal workflows

Setup Requirements

  • Python 3.10+
  • Temporal Server

Quick Start

  1. Start Temporal Server:

    temporal server start-dev --db-filename your_temporal.db --ui-port 8080
  2. Run Backend:

    cd services/backend
    pip install -r requirements.txt 
    python server.py

    In a separate terminal:

    cd services/backend
    python worker.py
  3. Start Frontend:

    cd web/frontend
    python3 -m http.server 8000
  4. Play:

    • Open http://localhost:8000 in your browser
    • Create a game room and share the ID
    • Second player joins using the room ID

Technical Overview

The application uses Temporal workflows to manage game state and ensure consistency across player sessions. WebSocket connections provide real-time updates between the backend and frontend clients.

License

MIT License


Inspired by the "Build a multiplayer game in 4 hours" challenge: https://youtu.be/ftYmXoH0V5I

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors