To Replicate or not to replicate
- Drake Mitchell

- Apr 30
- 2 min read
Player Replication in Gator Hucker
Epic Online Services Unique Server Interaction
As you may already know from other blogs, our game is an eight-person gator brawler networked through Epic Online Services (EOS), a program to host online multiplayer straight through Epic Games. This is immensely helpful for several reasons, the main one being a, relatively quick, jumpstart into online multiplayer and interactions but it also brought with It a very unique set of troubles. The default lobby creation with EOS is to create a game with using the first player as the host.
This is similar to how a lot of other games run lobbies and uses a dedicated server, however, EOS differs in the fact that the host player is also considered by the game, to be the “server”. This leads to a number of issues that we as a team had to resolve, and it was a big problem for myself as I was creating the player statistics like health and kills, which need to be replicated and consistent throughout every player.
TO Replicate (Player Stats)
In order to replicate player stats for each player in the game, a maximum of eight, these stat variables were stored in the PlayerState. Using the Blueprints built in AGameState::GetPlayerArray function I was able to retrieve all active players PlayerStates to extract the necessary statistics. Some of these statistics include the player’s health, kills, deaths, and anything that might be used for a leaderboard or stats page.
Utilizing the standard implementation, these variables replicate across all clients of the host server, but not the server themselves, which is also a player in EOS. To ensure that all statistics were interacting and replicating correctly, I utilized the “Reliable” Server RPC call to set the variables. This allows all player stat variables to be independent for each player while still being extracted from each individually.
Not to Replicate (Player Outlines)
The other end of player replication is knowing when NOT to replicate something. For Gator Hucker this was the player/team outlines and player names and healthbars. Much like other modern team-based games, you are always on Blue team and the enemy is always on the Orange team. This is achieved specifically by having each player see the player outlines/healthbars according to your assigned team. Upon joining the lobby, you are assigned your player team A or B, then according to the assigned tag everyone that matches your team turns blue, and everyone else turns orange.


For Gator Hucker, knowing how and when to properly replicate across the players, especially with EOS, has been instrumental for a cohesive gameplay experience.

Comments