Today’s update, is about AI gameplay!
After integrating the basic state machine for the AI, I’ve also added a function that allows it to take a very simple shot (basically, aim at the hole, hit as hard as it can inside the distance to hole) and, as a result, the AI in Boss Golf can now play golf!
For the test scene, I’ve built a course with 4 holes:
The holes are all connected by their tee at the center. Spaced them out this way to remove other potential interference. I also added two golfers: Liger Forest, and Ryu.
The holes now have an option to open or close them. Opening them tells the AI they can be used for play. The AI will then queue up for their turn at the hole, and play it when the player in front of them has finished. And it all works!
For debugging, you’ll see a yellow line which marks the path that the AI wants to take, and a purple line which marks the direction of the stroke.
Here you can see the Liger taking a basic strike:
And at another hole, Liger teeing off:
And here you can see both golfers playing on separate holes:
It’s in. Now there’s some work to be done on smoothing out movement and fixing some collision problems. But the basic skeleton of the system is there. Once I add saving/loading, I’ll update alpha to 0.3!