Skip to content

A Simple Multiplayer Tic Tac Toe built on top of the Lunatic Runtime

Notifications You must be signed in to change notification settings

MarkintoshZ/rust-tic-tac-toe-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Tic Tac Toe Server

A project for CS128H 2021

Video Demo (Don't mind the clickbait thumbnail)

Video Demo

Team Name

MK

Team Member

Mark Zhang (zz91)

Summary

A simple multiplayer game server written in rust for the game tic tac toe inspired by Colyseus. The server uses the actor concurrency model powered by Lunatic and the server code will be compiled to WASM for safer sandboxing. Each game room will be handled in a dedicated Lunatic process. State delta will be computed and sent to the client instead of the whole game state using dipa.

System Overview

  • Server

    • Systems
      • object delta (dipa)
      • (de)serialization (bincode)
      • Lunatic process spawning for each room
      • Message passing between processes
    • Server Logic
      • Room creation, deletion
      • Game State Management (in game, gameover)
      • Game action handling
  • Client

    • Connect to server
    • (de)serialization
    • display board
    • handle keyboard input

Possible Challenges

  • Lunatic is a relatively new runtime so getting it to work with websocket might take some time to figure out
  • Handling state changes and serialization using dipa

References

  • Lunatic concurrency runtime
  • Lunatic.Chat Lunatic demo chat app
  • dipa library for computing and applying object deltas
  • Colyseus (a node.js game server) for inspiration

License

MIT

Feel free to 🌟 to show some love!

About

A Simple Multiplayer Tic Tac Toe built on top of the Lunatic Runtime

Topics

Resources

Stars

Watchers

Forks

Languages