globeNetworking Overview

Enemy Masses includes a networking-agnostic multiplayer contract: interfaces, server-side validation, and editor tooling that make it straightforward to connect your preferred networking solution (NGO, Mirror, Photon, FishNet, custom). You implement the transport/RPC layer and game-specific systems (auth, lobby, matchmaking), while Enemy Masses provides the scalable RTS simulation and authority/validation hooks.


What's Included

βœ… Ready to Use

Feature
Description

Network Interfaces

INetworkAuthorityProvider, INetworkDamageAuthority, INetworkCommandAuthority, INetworkSpawnAuthority

Anti-Cheat System

Server-side validation for damage, commands, spawns, and movement

Command Validation

Rate limiting, ownership checks, range validation

Network Events

Hooks for damage, death, spawn, and command events

Local Testing Stub

LocalNetworkAuthority for single-player and prototyping

Editor Tools

Setup Wizard, Anti-Cheat Monitor window

πŸ”§ You Implement

Task
Why

RPC Layer

We can't know which networking solution you'll use (NGO, Mirror, Photon, etc.)

Player Authentication

Your game's login/session system

Lobby & Matchmaking

Game-specific requirements vary widely

Network Transport

Handled by your chosen networking package


Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      Your Game Code                         β”‚
β”‚         (Input handling, UI, game logic)                    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚
                              β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Enemy Masses Runtime                     β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                  β”‚
β”‚  β”‚ CrowdController β”‚  β”‚  RTSController  β”‚                  β”‚
β”‚  β”‚  (Agent AI)     β”‚  β”‚ (Selection/Cmd) β”‚                  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜                  β”‚
β”‚           β”‚                    β”‚                            β”‚
β”‚           β–Ό                    β–Ό                            β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚            Network Authority Provider                β”‚   β”‚
β”‚  β”‚  - INetworkDamageAuthority (validate/apply damage)  β”‚   β”‚
β”‚  β”‚  - INetworkCommandAuthority (validate commands)     β”‚   β”‚
β”‚  β”‚  - INetworkSpawnAuthority (spawn/despawn agents)    β”‚   β”‚
β”‚  β”‚  - AntiCheatComponent (server-side validation)      β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚
                              β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              Your Networking Implementation                 β”‚
β”‚                                                             β”‚
β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”‚
β”‚   β”‚   NGO   β”‚  β”‚ Mirror  β”‚  β”‚ Photon  β”‚  β”‚ FishNet β”‚      β”‚
β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β”‚
β”‚                                                             β”‚
β”‚   You implement RPCs that call our interfaces               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Quick Start

1. Choose Your Path

Scenario
Recommended Approach

Single-player only

Use LocalNetworkAuthority (default) β€” no extra work needed

Prototyping multiplayer

Start with LocalNetworkAuthority, add networking later

Production multiplayer

Implement INetworkAuthorityProvider with your networking solution

2. Single-Player Setup (Default)

Enemy Masses works out of the box for single-player. The LocalNetworkAuthority stub handles all network calls locally:

3. Multiplayer Setup

For multiplayer, implement the network interfaces with your chosen solution:


Implementation Checklist

Minimum Viable Multiplayer

Production Ready


Networking Solutions

We provide integration guides for popular networking packages:

Solution
Guide
Status

Netcode for GameObjects

NGO Integration

βœ… Available

Mirror

Mirror Integration

🚧 Coming Soon

Photon Fusion

Photon Fusion Integration

🚧 Coming Soon

FishNet

FishNet Integration

🚧 Coming Soon


Key Concepts

Server Authority

All gameplay-affecting actions are validated by the server:

Network IDs

Every networked agent needs a unique ID assigned by the server:

Ownership

Agents can be owned by players for command validation:


Anti-Cheat System

The optional anti-cheat system provides server-side validation:

Validation
What It Checks

Damage

Range, rate, valid targets, damage amounts

Commands

Ownership, rate limits, valid destinations

Spawns

Authority, spawn limits, valid positions

Movement

Speed limits, teleport detection

Enable in Inspector on your Network Authority GameObject, or via code:

See Anti-Cheat System for configuration details.


Common Questions

Do I need multiplayer for Enemy Masses to work?

No. Enemy Masses works fully in single-player mode using LocalNetworkAuthority. Networking support is optional.

Can I add multiplayer later?

Yes. The architecture is designed so you can start single-player and add networking later. Your game logic stays the same β€” you just swap the authority provider.

Which networking solution should I use?

Solution
Best For

NGO

Unity-native, good for new projects

Mirror

Open source, mature, large community

Photon Fusion

Managed hosting, global infrastructure

FishNet

Performance-focused, modern API

Why isn't the networking layer fully implemented?

Every game has different requirements:

  • Different networking solutions (NGO, Mirror, Photon, etc.)

  • Different authority models (dedicated server, host-client, relay)

  • Different persistence needs

  • Different matchmaking requirements

We provide the architecture and validation β€” you provide the transport and RPCs for your specific needs.


Next Steps

  1. Single-player? β†’ You're done! LocalNetworkAuthority works by default

  2. Planning multiplayer? β†’ Read NGO Integration Guide

  3. Need anti-cheat? β†’ See Anti-Cheat System

  4. Testing locally? β†’ See Local Network Authority


  • Netcode for GameObjects Integration

  • Local Network Authority

  • Anti-Cheat System

  • Public API Reference

Last updated