Quickie: Anatomy of a Hole

Quickie: Anatomy of a Hole

Hello folks!

I’ve finished the work I wanted done for this week. In fact, I’ll be releasing the new demo in a couple of minutes!

Now, the goal of this post is to show you how to play your awesomely create hole.

For that, I created this demo hole: Double Trouble

Here’s an overview of what the hole looks like:

double_trouble

The two little bodies of water in the middle add to the difficulty. The sand trap surrounding it is more for psychological terror, as they’re actually quite flat. Opposite of the fairway, which is angled all over the place, specially aimed to make you fall on the water. So to start off the drive, I aimed my shot in this direction:

stroke_one

My intention was to bypass the slope with speed and make it safely to the end of the fairway. But it actually happened much better! The ball bounced majestically off of the fairway, and ended up really near the green, albeit in a bunker:

stroke_two

From there, though, it was a short chip in to get on the green and be on a good position. This course was a par 4. This shot would put me at 2 strokes, with a potentially straightforward putt to help me to an Birdie. Which is what I did, since my chip in landed around here:

stroke_three

Extremely close. Like, way too close. The kind of close shot I’ve missed before because I forgot to account for slopes and stuff! This time around, I sank it like a champ!

All of this was thanks to a very lucky drive! I was not expecting it to bounce the way it did, but I was very pleased for it!

Well that’s that! Stay tuned for the new demo for Boss Golf!

Quickie: Quality of Life Improvement

Quickie: Quality of Life Improvement

Heyo folks!

Today I spent some time ironing out a bug with the collision detection, where depending on the speed of the ball it would simply go through the terrain.

That looks fixed enough! Of course, should it happen to you after this weekend’s demo, please let me know!

Still smoothing out the new physics set up. And learning how to play my own game! Turns out sometimes you really don’t want to go full force, as seen below:

Failed_Shot

Or even medium force:

failed_shot_2

Finally, was able to do it!

quality2

Next, I wanna add some trail particles for when the ball is moving on terrain, so that you can more accurately detect the path the ball took. Plus some particle effects to make things look a tad more polished!

That’s all for today’s quickie, folks!

Dev Update #26: Clubs, Clubs, Clubs!

Dev Update #26: Clubs, Clubs, Clubs!

Hello folks!

I have finished prototyping the shooting mechanism, complete with shot visualization and all kinds of different clubs you can use, from your trusty driver all the way to a lob wedge!

The shooting is being done using Unity’s physics system. It also takes the real loft values of each club and takes them into account when calculation the maximum shot distance (or expected) and the potential trajectory of the ball. You can see the differences below!

First off, a shot with a 2 Iron:

2iron

You can clearly see how low this shot is, and it allows you to drive the ball quite a distance down the fairway.

Next is a 9 iron:

9iron

This club will drive your ball further in the air, which will lead to reduced distances but the bounce can surely help you hit your spot more accurately. Next is the lob wedge:

lobWedge

This club goes really high up in the air, useful for traversing certain obstacles or getting that much needed lob. Accordingly, it is only able to send the ball down a very short distance.

So there you have it! On track for tomorrow’s demo featuring the shooting in your holes. The physics are still a bit wonky and the ball tends to roll much more than I’d like. But hey, it’s working!

Stay tuned for more!

Dev Update #14: Money, Money, Money

Dev Update #14: Money, Money, Money

Heyo folks!

Thanks to those of you who tested the terrain demo and gave us your feedback! It was very useful!

Some takeaways:

-The function of the flatten tool isn’t well communicated. It is currently flattening the tile by the vertex closest to the pointer. Need to think of a way to communicate it better.

-Bigger brushes for decorations, so that you can place trees in a bigger area. This is on the list for tomorrow.

-Ability to paint terrain/decorations so that you can just drag and move the mouse around covering an area. This is something I’m still considering, as I’m expecting the gameplay to change once I make tiles cost money.

Which is what I just did. Today’s update is focused on the All Ighty Ollar. I mean, the almighty dollar! From now on, the tiles will cost a specific amount of money (whose value will change a lot as the game gets further in development), making you consider more the kind of course you wanna build. No way to get the money back yet, as that will require actual little golfers paying to play your course! But that will come next month.

I also added a simple bulldozer tool, which basically reverts the tile back to grass, removing any decorations it may have had. Also works with holes.

Only decoration and tiles cost money; removing tiles and moving the terrain doesn’t cost anything.

Here’s a sample course I made:

expensive_hole

As you can see up there, I ended up with $4,200 remaining after plotting that hole. Since I started at $21,000, this particular hole cost a whooping $16,900! Is that a lot? I don’t know! Price balancing will feature more on the demos from now on, and I’m happy to receive your feedback!

Thanks for reading!

Quirk #3: Shorter, but is it?!

Quirk #3: Shorter, but is it?!

Hello folks!

In the process of today’s update, I came upon an interesting quirk when using grids.

I have finished implementing the hole creation in the new terrain, works like a treat. Now I’m in the process of processing the tiles in between the hole and the tee, so it can make calculations regarding base shot, par, actually distance etc.

Using A* to find the shortest path between the hole and the tee, leads to some interesting visuals:

astarlol

Above, the path traced by A* is marked with black spheres. The drawn red line shows the actual shortest path (a straight line) between the two points. When in a grid, the path marked by A* does signify the shortest path between two certain points in the grid. It can be set to ignore diagonal traversals, or to allow them (as is the case of Boss Golf).

Visually, though, it looks so quirky. To us, it’s clear to see that the shortest path is the line between the start and the finish. To the game, though, the shortest path ends up creating these doglegs all over the course.

That’s all! Almost done with the processing of the base shot, coupled with a lot of refactoring and reinforcement. Once it’s done, it’s demo time!

Stay tuned!

Dev Update #11: Procedural Tree Placement!

Dev Update #11: Procedural Tree Placement!

Hello folks!

Today’s update is an awesome one.

If you’ve been following us so far, you’ve noticed that all our tree placement looks rather… Mechanical. One tree per tile. That’s just not how nature intended. We should do something about it.

And we did. Look at this barren course:

courseBarren

It needs trees.

So we give it trees:

courseBetter

Wow look at that! Beautiful procedurally placed trees, make the course look much prettier and breaks the monotony of single placed trees! Hurray!

But how?

Well with the new system! It will attempt to add a tree to a desired tile. If there’s already a tree, it simply adds to it, and jumbles up their positioning. A maximum of 4 trees can be added to any tile. Here’s the feature in action:

treeMaker

As a bonus, if you’ve reached the limit of 4 trees, and you try to place another one, it will simply randomize the positioning of the trees. This way you can keep playing around with the tile until the RNG gods smile upon you!

Next is ensuring the trees stay in location when you modify the terrain!

Til next time!

Dev Update #10: Base Shot Generation is Ok!

Dev Update #10: Base Shot Generation is Ok!

Heyo folks!

Finally fixed the base shot generation. Since it’s simply a guideline, it doesn’t really care about the sloping of the course: all it cares about is that there’s no direct obstacle in front of the shot! Technically, this is already an upgrade if compared to SimGolf since in SimGolf there were many instances where it would attempt to mark the course by going through trees or rocks!

Below you can see the course path being automatically edited to account for removal of valid tiles:

baseShot

That pretty much covers the basic shot generation. Great success!

I’ve already implemented utility functions for calculating the usefulness of aiming at a certain tile. With this update to the basic shot generation, I can move forward on finalizing the spawning of certain objects when painting the terrain (ie: trees) and create a basic demo for testing the terrain building. If you’re interested in trying it out, give me a shout!

Stay tuned for the next update!