Building ghostgame.io — A multiplayer word game

Back-story!

What’s this game?

Sample game play with 3 players
Side note: In the classic variant the round would have ended at Player 3 because a valid word “DYE” is completed. But we removed this constraint in our game.
Another sample game play with 3 players
In case Player 1 was unable to come up with a longer word when challenged, Player 1 would have lost the point instead of Player 2

Game Design!

State transition diagram
Our implementation consisted of a few more states and transitions to handle cases such as players exiting
A time-lapse of how the design changed over various commits

System Design!

  1. Firebase Cloud Firestore, for storing state data and updating clients in real time
  2. Google Cloud Functions, for implementing game logic and updating the state
Back-end system design

Cloud Firestore

Cloud Functions

Concurrency bugs!

Privacy!

So what does it look like?

--

--

--

Think, Learn, Engineer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

OpenCensus for Java gRPC developers

How to create an expense manager using Entity Framework Core and Highcharts

New in MicroStation CONNECT Edition Update 15 — Support for Wild Cards

Brainpan 1

Red Green Refactor

How to get started with a career in Algorithmic Trading, Quantitative Finance

Monitoring and Alerting for SaaS Deployments

OKR Case Study #1 — How to set KEY results?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ravikiran R

Ravikiran R

Think, Learn, Engineer

More from Medium

Allowing admin users to decide who should and shouldn’t receive daily push notifications

How to speed up Adobe PWA for logged in customers

SHA256.HashData Thread Safe

Material UI in React #3 — Styles — adding global theme and overriding default styles