top of page

Production Time: 6 weeks

Project Year: 2020

Software: Unity

Role: Scripter, Game Designer, and Project Manager

Team: 2 Designers, 1 Artist

Heart of Gold is a top down shooter about survival and evening the odds. The rich just get poorer, and the poor get richer. Navigate from the woods gathering gold and use your world-famous archery skills to combat the king’s guards.

 

This was a project for a prototyping class where we were given a total 6 weeks to prototype an idea in small groups. I designed and scripted the AI and a custom 2D pathfinding system and was the project manager for the group following a waterfall style methodology using Asana.

Heart of Gold thumbnail.gif

Playable at NewGrounds

Work: Video Player

AI Patrolling

AI Detects Player

A* Pathfinding Visualization

To develop the AI and pathfinding system, I divided my time into three chunks: barebones, implementation, and polish. I spent 1 week, 3 weeks, and 2 weeks respectively on each.

For barebones my primary focus was to create a very basic AI, using no pathfinding or sophisticated behavior. This allowed my team members to more clearly get a feel for the gameplay and give me feedback and ideas on desired AI behaviors. 

During implementation I first focused on the two fundamentals of the AI system, pathfinding and AI "senses".  The senses consisted of two editable colliders, making them easily adjustable in prefabs to fit different enemies. Sight is used to trigger aggressive behavior, and presence acts as the outer limit of where the AI still records the players position. If the AI reaches the players last known position, and does not see them, the AI returns to its default behavior. 

 

The pathfinding is implemented as a basic A* algorithm on a 2D data grid (no game objects) with simple threading for optimization. It has adjustable resolution, size and automatically detects obstacles based on the layer of an object within a square.

 

Any given unit only recalculates a path whenever they are very close to their target, or whenever the player has moved a set distance from its last known position, and the AI is still in tracking mode. This on-demand method reduces costly pathfinding calls to only when necessary. 

 

Finally in the polish phase, all I focused on was bug fixing and adjusting values in the editor to create the most responsive and satisfying AI possible.

 

AI "senses"

heart of gold ai senses.png
bottom of page