With One-Hole Golf successfully released to the adoring masses, I set about working on my next game which would feature more holes, more features, and more polish.
I started very quickly, copying over most of the important bits from the original game but changing some of the layout and making the color scheme something a bit more pleasant.
Most importantly, I also added the first brand new feature: an arrow that would expand and contract along with a mouse/finger pull to show shot strength. I figured this out on my own which I’m quite pleased with, and also added a touch to cap it out at a certain length (and putting a cap on max shot strength) so that you couldn’t just absolutely demolish the ball. I remain very happy that I figured this one out relatively quickly.
But I ran into a funny issue that resurfaced from when I was creating that first hole: sometimes, the ball behaved in a way that it wasn’t supposed to.
I was stumped.
I tried searching the internet for it, and found a bit of information about how framerate can affect physics, but nothing led me to any valuable sources.
Unfortunately, after a week I had nothing going for me, so I had to do my best to figure things out on my own. And, well, the results were mixed.
After a few hours of tinkering, I found that I could tweak the Ball physics in a few ways:
- Decrease the density, friction, and angular dampening
- Increase elasticity
- Decrease impulse proportional to new density
What this accomplished was a snappier bounce off the putt, and fewer overall physics issues. I definitely didn’t entirely remove the problem, as it still happens at slight angles. But it’s a start.
I was really hoping I’d be able to end this blog post on a more positive note, that I had solved the problem. It feel a bit like two steps forward, one step back, but the rest of the project calls. So I’ll shelve this one for now and move on to fleshing out more of the game.