Sindicate

Role: Technical Team Lead / Programmer

Worked in a team of seven to create a co-op, two-player roguelite style game. My primary role was designing and implementing multiplayer functionality using Mirror to designate server and client machines, as well as connect and synchronize player actions and game updates. I also designed the enemy behaviors using state machines and implemented pathfinding using Unity's AI Navigation features.

Sample Work - Networked Enemy State Machine

The code included here is a partial fragment of the Agent class which represents any non-playable actor in our scene.

On the Unity side:

  • Agents are primarily used for creating enemies with various different behavior states organized using a state machine, and each type of Agent exists as a prefab to be spawned.

  • Each Agent has separate AgentState script components attached to the GameObject representing each of the states available, as shown here on the Grunt enemy.

The state transition process occurs in the following three steps:

  • When an agent observes a change that would require a state transition, the agent will request to change states on the server, calling ChangeState() with the type of the new state to switch to.

  • This will then send a Command Remote Procedure Call over to the server using ServerChangeState() with the index of the desired new state as found in the list that binds all the states to the Agent.

  • From here, the server will send out a Remote Procedure Call to all clients currently connected using ClientChangeState() with the state index, and the individual clients will locally update their states using the LocalChangeState() method with index, handling the activation of the new state and deactivation of the previous state.