I picked up the new Pokemon Legends: Arceus last week and my boys and I are really enjoying passing the controller around to take turns roaming the open regions of Hisui in search of new pocket monsters to nab. It’s inspired me to prototype a monster battler of sorts – but built specifically for multiplayer!
I wanted to build this in Unreal Engine 4 this time and get more intimately familiar with its network framework and set of sacred classes. If you’re on a similar journey, I found Cedric Neukirchen’s “UE4 Network Compendium” pdf to be an excellent complement to the official Epic documentation. Do check it out! Early on, I found myself often revisiting the server/client Venn diagram on page 10 to sort out why things weren’t replicating as intended.
I stood up a basic flow where a player can create a session that other players can search for and join. Once a session has two players, it closes itself off for others to join and the server begins the match. The match concludes when a winner is declared or the timer runs out at which point, all players are funneled back to the main screens.
Players are primarily limited to two actions: changing their active monster and attacking. All actions have a cost that’s throttled by a timer-based mana system. Attacks are setup to define elemental types and critical hit probabilities. Speaking of which, the damage formula follows something along the lines of this guide.
Honestly, there’s nothing super exciting to see here in this rudimentary experience, but I’m particularly happy with how much I had to learn to overcome the many, many mistakes I made along the way to make sure a) things replicate as intended, and b) anything of consequnce to gameplay is server authenticated and initiated.