Golf Demo – Colorful Names

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

Today I did a bit of networking work to add Colors to the Golf Balls!

Two differently colored Golf Balls

And they’re even synced to each client!

Two different clients with working synced colors

There’s been a lot of frustration in getting this working- First since Game Objects cant be serialized over the network I had to find a good way to target it, in a way that both sides know what is what, which is a little harder than it seemed. Eventually though after getting frustrated by trying to do it myself, I ended up using the Networked Object ID’s built into the Netcode package to identify everything which worked out great. The big issue before was syncing all the ids I was trying to make myself in a quick starting thread of the game object in the middle of initialization which just didn’t work.

The other thing I added was Names! Players can now choose a name to identify themselves by. I had this working fully before but after tinkering a while I accidentally broke it so currently only the host’s name is shown but that’ll be fixed soon.

Don’t worry about the random text in the view, that was for testing stuff earlier

So sadly the other player’s names don’t show. A bit of a shame but hey what can you do? Also to power these I had to finish up some User Interface stuff, such as the settings menu. The settings menu works both in game and in the main menu, allowing players to change name and color whenever they want.

Some pretty neat stuff, maybe it was worth the hair pulling. The project is rapidly approaching the point where I said it’d probably be called complete, according to my super-official Post-It note todo list I only really have to make a menu to connect to a remote server, and make a menu to set up a dedicated server which would literally just be changing which port the host listens on. After that I have a choice to make, whether or not I make a “Proper” level for it. Which to me would mean a lot more work. Because I’d feel as if I’d have to make the whole game match the quality of the level. That’d include: Adding Sound effects, Music, more features(in game chat, for instance), a better looking UI, etc. And then making the level would require a lot of work designing, sourcing models, etc. in addition to testing and other things. Needless to say it’s not a decision I take lightly, especially for a project I chose to learn with. But also all of that would display my skill level and effort that I put into my projects, which is also important since this is a piece of my portfolio. Maybe after I’m done with it I’ll take a nice break and clear my mind with another project. I have a few ideas of what to do but hopefully it’ll have a little less networking.

The Super-Official Post-It Note Todo List