From: Zachary Vance Date: Sun, 23 Nov 2025 17:54:07 +0000 (-0500) Subject: mini golf X-Git-Url: https://git.za3k.com/?a=commitdiff_plain;h=6cdca865ecf660654762bebcf60ba21327d53e14;p=blog.git mini golf --- diff --git a/images/golf-screensaver.png b/images/golf-screensaver.png new file mode 100644 index 0000000..a4ac3b4 Binary files /dev/null and b/images/golf-screensaver.png differ diff --git a/images/golf.png b/images/golf.png new file mode 100644 index 0000000..9a2f145 Binary files /dev/null and b/images/golf.png differ diff --git a/posts/hack2025-22-golf.md b/posts/hack2025-22-golf.md new file mode 100644 index 0000000..2b75981 --- /dev/null +++ b/posts/hack2025-22-golf.md @@ -0,0 +1,26 @@ +--- +author: admin +categories: +- Non-Technical +date: 2025-11-22 +tags: +- hack-a-day +- videogame +- game +slug: hack-a-golf +title: "Hack-a-Day, Day 22: Hack-a-Golf" +--- + +[Hack-a-Day](https://za3k.com/hackaday) is my self-imposed challenge to do one project a day, for all of November. + +[![caption: computer mini-golf)](golf.png)](https://za3k.github.io/hack-a-golf/) + +Today's project was mini-golf. I've seen these online, and I thought it was an easy problem (I was mostly right). + +It turns out finding the intersection of two lines is really hard, though! It kind of seems easy mathematically, but in practice it's really fiddly with a lot of edge cases. Reflecting is also harder to figure out on a computer than by hand. + +My little demo only has one level, but the hard part was the engine -- adding 8 more holes would be pretty easy, I think. There's no hilly slopes or other special features in this verion. + +I stayed up too late finishing this one, heh. You can play [online here](https://za3k.github.io/hack-a-golf/) or view the source code [on github](https://github.com/za3k/hack-a-golf). + +[![caption: the path of a ball without friction)](golf-screensaver.png)](https://za3k.github.io/hack-a-golf/index.html?screensaver)