Going Clubbing!

Going Clubbing!

Hello folks!

For today’s update to¬†Boss Golf, I wanna talk about clubs!

So I’ve implemented a system that now makes use of proper golf clubs when playing the game. Until now, the AI had access to “infinite” clubs; it would decide how to shoot based on the maximum distance it could achieve, and how close it was to the hole. Based on this, and information regarding maximum/minimum angles/distances for each club type, a trajectory would be generated and that would be that.

This meant that even if the AI was in a bunker, it could still use an Iron to drive out of it in massive distances.

That’s not very likely in real life!

So I finally went ahead and implemented clubs. Now we have clubs divided into basic categories, representing the main club types (wood, iron, hybrid, putter, wedge), all further categorized into their respective numbers and/or types (1 Iron, 2 Wood, Sand Wedge etc).

Each club also has a difficulty rating (cause lord knows not even god himself can hit a 1 Iron!), which will be factored into the decision making process.

Further, each AI will have a limited number of clubs in their little AI golf bag. No more infinity clubs; they’ll have their 14 clubs and that’s that. Makers will be implemented later, giving slight deviation to angles and maximum ranges, adding even more variation to an AI’s arsenal (and other income avenues for your club with a pro shop!).

For now, these are being generated semi-randomly at the start of the game. Later on, when the AI generation becomes based on the database, these will be recorded and AI will routinely change their arsenal.

Now I’m onto implementing these new clubs into the shooting decision making. I’ve created a new “GolferBrain” class, which will be used by the AI to determine their “best” option for their current shot. Basically, it’ll generate a handful of potential shots, grade their likelihood of success, difficulty, payoff, and use the golfer’s confidence to decide on which one to take. And then shoot it! And hope for the best! And watch as their perfectly thought out strike lands in the bunker, or the fire hazard!

After this is implemented for the AI, I’ll roll it out to the Player as well. You’ll also start with a right now randomized bag of clubs, and later on you’ll be able to change your collection to better suit your playstyle.

That’s all for now folks! Stay tuned for more AI updates!