Addressing AI Controller and Replication Issues with Dwarven Units

 Title: "Addressing AI Controller and Replication Issues with Dwarven Units" Author: Miguel Martinez Olivares Date: 06/15/2023

The Problem During this week of development, I encountered a problem related to our game's AI controller for the Dwarven units. When the Dwarves were spawned through the barracks, their AI controller could not initiate movement. This issue was crucial because it hindered the gameplay experience for players controlling the Dwarven units. Additionally, there was an inconsistency in the movement of the Dwarves between the host and the client, where the client would see two Dwarves instead of one, with one Dwarf remaining stationary.



Problem Solution To solve the problem, I implemented a solution that involved modifying the Dwarves' movement component and introducing replication to the Spawn Dwarf event.

Firstly, I made the Dwarves' Movement Component auto-possess the unit once it was spawned and dragged from blueprints. This ensured the AI controller was correctly assigned to the spawned Dwarf, enabling movement.

However, a new issue arose where the movement of the Dwarves was not replicated correctly for player 2. This resulted in the client seeing two Dwarves, with one Dwarf moving correctly and the other remaining stationary. To address this, I added replication to the Spawn Dwarf event. By replicating the necessary information, such as the Dwarf's location and movement, to all relevant clients, we were able to synchronize the direction of the Dwarves and ensure a consistent gameplay experience for all players.

Implementing these changes improved the overall functionality of the Dwarven units and resolved the AI controller and replication issues. Testers noticed a significant improvement in the gameplay, with the Dwarves moving as expected and both host and client seeing a single Dwarf unit in action.

By promptly addressing these issues, we enhanced the gameplay experience for our players and ensured a smoother and more enjoyable gaming session with the Dwarven units in our game.

Comments

Popular Posts