Working Around A Bug In Unity’s Input System By Building For Release

Edit: Someone from Unity Tech. found this post and is working on a fix.  So that's good 😀

This post could also be titled "Why I Absolutely Hate Closed Source Game Engines (And I'm Totally Not Talking About One In Particular)".

This weekend, a couple of friends and I participated in the Game Maker's Toolkit 2018 Game Jam*.  As part of it, I dusted off an input system I wrote for a local-multiplayer Unity game a few years ago.  Since it uses XInput for Xbox controllers, I thought - "Hey, I have an Xbox One set up for devmode and I read somewhere that UWP (Universal Windows Platform) games now have unlimited resources...  Wouldn't it be neat to port our game jam game to the One?"  Yeah, that would be neat, and being able to eventually tack "Shipped Xbox One Indie Title" onto my resume would be pretty cool.  Unfortunately, it wasn't quite that simple.  So I'm writing a blog post about it, mostly because I want to rant about the last 18-or so hours of my life.  Bleh. Continue reading "Working Around A Bug In Unity’s Input System By Building For Release"

Networking Woes: MTU and Packet Loss

Our game, Gravitas: The Arena, is using a custom high-level networking solution built on top of Lidgren.Network.  We've had a few lingering networking bugs for awhile now that have gotten buried under other priorities.  Today I sat down to try to solve all of them, and luckily enough managed to do so.

Aside from a few minor bugs, there were two remaining major issues that I wanted to address today:

  1. Intermittent, extreme packet loss over LAN
  2. Packets not coming through before a notable delay over the internet when using UDP hole punching (but not Hamachi)

Continue reading "Networking Woes: MTU and Packet Loss"

Extending Unity for Git (and maybe other source control?)

Note: The really interesting bit is at the end of the article.  So if you don't stick around for the whole journey, at least skip to the end!  That being said, this is all useful stuff so you should, yeknow, stick around...

Unity is a pretty solid game engine that at least a few people are using, but it doesn't play very nicely with Git - my preferred source control mechanism - by default.  While I can't speak for everyone, there are three major issues I've always wanted to address:

  • The default setup all but guarantees that having two different users push the same scene, prefab, ScriptableObject, etc will render it totally unusable and force you to rollback (quite painfully) to an old version.
  • Git, by design, doesn't play very nicely with binary data.  It's diffing tool doesn't support binary files and, as such, it stores the entirety of each revision of binary files for every commit.  As a lot of game content is stored as binary data - FBX files, textures, etc - this presents a bit of a problem for storage.
  • After playing with Unity Collaborate a bit, it became extremely evident that the UI/UX for interaction between traditional source control and the Unity editor could be drastically improved.

In the past we've sort of just worked around these issues, but I spent a fair amount of time recently figuring out how to address all of these issues more directly.  With some additional configuration steps and a little bit of editor scripting, all of these issues can be addressed quite nicely. Continue reading "Extending Unity for Git (and maybe other source control?)"

Optimizing Networked Strings as a Prebuild Step

Lately, I've been working on a fast-paced VR multiplayer shooter game in Unity with some classmates. Since we've had negative experiences with UNET in the past and knew we would need to optimize the netcode pretty carefully if the project was to play well, we decided to build a custom networking layer on top of the fantastic Lidgren UDP library. Most of my time has gone into building the networking layer from the ground up (which has been a total blast). Continue reading "Optimizing Networked Strings as a Prebuild Step"