Build a Monster Capture MMORPG
PokeMMO proved that players want a persistent online world where they can catch, battle, trade, and socialize. Building that experience from scratch took the PokeMMO team over a decade of development.
OpenMon's Online tier ships with 20 integrated services that provide the complete backend for a monster capture MMO -- powered by Nakama, an open-source game server used by studios worldwide.
Available in the Online tier and above.
What You Get
The Online tier extends OpenMon's single-player engine with a full multiplayer backend:
Core Online Services
| Service | What It Does |
|---|---|
| Authentication | Email, device, social login (Google, Apple, Discord) with session management |
| World Sync | Real-time player positions, shared overworld, see other players moving |
| PvP Battles | Matchmaking with ELO ratings, ranked and casual modes, spectating |
| Trading | Peer-to-peer monster and item trading with server validation |
| Social | Friends list, blocking, status messages, online/offline tracking |
| Guilds | Create and manage guilds with ranks, permissions, and member limits |
| Chat | Global, local, guild, and whisper channels with moderation tools |
| Housing | Player-owned spaces with furniture placement and visitor permissions |
| Economy | Server-authoritative currency, marketplace with buy/sell orders |
| Cloud Saves | Server-side save storage with conflict resolution |
| Leaderboards | Multiple ranking categories (battle rating, dex completion, achievements) |
| Live Events | Time-limited events, special encounters, seasonal content |
| Anti-Cheat | Server-authoritative validation for battles, trades, and economy |
| Analytics | Player behavior tracking, session metrics, economy health monitoring |
| Persistence | Player data, monster storage, and inventory stored server-side |
| Matchmaking | Custom matchmaking logic with skill-based and rule-based modes |
| Notifications | Push notifications for trade requests, battle challenges, events |
| Admin Panel | Web-based tools for server management, player lookup, ban system |
Architecture Overview
┌─────────────┐ WebSocket ┌──────────────┐
│ Unity Client │ ◄──────────────► │ Nakama Server │
│ (OpenMon) │ │ (Docker) │
└─────────────┘ └──────┬───────┘
│
┌──────┴───────┐
│ PostgreSQL │
│ (Game Data) │
└──────────────┘
The client connects to Nakama via WebSockets for real-time communication. All authoritative game logic runs server-side via RPCs (Remote Procedure Calls). PostgreSQL stores persistent data.
Getting Started
Step 1: Set Up the Server
The fastest way to start is with Docker:
docker-compose up -d
OpenMon includes a docker-compose.yml preconfigured with Nakama and PostgreSQL. This gives you a local development server in under a minute.
For production, you can deploy to any cloud provider. Nakama supports:
- Heroic Cloud (managed, easiest)
- AWS / GCP / Azure (self-hosted, full control)
- DigitalOcean / Hetzner (budget-friendly VPS)
Step 2: Configure the Client
In Unity, create an OnlineConfig asset:
- Go to MCE > Online > Create Config
- Set your server URL (default:
localhost:7350for development) - Set the server key (default:
defaultkeyfor development) - The config asset lives in
Resources/and is loaded automatically
Step 3: Enable Online Mode
Add the MCE_ONLINE scripting define to your project:
- Edit > Project Settings > Player > Scripting Define Symbols
- Add
MCE_ONLINE - The NakamaManager singleton auto-creates on first scene load
Step 4: Test Connectivity
Enter Play Mode. The console shows:
[NakamaManager] Connecting to localhost:7350...
[NakamaManager] Connected. Session: abc123...
[NakamaManager] World sync active. Player registered.
Open a second Unity editor instance (or build a standalone) to test multiplayer features with two clients.
Building Key Features
PvP Battle System
OpenMon's PvP battles are server-authoritative -- the server validates every move, prevents cheating, and handles disconnections.
// Challenge a player to a PvP battle
var challenge = await engine.Online.PvP.Challenge(opponentUserId);
// Or join ranked matchmaking
var match = await engine.Online.PvP.JoinRankedQueue(teamRoster);
The matchmaking system supports:
- Ranked -- ELO-based skill matching with seasonal resets
- Casual -- relaxed matching for fun battles
- Custom -- invite-only with custom rulesets (level caps, ban lists)
- Tournament -- bracket-based competitions
Trading System
Server-validated trading prevents item duplication and ensures fair exchanges:
// Propose a trade
var trade = await engine.Online.Trading.Propose(
partnerId,
offeredMonsters: myMonsters,
offeredItems: myItems
);
// Partner reviews and accepts/declines
// Server validates both sides, then executes atomically
Guild System
// Create a guild
var guild = await engine.Online.Social.CreateGuild("Gym Leaders United", maxMembers: 50);
// Guild features: ranks, permissions, shared storage, guild battles
Player Housing
Housing lets players customize personal spaces:
- Place furniture and decorations
- Set visitor permissions (public, friends-only, guild-only, private)
- Visit other players' houses
- Housing items as rewards for achievements and events
Economy and Marketplace
The server-authoritative economy prevents inflation and exploitation:
- Marketplace -- players list monsters and items for sale; other players browse and buy
- Currency sinks -- configurable gold sinks (teleportation, cosmetics, housing) to maintain economic health
- Auction system -- time-limited auctions for rare items and monsters
- Price history -- track market trends for balancing
Scaling for Production
Server Architecture for Scale
For a few hundred concurrent players, a single Nakama instance is sufficient. As you grow:
| Concurrent Players | Infrastructure |
|---|---|
| 1-500 | Single Nakama + PostgreSQL |
| 500-5,000 | Nakama cluster (2-3 nodes) + managed PostgreSQL |
| 5,000-50,000 | Auto-scaling Nakama cluster + read replicas |
| 50,000+ | Regional clusters + global matchmaking |
Hosting Costs (Estimated)
| Scale | Monthly Cost |
|---|---|
| Development | $0 (local Docker) |
| Soft launch (100 CCU) | $20-50/month (VPS) |
| Live (1,000 CCU) | $100-300/month |
| Growth (10,000 CCU) | $500-2,000/month |
These are rough estimates. Actual costs depend on your server location, data transfer, and database size.
What PokeMMO Built That You Get Included
| Feature | PokeMMO (custom, 10+ years) | OpenMon Online (included) |
|---|---|---|
| Real-time world | Custom Java networking | Nakama WebSocket sync |
| PvP battles | Custom battle server | Server-authoritative PvP |
| Trading | Custom trade protocol | Validated trading service |
| Chat | Custom chat server | Nakama chat channels |
| Economy | Custom marketplace | Marketplace + economy tools |
| Anti-cheat | Custom server validation | Server-authoritative logic |
| Guilds | Custom guild system | Nakama groups + extensions |
Limitations and Honest Expectations
Building an MMO is hard. OpenMon's Online tier handles the technical infrastructure, but you still need to:
- Design engaging content -- an MMO needs ongoing content to retain players
- Moderate your community -- chat moderation, ban systems, player reports
- Maintain servers -- updates, monitoring, backups, scaling
- Balance the economy -- real money and in-game currency economics
- Handle operations -- customer support, bug triage, live events
An MMO is a service, not a product. Be prepared for the ongoing commitment.
Next Steps
- Online Setup Guide -- detailed server configuration
- Authentication -- user account systems
- PvP Battles -- competitive battle setup
- Economy -- marketplace and currency
- Social Features -- friends, guilds, chat