← Back to Projects
Full-Stack Development Network Programming Gameplay Engineering

Social Games Platform

The Goal

I wanted to build a social gaming hub (similar to Gamesaro) where players could play different mini-games like Ludo, Chess, and Billiards from a single app. The main challenge was figuring out how to make these different games share the same backend for things like friends lists, currency, and chatting, while letting each game handle its own specific gameplay logic.

What I Built

I built a full-stack platform using Unity for the client and Nest.js for the server, designed so new games could be added easily.

  • Unified Hub Architecture: Wrote a central platform layer that handles player states globally. This means a player's social presence and currency stay synced whether they are playing Ludo or sitting in the main menu.
  • Pluggable Games: Set up the client architecture so that each mini-game is treated as a separate module. They all use the same core interfaces to report match results or request user data.
  • Nest.js & WebSockets: Built the backend hub from scratch using Nest.js and WebSockets. This handles the real-time stuff—like inviting a friend from the main menu straight into a Billiards match.
  • Deterministic Physics (Billiards): For the Billiards game, I wrote a custom deterministic physics simulation. Instead of syncing every ball's position over the network constantly, the server just syncs the initial shot data, and both clients simulate the exact same outcome locally.
  • Social Features: Implemented a friends system, direct messaging, and room lobbies that overlay on top of whatever game is currently running.
  • UI Framework: Used Unity's UI Toolkit with an MVC pattern to keep the massive amount of social UI organized and responsive.

Takeaways

  • Modularity Pays Off: By spending the time to build a solid core hub, adding new games like Chess took a fraction of the time because the social and economic systems were already there.
  • Physics Syncing: Writing deterministic physics was tough but totally worth it. It kept the network traffic super low and made the Billiards game feel perfectly smooth.
  • Full-Stack Perspective: Building both the Unity client and the Nest.js backend gave me a much deeper understanding of how to architect multiplayer games end-to-end.