up4golf

A golf game about the ametuer experienc, written in zig

What is it?

A golf game that accurately represents golf with your friends, including scavenging for balls mid round, hitting into other fairways, avoiding the wrath of marshalls, golf pros, etc.

What’s in it for me?

I want to keep exploring zig programming and development tooling. I just built a DearImGUI approximation with raygui, I believe this would be a good project to dog food that.

I will probably need some method of making maps. I hope any new tools I build will be made that others can use them.

What’s first?

An entity system. I’ve already started on this using some forced OOP in zig. This blog post was cery helpful in explaining how to accomplish this.

With this, my first goal is to be able to move my player up to a ball entity and interact with it, i.e. hit it and make it go somewhere else.

Game Loop

  • Primary
    • Getting the ball into the cup
  • Secondary
    • Everything in between hitting balls
      • Finding your ball
      • Managing your group’s time
      • Not getting in trouble for breaking the rules when doing the first two
      • Managing your character’s golfing ability
        • Fatique, confidence, happiness, etc.
  • Tertiary
    • Leveling your character
    • Choosing who you golf with
    • Choosing advice to follow
    • Practicing

Mechanic Ideas

  • Advice as skills

    • I’ve gotten a lot of golf advice over the years. A lot of it has helped but as soon as a new advice comes along for your latest problem, you lose focus on everything else.
    • Example: You get advice to fix your hook on your drives which works until you start topping the ball and start focusing on that problem.
    • I think having advice you can recieve from other golfers in the game, whether its friends or random pairings could be fun.
    • Having to chose what advice to focus on for each round until it become an ingrained habit could be cool too.
    • Having to chose a lower likely hood of topping the ball versus shanking it depending on how much room you have to work with could be fun.
    • Driving range mini games could act as low pressure grinding to ingrain certain advice.
  • Golf ball management

    • I still show up for golf outing pretending that I have enough balls for my skill. Looking for my ball and finding others is where a lot of the action happens when I go our golfing.
    • As a mechanic, I imagine balancing time looking for balls, waiting for golfers in front of you to finish, without causing back ups and drawing attention from the marshalls.
    • Budgeting balls and money will be an essential part of the tertiary game loop.
  • Sneaking

    • I can’t help but picture a Metal Gear Solid V style sneaking and diving mechanic coupled with playing golf on a course at night or stealing from near by carts trying to avoid detection.
    • This is probably informed by playing a lot of MSGV lately.
    • This is very possibly a non-starter since this will be a top down 2D game but maybe a fog of war system like cs2d would make this work.

Update 3/3/2026

This complete fell on its face. Who would have though being a dad and having a dog that’s needier than a new born would prevent consistent work. Outside of “player can hit ball into hole”, there weren’t any game mechanics actually implemented.

I did learn a lot about OOP patterns in non-OOP languages. I have a working entity system based around it. I also had my first brush with C code in Zig. I pulled in tmx , a Tiled map parser written in C that I had used before.

When I decided to stop work on this, i.e. when I decided this was ALL I wanted to do and was no longer healthy, I was working on map generation. I think that could have been a fun problem. I was toying with the idea of wave function collapse, something I’ve always wanted to have my own implementation of. Maybe, a golf course generator based on that would have been too much to start with.

Maybe some day.