Tackling Replication and Ownership Issues in Real Rumble's Architect of Caelum

 

Tackling Replication and Ownership Issues in Real Rumble's Architect of Caelum


Author: Miguel Martinez Olivares

Posted on: 09/29/2023

Part 1: The Problem

During this hectic week, our team faced a unique challenge as we approached graduation. With half of the team having graduated today, several code inconsistencies had been introduced inadvertently by a team member. One prominent issue we stumbled upon was related to the replication and ownership mechanics of buildings and units in our 1 vs 1 RTS game, Real Rumble. Additionally, there was an unfinished task regarding the "Architect of Caelum," the player-controllable unit used for construction in the game. Specifically, we had issues with an erroneous respawn screen appearing for the wrong player. These problems not only had the potential to cause significant gameplay disruption but also posed challenges for end-users, affecting their in-game experience and causing confusion.



Part 2: Problem Solution

Upon deep investigation, I found that the issues stemmed from a lack of proper replication policies and ownership assignments. To address this, I modified the code to enforce strict replication rules and ownership verifications. For example, I used Unreal Engine 5's built-in replication functionalities to ensure that each building and unit is replicated only to its owning client. This was especially pertinent for actions like constructing barracks and sending out units.

For the "Architect of Caelum," I implemented a dedicated respawn screen. The respawn screen was designed to only appear for the owning player by leveraging Unreal's network ownership mechanisms. This meant ensuring that the respawn widget would only be triggered client-side for the actual owner of the Architect of Caelum unit.

These fixes not only streamlined the codebase but have also substantially improved the end-user experience. Players can now focus on their strategy and game mechanics without getting bogged down by technical glitches, thereby preserving the competitive integrity of Real Rumble.

Overall, the challenges were tough but educational, giving me invaluable experience in solving real-world problems in game development, particularly in multiplayer environments. With these fixes, Real Rumble is one step closer to providing a seamless and enjoyable user experience.


Below some pictures of some Blueprint diagrams of how replication in UE5 can be handled



Comments

Popular Posts