Dev Update #2: Refreshing the Base shot

Dev Update #2: Refreshing the Base shot

Hello folks!

Tonight I’ve finished the first pass at implementing the function to refresh the base shot, for use when you are landscaping your beautiful course. Right now it needs to be triggered manually via a button, but once I refine it a bit it will happen automatically if you place a tile in the “path” of the course. Time for pictures!

Here we have a first pass at refreshing the base shot of the course. The origin point of the red/blue/yellow lines are the end/begin point of every stroke. These lines are the directions we cast a ray when trying to find eligible tiles for the shot. It looks only for green/hole/fairway tiles at the moment, as that’s where the player would be regularly aiming for:


With 441m for a Par 5, this is slightly on the shorter end, so it could theoretically land on the green with 3 shots without a terrible amount of effort.

Next I tweaked the fairway a bit, and refreshed the course again:


The slight change in layout produced a slightly larger course in the same area, rising up to 450m. But this shows one limitation of the current system: If the angle of the yellow/red lines was smaller, we would have been able to hit the green in our third shot, instead of necessitating a fourth shot to be in a better range. Or even, upon finding the hole, exploring the nearby tiles to find the extent of the green, so that we could have a better decision. Maybe I could reduce the angle of the check/tweak number of rays based on distance to the hole. So further away strokes can explore the area better for possibilities, while nearby strokes need to be more specific towards the hole. Or even simply adding the neighbours of the tiles to the list would suffice. I’ll test this tomorrow!

Still, I didn’t really want the course to fall down that side, so I changed it once again:


This produced an even shorter course (potentially), much more straightforward, and easier. A very short Par 5, barely a Par 5 even. Extremely easy, but I like it, as it provides some good base to increase difficulty, specially on the first stroke. It barely lands on the fairway, so less confident golfers might instead burn a stroke on getting to the earlier fairway patch first, to get into a better position. And I could add a bunker at the entrance, like below:


Now this would really discourage less confident golfers, as the position of the bunkers ups the stake in case of a mistake, and would reward confident golfers who were able to land the shot, making them feel great and more willing to pay the price of membership. Capitalism, yo!

That’s it for today! Tomorrow I’ll automate the base shot generation process, to reduce clicking amount, and improve the function further so that it can make better decisions when mapping out the course. Afterwards, I’ll make it detect if there’s hazards on the way, so as to avoid and look for a better alternative. Maybe ace golfers would try the hazard shortcut, but the base shot isn’t for them anyway!

Til next time!

Dev Update #1: Start State

Dev Update #1: Start State

So, to give you a basic rundown of where we are:

-The “resort” generation system works. It places the tiles on the grid according to rules, can also save/load to a text file for safekeeping.

-Just updated the base shot generation for the courses: You start making a course by placing the Tee tile, and then the Hole tile. The game will use a couple of algorithms to generate the basic shots necessary for finishing the course, taking into account the available tiles. This will work as the guideline for the hole, letting you know the par, the distance. Golfers will be able to take their own decisions.

-Currently, you can play around with landscaping and creating golf course. Just switched to a new system using separate objects for each stroke on a course, for future-proofing. Works fine for now, needs tweaks.

-Finished updating to DoozyUI; It really removes a lot of the boring work of creating UI, very good stuff.

This is what the prototype currently looks like:


On the image we can see a basic Par 4 hole. Currently the base shot generator isn’t caring about trees or other obstacles. Changing that just after this post. I am using a simple A* algorithm to find candidate tiles for the strokes, works like a charm and very fast.

That’s all for now!