Alpha 0.42!

Alpha 0.42!

Hello folks!

Thanks to some very quick feedback, I’ve done some fixes to alpha 0.4, bringing it to 0.42!

Here’s what’s changed:

  • Added a hashing effect to the planning tiles so you can better distinguish between them
  • Increased movement speed for AI characters
  • Reduced time for placing tiles/decoration
  • Balanced the scale randomizer of the decoration tiles
  • Improved the presentation of text in the UI, much more legible now!
  • Fixed issue with the ball being always visible even behind objects and stuff
  • Fixed not being able to place decoration pieces on planning tiles
  • Made some menus close when opening other menus, to reduce clutter on the screen

So quite a nifty list!

Still, there’s some issues with the AI simply stopping the play of golf. It could be that they accidentally fell through somewhere. In that case, simply restart the game and it should fix it. Since it’s a more difficult issue, I’ll need to take a closer look at how to work around it.

That’s all for now, folks!


Quirk #1: Greed isn’t good

Quirk #1: Greed isn’t good

Inaugurating the Quirk category, is an interesting problem that appeared when trying to program the base shot function to avoid tiles where the next stroke would be blocked.

As it is now, the algorithm can be considered greedy; that is, it tends to find the local maximum instead of the global maximum. What does that mean?

The function to find the next best stroke focuses on mainly one factor: Distance covered by the stroke. So the function will always try to travel as far as possible with each stroke in order to minimize the Par score. However, in taking obstacles into account, sometimes the stroke with the furthest reach is not the best stroke! As we can see below:


There’s at least two or three tiles before the chosen one that could be used for a perfectly fine stroke, which would eliminate the danger of hitting either of the two trees in the middle. But since the algorithm is currently greedy, it’ll maximize locally, completely ignoring the global maximum. If we tweak the course further, like below, we can safely get rid of this issue:

But this is not good. Users would look at the course and go “What! There’s a perfectly fine play to be done over there! Dumb game!”. And we can’t have that!

So it’s time to smooth out the stroke calculation to look into the future for at least one or two moves, so that it can more accurately get rid of local maximums, and aim for the global.