Mattle (http://mattle.online) is an online board game platform I built with Meteor. In short, it’s a real-time game site where players are connected and matched to play digital version of board games / card games over the Internet. Below is a short list summarizing the core features of Mattle:
- web version, android and iOS hybrid apps
- all built with a single Meteor app
- Single server deployment
- A.I. players
- Game-matching lobby
- ELO ratings/ ranking system
- Game timers
- In-game chat
- Discussion board
As of today, there are around 400 active players with 1000 games completed each day. I’m very happy with what Meteor offered, without which building and hosting such platform could take me 10x more effort and cost.
To give back to the community, I would like to start a series of blog to share my experiences along the way, for whoever interested in building online multiplayer games but don't know where to start.
What to expect?
The whole series is divided into two major parts. Part A will be tutorial based. We will build a simple online version of Tic-Tac-Toe together with step-by-step instructions. No prior knowledge of Meteor is required, but a bit experienced on React would be helpful to understand some frontend code. Again, it won't be too complicated since interface isn't our primary focus.
The final application of part A contains mainly two views. The lobby view looks like the first picture below. Users can create or join games, and "enter" a particular game, which is shown on the second picture.
While the part A will be focused on demonstrating the power of Meteor in terms of the ease of building real time multiplayer games, part B will be focused on the system architecture and design philosophy behind a complicated game platform. I will share my experiences on transforming a bare-bone Meteor game (as in Part A) into a production-ready game site, which is hosting multiple games across multiple platforms.
You are also welcome to use the source as a boilerplate for kickstarting your own game. At the end of part A, I will show you how the Tic-Tac-Toe game can be changed to a Nim game with around 200 lines of changes.
Below is the tentative table of content:
Part A - First online game with Meteor
- Synchronizing data (game) between server and clients
- Implementing game lobby (game matchings)
- Implementing account system (players login)
- Encapsulating game logics (ORM in Meteor)
- Validating game actions in server (avoid cheating)
- Wrapping up
- (maybe) Implementing ratings/ ranking system
- (maybe) Implementing In-game chat
Source code can be found at this Github URL:
I have also included releases for each parts:
Part B - System architecture of online games platform
Dividing complex system into components to archive modular design and micro-services architecture
Compiling multiple hybrid apps with a single Meteor application hosted in a single server container.
Serving multiple games (each with its own subdomains) with a single Meteor application hosted in a single server container.