Harsh Vyas
← Index

Work / 05

Tic Tac Toe

Play a friend online, pass-and-play offline, or lose to the computer.

Year
2022
Platform
Web
Built with
SvelteKit, TypeScript, Firebase
Status
Live

Notes

A small game, built to learn real-time multiplayer properly.

How it works

Each online game is a shared record in Firebase’s Realtime Database. Both players subscribe to it, so a move on one screen shows up on the other almost instantly. If a player drops off, they can rejoin the same game where it left off.

Features

  • Online games with a friend, with in-game chat.
  • Pass-and-play on one device.
  • A computer opponent.
  • Music and sound effects throughout.