/js13k-2020

JS13KGames entry for 2020

Primary LanguageJavaScriptMIT LicenseMIT

js13k-2020

JS13KGames entry for 2020, theme is "404 THEME (NOT) FOUND".

Coding Golf - Broken Links

Coding Golf - Broken Links

With planet Figadore ravaged by the Regolith virus, all sporting events have been cancelled. Determined to play a round of golf, Fred sneaks on to the "Coding Golf" island golfcourse where he works, to play a game.

Your mission is to help Fred get the lowest score possible on each hole so that he can win the "Broken Links" championship trophy.

Use the left/right cursor keys to rotate the direction the ball will be struck in, then select a golf club using the up/down arrows to adjust the range. Once you're happy, press SPACE/ENTER to start the swing meter. Then pressing SPACE/ENTER a second time will select a strike power (as a percentage), the meter will now move back towards 0. You then need to press SPACE/ENTER a final time as close to 0 as you can to prevent a hooked or sliced shot.

Alternatively you can use a mouse to play, use the scroll wheel will rotate the ball direction, then click for each step of the swing meter operation. You still need to use up/down cursors to change clubs.

A scoreboard is shown after each hole is completed. There are 18 holes in total. With added OS13k trophies.

Stuff I managed to add

Tools used

Stuff I'd have done with more time

  • Fix gamepad support
  • Play the course in 3D rather than top-down
  • Investigate using WebGL for rendering
  • Choose player avatar before starting

Attribution of assets and code tutorial

Using some assets from Kenney.nl "Minigolf Kit" (Creative Commons Zero, CC0 license).

Using "The Chrysanthemum" by Scott Joplin (in the public domain since it was published in 1904 - before 1924).

Using "Black & White Rag" by George Botsford (in the public domain since it was published in 1908 - before 1924).

Using code inspired by following a tutorial from @Javidx9.