I'm back after a couple of weeks dealing with other stuff. I kind of enjoy taking some time away. I like seeing how the team handles shit without me. It helps identify places where I have too much control, where other team-members need the authority to get shit done. It's important for us to increase the
bus factor. Especially as shit in my life is going to get really busy next year, so any way I can empower the team to take weight off my shoulders can only be good.
So I've been looking at problems and solutions this week.
Official Server Stability
Problem: Official servers are shit. They attract hackers and griefers. Sometimes they're down without explanation. Sometimes they're laggy.
We need better monitoring tools. Better reporting tools. Better hardware. At the moment we're hosting our own servers on a bunch of random dedicated servers. We're going to be adding a bunch of new official servers in a variety of places, using a professional host. This means we'll most likely be retiring the old servers.
I knocked together a quick website to monitor and alert us of server issues. The hope is that by making this more visible, and by making it more accessible by more people, we'll be able to spot and react to problems quicker.
I'm hoping this is just the start of this, and we can get serious about administering our official servers properly.
Input System
Problem: Can't redefine keys in game. Unity options pop-up window breaks Steam Big Picture mode.
The solution to this is our own input system. Something I was hoping to avoid for a while since Unity is re-writing theirs that will probably make this a waste of time.
I decided that if it's going to be done it might as well be done right. So I copied how Quake/Source works. It all works via the console system. So you can bind keys to certain functions. This will make it so that when you press k the game quits:
Obviously that's just an added bonus, mainly useful to admins/developers, since we can bind keys to debug commands and stuff. Normal users will be able to change key binds in the menu.
Code Testing
Problem: Our code isn't testable.
Our code is pretty modular, but it's all in Unity. It's a bunch of scripts thrown in a folder. We can write tests but then they all exist in Unity, and the more shit you have the slower it all is to compile. So I started extracting code into different self contained assemblies.
This increases re-usability, since we can share those modules with different projects. We can quite neatly add a bunch of tests for each module, to make sure future changes don't fuck shit up. It also takes all the loose files out of the Unity project folder, which can't be a bad thing, right?
I can appreciate this is like shutting the barn door after the horse has bolted, but come on, we're trying ain't we?