New Home Page!

New Home Page!

Hello folks!

I’m pleased to announce the release of our new home page: Boss Golf

This page will now strictly become the development blog for the game. Our home page will now contain more information regarding release dates, testing, rewards etc.

In anticipation for the release of the AI demo, I’ve also decided to improve the pipeline for testing the game. Moving to a closed alpha system so that I can keep better track of how things are, and get better feedback from the fans.

If you are interested in alpha testing Boss Golf, please check out the information on our closed alpha page!

That’s all for today, folks!

Interface Update for Terrain Demo

Interface Update for Terrain Demo

Hello folks!

So I’ve figured out how to improve the interface for the new terrain controllers for Boss Golf, and I added a button to display a grid overlay on top of the terrain, so that you can better gauge how it all looks!

Mainly, the painting tool now has an overlay on the terrain letting you know the area that will be affected. You can see it in action in the gifs below:




And the new grid overlay, which makes understanding the terrain slopes even easier:


That’s it for today’s mini-update! There’s a holiday coming up this week, which I plan to take advantage of to further the development of the AI in the game. Still hopeful to have little AI golfers walking around the course and playing a nice game of golf!

Oh yeah, and as always, you can find the updated demo Here!


Terrain Demo is Online!

Terrain Demo is Online!

Hello folks!

I’ve just about finished connecting the new terrain system with the UI. There are some nags here and there, as is expected, and the interface for the vertex editing doesn’t work perfectly, but it’s all operational.

For this demo, however, I’ve removed the golf playing feature as it is due for a revamp in order to accommodate the AI system. As a result of that, I’ve also left the previous demo online in case you wanna try that part of Boss Golf.

And you’ll find that your play area has been largely expanded from before. And you’ll notice you won’t be able to build everywhere: that’s part of the course being only allowed certain parcels of land when you start out, with more being unlocked as you buy them and whatnot. The new chunking system will allow for that to be done pretty straightforwardly.

Without further ado, you can download the latest version HERE!

And here’s some things I cooked up with it:




That’s it for today, folks!

Will continue working smoothing out the implementation (and damning Unity for not supporting gizmos in runtime! (probably with good reason)), tweaking the shooting mechanism, and getting the AI in there!


Terrain Tools Update!

Terrain Tools Update!

Hello folks!

I’ve finished coding the improved terrain system and the actions. Now all that’s left is connecting it to the UI!

But first, I’ll give you a preview of what’s coming. First, you have the good old drag to place the decoration:


Select the tree type, drag the tiles and the trees will be placed. Each tile can support up to 4 decoration pieces. Adding anything after that will result in the decorations simply being shuffled around.

If you want to fix it up, I’ve added a trimming tool that currently removes the last placed decoration object from the tile:


Later, I’ll make it so it actually aims at the decoration object you’re aiming at and removes that.

Then, for elevating the terrain, I’ve reworked the previous options to use the vertex directly. For altering the elevation directly, you can either click and drag (for fine-tuning), or simply click and hold (for painting). For each of them, you can choose between 1 vertexes, 4 vertexes (a tile), or 16 vertexes (the tile and the neighbours) as below:




And for painting:




And finally flattening:


As you may have noticed, the decorations nicely go up and down as the elevation is changed. This is part of the update to the decoration system, which makes it work much better than before.

So that’s what I’ve been working on this week! I’ll finish hooking it all up to the UI tomorrow, and perhaps release an updated version of the demo so you can try it out. And then go back to the AI implementation!

(Ah! Forgot to add: I’ll be turning off the water tile for now as it’ll need a deeper reworking. I’ll just replace it with a regular blue tile so that you can still plan on how the water would feel.)

Miles and Miles and Miles

Miles and Miles and Miles

Hello folks!

Quick update on the implementation of the new terrain for Boss Golf!

Look at this:


That, my friends, is a massive terrain composed of a 20×20 grid of chunks, each chunk containing 16×16 tiles. That’s roughly 102400 tiles. All much more easily manageable, and with better performance than before. Now I can actually make the terrain surrounding the golf courses so that you no longer can peek at the end of the world!

As explained before, this new system relies more on preprocessing the grid data, so that alterations to vertices and UVs are much more quickly resolved than before. No more loops inside loops inside loops!

Just finished implementing the UV mapping to it, as well as the mapping of surrounding tiles and vertices. No seams when you move vertices between chunks. Already have some plans for new terrain tools too, to give you more possibilities when editing your golf resort course!

Next up is connecting it to the existing controls, and changing how the decoration system works so that placement is handled better and performance is improved.

Stay tuned!

Golfer AI Sketching: Memory

Golfer AI Sketching: Memory

Hello folks!

As promised, today I’m going to talk about the Memory component of our AI golfers!

So far, we’ve taken a look at how the behavior is controlled via State Machines; we’ve looked at how we’ll use Utility to choose the best course of action; and we’ve also taken a look at how the AI will execute Actions through a system of intentions.

But we want our AI to be smart; this means that we want the AI to be able to learn from its past mistakes in order to improve its score and rating. And we do that through memory!

Memory will be separated by holes. The AI will record the intention of the shots it took, the location of each shot, rate the outcome, and the overall performance for any given hole. Next time the AI plays the same hole, it will generate the actions as usual, but it will also compare with the previous taken in similar circumstances, and compare the utility value of that action against the outcome, and weigh it against current circumstances.

A simple example to illustrate the system is driving off the hole below:


In the image above, we have three shooting options that the AI came up with.

  • The top orange option is the shot that the AI took the last time it went around the course
  • The bottom orange option is the shot that the AI calculated as the best for this time around
  • The purple shot is what actually happened

So in the situation above, we have an AI that remembered that the last time around this hole, it took an awesome shot through the left side of the fairway, stopping quite near the edge of the water but within awesome range of the green.

For the other options that the AI came up with, among them the bottom orange one, through the right side of the fairway, was the one that the AI felt most promising at this time.

The outcome of the left-side action was stronger than the predicted outcome for the right-side action. The AI evaluates this. It looks into its memory for the previous outcome, and compares with what it expects of the other outcomes. In this case, it is pretty clear that it is the superior action.

But, alas, just like us humans, the AI will also remember the past in a different light.

The last time it played that particular hole, it had a super drive right of the tee, exceeding its expectations and being regarded as a “star memory”, meaning it values it far higher than what it should. So memories aren’t just a 1 to 1 remembrance of the past: they also have their fair share of rose-tinted glasses. If an AI does better than it expects on a shot, its memory will also be colored by that event. Granted, this will depend on mental attributes for the AI, but it will be a likely occurrence.

And more than that, the accuracy of the memory also decays with time. Since the last time the AI played this hole was months before the current moment, the outcome will be slightly mistaken, as will the parameters the AI used to take the shot. In this case for this particular AI character, he will overestimate his strength,  he will mistaken his position, and he will end up landing the ball square on the bunker trap. This will now take the place as his most recent memory of the driving stroke of this hole. He won’t immediately forget his previous memory; it’ll just have a weaker connection since the next attempt at that resulted in catastrophe.

Next time he plays around, he’ll likely try something new, or he’ll try the previous previous memory (IE: the top orange stroke) but will be more careful this time around.

The memory system will also work to help with the knowledge representation of the hole. The AI will remember each hole in a tile/type/landscape system, so that it can always compare the hole to the memory it has of the hole. So if the hole has changed, either through your own landscaping efforts or otherwise, the AI will know, will disregard the memories of past strokes a bit more, and will focus on trying something new.

This should end with an AI that is always trying to familiarize itself with your course, and has past performance to base future performances off of. It’ll also help in making the AI decide its feelings towards a particular hole (phrasing!), so that it can react to the changes you make to your course.

So I hope you enjoyed this overview! It’s very high level, but it should give you some clarity as to how the AI will work. Now we have the 4 main systems sketched out, I can continue implementing them. Will be done with the new terrain this weekend, then I can focus on finishing the first pass of the AI. For this month, the goal is to have AI golfers playing with your holes (phrasing!) so that I can test out some basics of the systems.

That’s all for now, folks! Stay tuned for more!

Terrain Sculpting

Terrain Sculpting

Hello folks!

As I’ve said previously, while coming up with the concept and the systems for AI, I’ve also decided to rework a bit of the terrain features in order to make it smarter and improve performance.

So I’m almost done plugging in the new terrain system into the game. This time around, I went a bit smarter with my separation of concerns. The current system in the game features a breakdown of the mesh into tiles, quads, triangles, vertices, all controlled by a single TerrainController script which manages the actions on each tile.

It works ok, but it’s a bit overcomplicated in certain areas, and too simple in others. The point that really sticks out is when it has to update the mesh after any alteration is done to it.

Basically, it is currently rebuilding the vertice/triangle/UV list every time you do an alteration. This isn’t ideal, as it contains loops inside loops querying data that hasn’t been changed to find the ones that have been. Plus the current system is also less conducive to having multiple chunks and altering between them. It would be fine if we just stuck to one chunk and made it massive, but that’s not ideal specially if we want really massive levels and easier to manage data.

So, enter the new system! This time around, I have a SmartMesh class who holds the reference to the Mesh component itself, as well as a TerrainChunk component that holds it all together, managed by a TerrainBase class that can decide how many chunks will be spawned and the dimensions for each chunk. Reworking the input management as well means cleaner code and easier to expand. Most important is that all vertex data is held by TerrainVertice objects, which can be directly accessed either y the TerrainChunk or the SmartMesh. The SmartMesh also generates a mesh on startup of the position/index of each TerrainVertice. So what dos this mean?

It means that when a TerrainVertice is changed, it changes its position, and it tells the SmartMesh which index of the vertex list needs to be updated. This is done, and the new vertex list is assigned to the Mesh component. Hey presto; no more nasty loops within loops within loops!

Similar concept will be applied to UV and other aspects of the terrain. So the end result is a cleaner system that’s more manageable. I’ve also picked up more knowledge as I’ve progressed with development, and it has been ideal to implement it now.

Oh, and you’ll also be able to “sculpt” the terrain better, and I’m also reworking the height limitations of the course so you can have nicer features. Check out the simple demo below:


You’ll be able to “paint” the heights with the new tool. (Also keeping the old options too for those who prefer them). And since the vertices are easier to manage, I’m also updating the height limitations to give you more freedom to build taller things, and smoothing out the process: if you move a vertice too far above a threshold, the neighbouring vertices will also move up, creating a more organic flow.

I should be done with this work by the weekend. At the same time, I’m also implementing the AI system, so stay tuned for that too!

Tomorrow I’ll make a post about the memory system!

Have a nice day, folks!