Mini Golf

158,635
0
Published 2022-08-06
24 levels of mini golf!
Your goal is to get the ball into the hole in as few strokes as possible.
To hit the ball, click and drag. An arrow will show the direction the ball will go when you release the click.

Extra notes:
- The ball will not go into the hole if it is too fast. It can also curve around the hole if not going directly in.
- If your ball goes into water, it will be placed at the edge before it fell in.
- You can save/load your game by clicking the buttons in the level select screen. Store your saves here! https://scratch.mit.edu/discuss/topic/622893/

This game is touch-screen / mobile friendly. No keyboard required. Though if you have a keyboard, you can press R to reset and H to return to the level select screen (H for "home").

Cloud variables are used to create the histograms for each level showing how many strokes people take. Now you get to see how you rank!

Pen font by @-Rex-

Graphics by me! (@awesome-llama) I used Blender's geometry nodes to generate levels from lines.

Sound effects / music (CC-BY unless otherwise noted):
migfus20 https://opengameart.org/content/under-the-rain-lofi
snokums https://opengameart.org/content/sweet-dreams
omfgdude (CC0) https://opengameart.org/content/chill-lofi-inspired
Alex Smith (not CC-BY) - https://pixelsphere.org/
UI sounds by nezuai https://freesound.org/people/nezuai/
Golf hits by zolopher https://freesound.org/people/zolopher/
Golf swing by bmcken https://freesound.org/s/118185/
Splash by InspectorJ https://freesound.org/s/416710/
Splash by tim.kahn https://freesound.org/s/628481/
Splash by tran5ient https://freesound.org/s/190085/
GUI beeps by jobro https://freesound.org/s/33775/

Additional information:
This game is entirely deterministic. The same hits can be replayed exactly the same across all computers. The game is linked to framerate but the physics frames always have the same steps. On slower computers, the game will run slower as fewer physics steps are taken. This allows me to take replays of levels. The replay just has to store which frame the ball was hit and what its starting velocity is. The game will calculate everything afterwards. It's a good way to ensure no cheating has occurred.

I have a template project available here: https://scratch.mit.edu/projects/749493736/
It is the same underlying structure used in this game. I highly recommend checking it out as the techniques used work well (with some concepts, e.g. a main loop, being important in things outside of Scratch, too).