Golf Demo – Part One

  1. Golf Demo – Part One
  2. Golf Demo – Scoreboard
  3. Golf Demo – Colorful Names
  4. Golf Demo – Finale
  5. Project: Golf Demo

I’ve been busy as of late, if you go by the timing between blog posts it’s been nearly four months since I’ve posted. I’ll admit that College has kept me busy, perhaps too busy as I’ve been distracted from my programming and game passion projects. Additionally, my home has been going through renovations, and I’ve had to go through a hurricane which took out my power during the time I had finals in some of my classes. Needless to say I’ve been busy and tired. It’s also caused me to desire playing games just as much- which with the recent port of Persona 5 Royal being released on PC has been devouring my life. Alas this is a programming blog, and so programming I shall focus on.


My current demo stage

Some of the best games ever created are multiplayer exclusives.  League Of Legends, Dota 2, Fortnite, CS:GO, etc. all are some of the highest earning games of all time, with simply insane popularity.  Even non-exclusively multiplayer games such as GTA V (Now sold exclusively as just GTA Online), Halo, Call of Duty, etc. are similarly great and have a heavy focus on creating a high quality multiplayer experience and slowly have lessened the importance of the once proudly touted campaign experiences.  So it’s only natural for anyone interested in game development to be interested in creating a multiplayer experience.  And thus, I too was hooked into creating something of my own.

Why Golf?

As you may have noticed in my previous paragraph I never mentioned a single golf, or mini-golf game.  That’s because they’re simply not great examples of massively played games in recent history.  There are however successful mini-golf games out there, for example: Golf With Your Friends is an extremely successful example of a mini-golf game.  But that wasn’t the question, so here’s the answer: I chose it as a simple multiplayer game example.  In part because I enjoy Golf With Your Friends, and also in part because I thought building the core game mechanics would be easy.
That however is not to say that my greatest intention was to create a golf game. Instead I would use this golf game to get familiar with the new version of Unity’s networking libraries. Which then would lead me to be able to create bigger, better things. Hopefully this bigger, better thing will materialize in a blog post of it’s own, but for now I’ll just lay out the idea of it incase I forget about it and then one day uncover this in a tomb of data in my attic. In essence the idea of the game I actually wanted to make was to create a procedurally generated version of Phasmophobia– A ghost hunting simulator game. Basically the game has premade locations that you continuously play, they’re high quality and realistic looking. But I wanted to create a map generator that’d try to mimic the level of care and detail that was put into the design of the maps. This however is a project too grand to start as my first foray into a networking library so I decided a simpler game would be better to put on my portfolio (As I do have to get ready to get a job). I’d eventually like to say I’ll get to it but I never know. At the very least I think making a house generator would be a good project to display.

The state of the Game

I swear it isn’t shady but it is off center

And so now we’ve reached the point where I discuss the state of the game. It’s a simple design with simple things. I have a functioning prototype of a golf game and now am at the stage of making it into a more feature rich experience- or in other words I’m actually completing it to some degree.

So far what I have is simple. You can create and join a server (Something the Netcode library made extremely easy), you can hit a ball, you can move your camera and line up different shots, you can go into a goal which then transports you to the next hole. It’s really not rocket science, and since it’s a playable demo I’d say it shouldn’t be. This however lacks a lot of features that are necessary to call it even a completed demo. Some things I have to add include: Scoreboard with Pars and usernames, usernames require a options menu to change them, which also means there needs to be a way to change names in the middle of the game, there should also be a way to change ball color to differentiate the different balls, currently players move at their own pace but if I were to emulate the Golf With Your Friends way of handling things I need to change it so everyone is grouped together and plays the same holes together, which means I need to have something on screen when people are waiting, in the golf of your friends case they have a spectator system, a spectator system would require me to add even more UI and edit the camera controller, etc. etc.

Basically, the more features I add the more work there is exponentially. This shouldn’t be a new concept to anyone who’s worked in programming (though maybe I do exaggerate a little). Some blame this on Object Oriented Programming but I don’t think that’s the case, instead it’s just the truth of making a tightly integrated system. They’re full of butterfly effects, changing one small thing means changing another thing. Though, perhaps I write this more to convince myself than anyone else that there’s still work to be done.

How I’ve done some things.

So now instead of talking of what’s to be done I’ll discuss some things that have been done to convince you (or rather again myself) that I’ve done things.

Visual Studio makes me feel like I’ve done something.

So to start with Player movement and camera control are tightly bound together as the player’s angle is directly controlled by how they position their camera. They can move their camera any time while holding the middle mouse button (scroll wheel). Basically it’s intuitive as the ball will be shot in the direction the camera faces. You shoot by holding the left mouse button and moving the mouse. Right and up will raise the power, left and down will lower it. There’s currently no limit to the power a player can have (Though if I were to finish the game there would certainly be a limit)

The playing UI

Then there’s a variety of simple obstacles that have been made. There’s bouncy materials, ramps, rotating blockers, etc.

Better view of some of the holes

What I’m working on now

Now back to what I’m working on now. Currently I’m building up a “Game Manager” which will help direct the gameplay. It’s a server side object that’ll have all the map data (Holes, Par, Goals, Player’s Score, names, etc.). This will interface with the UI Manager that’ll grab the data for display on the Scoreboard UI panel which will be displayed whenever the user presses tab (Or whatever it’s rebound to, if I make that advanced of a UI). It’ll also help coordinate when to go to the next hole and other important game state things.

If I were to really wish to create a completed game I could then create a pre game lobby system, game options to change how the game is player, etc. I don’t think I’ll go through the steps of creating a completed game. Instead I might opt for just making the game loop endlessly, saving the best pars after you complete your first run through the whole stage. That’s still something I have to think about.

Anyways, until next time (even if it comes in a few months) thanks for reading.