An unwilling participant – Ball AI
In Bugby, the ball is a pill bug. This bug is not a fan of being thrown around by a bunch of goblins playing a game. As such , when there are no goblins around, the ball will uncurl into a bug that will run from the player. This mechanic adds more interaction with the environment and creates a more dynamic game. When no one is around the ball just randomly moves around. As a player approaches, the bug will see the player. It will run away as it is crawling it will curl up into a ball again because it becomes scared. See the images below for this process.
The main question we had to ask ourselves when making the AI was “How do we account for multiple players chasing the ball?” The solution we came up with is that the ball runs away from the closest player. See the image below. This is both simple to implement and makes sense because the ball is a bug so it’s not the smartest creature. We also considered having the ball run toward the losing team, which is a nice idea, but we felt it decreased the skill ceiling artificially and it was non-diegetic.
The main issue that comes up with this is what happens when the ball approaches the edge of the map. The ball could curl up, but again this is not a diegetic solution. So instead of doing that, we use the same system that detects the players, and we created invisible (to the player) actors that the ball would see and run away from so it would not run off the map.
The ball scurrying about the arena gives our game a sense of place by creating scale (along with the boot and tree in the background). This also makes the game feel more dynamic and interesting by adding more mental load. In the end, I believe our team came up with a good solution that is both diegetic and adds a lot of variety to our game.