The Baldur's Brawl prototype aimed to recreate the feel of Baldur’s Gate 3’s turn‑based combat system. The project had a shorter timeframe as it was submitted as an assignment for a course at the University of Skövde.
Team: 1
Duration: 3 weeks
Engine: Unity
Keywords: Unity, C#, Unity Navmesh, Dynamic obstacle detection, GOAP
Built upon Unity Navmesh to implement detection of dynamic obstacles for both player and NPCs' path planning.
Created seemingly smart NPCs using GOAP (Goal Oriented Action Planning). The NPCs evaluated the likeliness and amount of damage of a successful attack against the risked damage to themselves executing it.
Developed chance based combat, where each action was based on "the roll of the die". The likeliness of success was displayed to the player. Depending on a character's stats different actions had different difficulty. This also determined their turn order in combat.
Implemented NPC alliances, which determined who they were to side with in battle.
Added a determination-score for each NPC-group to finish the battle. This meant that some groups would surrender after one casualty while others never gave up.
The main challenge during the project was the addition of the dynamic obstacle detection to Unity Navmesh's path planning, since the Navmesh logic is to a large degree incapsulated. This meant that I, based on the available documentation, had to create a work-around which allowed the NPCs to detect the other Navmesh agents crossing their path.
The path is visualised through lines, with red detailing distance that can't be reached. If a character can't attack at their current distance from an enemy, and has enough movement to be in range, they move to a point where they can attack.
The NPCs navigate to and attack their enemies.