Public Release
Battle Realms Multiplayer Is Back
After months of development and testing, Battle Realms Online is now publicly available. The BRO patch can be downloaded from ModDB. All the details are available on this site and on the ModDB page.
Battle Realms is one of the many good games that fell victim to the GameSpy shutdown in 2014, and one that never got a native replacement. Without those servers, the game is completely left without multiplayer. BRO replaces the dead GameSpy infrastructure with a custom master server, bringing the multiplayer back to life.
P2P + NAT vs Relay
Back when GameSpy was alive, Battle Realms had a well-known networking issue. The game's own README had an entire section dedicated to firewalls and routers, and it essentially told you to figure it out yourself or ask your network admin. Here's what it said about NAT:
Battle Realms does not have full functionality for computers accessing the Internet via a router using NAT. Users with such computers are limited to joining games hosted by others since these users cannot create their own games (they can create games, but other players can't see, much less, join these games).
The game needs multiple UDP ports to be open inbound and outbound. That implies someone had to go into their router settings and manually forward those ports to their computer. Most people couldn't figure it out or just didn't want to deal with it, that is still relevant today.
It has become even worse since then - many ISPs now use CGNAT, where users share a single public IP address. Port forwarding is impossible in that setup without a dedicated IP. Dorm networks or university Wi-Fi for example won't let you touch router settings at all. So even if you wanted to host a multiplayer game of Battle Realms the old-fashioned way, you simply wouldn't be able to.
This is what I actually wanted to avoid, so I made a relay server solution that acts as a middleman between players. Instead of connecting directly to each other, both players connect to the relay, and the relay forwards packets between them, essentially connecting them with each other. Since outbound connections work through NAT, this bypasses the problem entirely.
Here, I drew an ELI5 (P is for Player, R is for Relay):

The direct P2P setup caused other problems too. With N players in a P2P mesh, there are N*(N-1)/2 direct routes between them, and any single bad route drags the entire game down due to lockstep. For example, if the A -> B direct route is terrible (say, Brazil to Australia with awful inter-ISP routing), the whole room lags - even if everyone else has perfect connections to each other.
Good news is the relay reduces this problem. It cuts the route count down to just N - one per player to the server - and routes to a well-connected datacenter tend to be more reliable than routes between random residential connections. In that same example, both A -> Relay and B -> Relay might be fine because datacenter routing is more predictable. Fewer routes, better routes. If someone has a bad route to the relay, everyone still lags - that's lockstep - but the odds of it happening are lower. Since nobody connects to each other directly anymore, while not exactly being Client-Server, BRO helps the game advance from DP2P (Direct-Peer-To-Peer) to something we could call P2R2P (Peer-To-Relay-To-Peer) - or PRP for short (Peer-Relay-Peer). In the end, given how Battle Realms was originally built, going the PRP way is the only logical way for the game's multiplayer to remain functional and cost-efficient at the same time.
It's not all magic though - routing packets through a relay adds extra latency compared to a direct connection, and that's a trade-off worth mentioning. But in practice, for an RTS like Battle Realms, it's absolutely acceptable - and when you consider everything PRP eliminates (NAT issues, port forwarding etc.), that difference becomes negligible. The VPS currently used by BRO is hosted in the Netherlands, which means players outside of Europe will feel it a bit more. That can be solved down the line with additional VPS locations.
It's an interesting topic that I've already talked too much about, but if you're curious, here are some relevant reads:
- SnapNet - Netcode Architectures: Lockstep
- Gaffer On Games - What Every Programmer Needs To Know About Game Networking
- Game Developer - Minimizing The Pain Of Lockstep Multiplayer
- Hacker News - 1500 Archers on a 28.8: Network Programming in Age of Empires and Beyond
- Reddit - AOE2 DE is still P2P, just proxied via a server
- Högskolan Kristianstad - An analysis of continuous consistency models in real time peer-to-peer fighting game
One Answer
BRO itself is a full standalone replacement for GameSpy (though only for Battle Realms). The game doesn't even know GameSpy is gone. As far as it's concerned, nothing changed. Everything just works.
The BRO patch modifies a few things in the game executable - mainly the server addresses the game connects to. A companion DLL (wsock32) handles the relay routing behind the scenes. Everything goes through a relay server, which means it works behind any network without any configuration on your end.
Besides fully restored features such as main chat (and whispers) or map transfers, the patch includes general lobby improvements: you can see player names in hosted games, chat messages are color-coded (green for joins, red for leaves, blue for system messages) - just to name a few.
The Future
Simply restoring the multiplayer and keeping the implementation stable is good enough. The infrastructure costs are modest, and I don't mind keeping the server running. It doesn't matter whether there's a thriving community or just a few people who want to play online once or twice a year - the point is that they can. The goal is to have this service persist, and not die like GameSpy did.
If I were to think about the future, and if there are players to do this for, we're looking at adding relay servers in different regions based on player locations.
Dependency vs. Dependency
Yes, this creates another infrastructure that could shut down exactly like GameSpy did. The only realistic scenarios where this goes away are if it can't sustain itself financially, which is unlikely given how cheap it is to run, or if I get hit by a bus which isn't something I lose sleep over.
BRO is one game, one VPS (currently), and a couple of maintainers. The economics are nothing like what killed GameSpy.
Reach Out
The easiest way to get started is to join the Discord - that's where players find each other, and a bot there reports live game and server info.
The project is community-funded. If you'd like to help keep things running, check out the Support page. But the simplest and most impactful thing you can do is tell someone else this exists.
For everything else - suggestions, questions - reach out at contact@battlerealmsonline.cc.
Signing Off
While I'm confident in the work I've done, and months of testing with multiple players have gone well, keep in mind that this is still a fresh public release. If decades of software development have proven anything, it's that the real QA begins once it's out in the wild. Things might break. Regardless of how it goes, I'll be maintaining the project in my spare time. Thanks for reading, and have fun playing!