Skip to main content

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

ServiceWhat It Does
AuthenticationEmail, device, social login (Google, Apple, Discord) with session management
World SyncReal-time player positions, shared overworld, see other players moving
PvP BattlesMatchmaking with ELO ratings, ranked and casual modes, spectating
TradingPeer-to-peer monster and item trading with server validation
SocialFriends list, blocking, status messages, online/offline tracking
GuildsCreate and manage guilds with ranks, permissions, and member limits
ChatGlobal, local, guild, and whisper channels with moderation tools
HousingPlayer-owned spaces with furniture placement and visitor permissions
EconomyServer-authoritative currency, marketplace with buy/sell orders
Cloud SavesServer-side save storage with conflict resolution
LeaderboardsMultiple ranking categories (battle rating, dex completion, achievements)
Live EventsTime-limited events, special encounters, seasonal content
Anti-CheatServer-authoritative validation for battles, trades, and economy
AnalyticsPlayer behavior tracking, session metrics, economy health monitoring
PersistencePlayer data, monster storage, and inventory stored server-side
MatchmakingCustom matchmaking logic with skill-based and rule-based modes
NotificationsPush notifications for trade requests, battle challenges, events
Admin PanelWeb-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:

  1. Go to MCE > Online > Create Config
  2. Set your server URL (default: localhost:7350 for development)
  3. Set the server key (default: defaultkey for development)
  4. The config asset lives in Resources/ and is loaded automatically

Step 3: Enable Online Mode

Add the MCE_ONLINE scripting define to your project:

  1. Edit > Project Settings > Player > Scripting Define Symbols
  2. Add MCE_ONLINE
  3. 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 PlayersInfrastructure
1-500Single Nakama + PostgreSQL
500-5,000Nakama cluster (2-3 nodes) + managed PostgreSQL
5,000-50,000Auto-scaling Nakama cluster + read replicas
50,000+Regional clusters + global matchmaking

Hosting Costs (Estimated)

ScaleMonthly 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

FeaturePokeMMO (custom, 10+ years)OpenMon Online (included)
Real-time worldCustom Java networkingNakama WebSocket sync
PvP battlesCustom battle serverServer-authoritative PvP
TradingCustom trade protocolValidated trading service
ChatCustom chat serverNakama chat channels
EconomyCustom marketplaceMarketplace + economy tools
Anti-cheatCustom server validationServer-authoritative logic
GuildsCustom guild systemNakama 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