This is like…a really big patch for bug fixing. I was tempted to make this patch 0.3.4.00 but it doesn’t break save games or add a lot of significant game play content, so it is going to remain 0.3.3.10.
There are some new features in this patch, so I’m going to write a bit more than I would for a smaller patch.
We overhauled the inventory UI. That’s revision 2 I believe.
Internally it’s a UI widget now so we can just display the inventory of things on any screen we want. Before we could only show inventory things from 2 screens and it was hard coded so it was a pain in the…anyhow it looks neat and we upgraded the icon size to 64×64 because this isn’t a game about collecting a million crafting materials and we have small inventory sizes so we figured, why not make it look nicer? Not all things have had their art upgraded, so some stuff will be a little more rough than others…work in progress, you know, but I’d say that over all the inventory using experience has been drastically improved.
Also you can delete items now, it was a requested feature.
So, the old system for character movement sucked. I mean, technically it worked, and if you aren’t really that concerned with the details then you might not even notice the difference with the new system. However, if you are like me then there is a lymph node behind your right eye that swells a little every time your character gets stuck on an invisible crack, or you need to move one pixel to the right in order to get past a corner in a hallway. I didn’t like the way character movement felt so I made it better. If you are interested in the engineering bits I changed, read the next paragraph.
So the old system for character movement used rectangles, and the new system uses circles. In programmer land, a rectangle is a lot faster, because everything is integers with them and if you want to know if two rectangles are overlapping the mathematical test is really fast. Circles are essentially a range test, which means you are doing floating point math on the distance between your center point and the target center point and everyone cares about each other’s radii. I used rectangle collision in the old system because the speed of it allowed me to be lazy with the code. I just gave the character a rectangle and tiles were already rectangles and if you overlapped after a movement you went back to your starting point. The problem was that X movement and Y movement were different steps and so you could get stuck on a wall just because you pushed 2 buttons at once and the algorithm decided to send you back where you started. The new system however does a fancy calculation to check all of the tiles around you as if they were circular columns. It finds their positions and does all of the expensive radius calculations associated with circle based collision, but that’s okay because I actually made sure it only does it for the tiles immediately around your character. On top of all that, I’ve used the powers of math to make them squishy. Instead of returning you to your original position on an overlap, the new collision system has walls pushing you back over time as if walls repelled you, so instead of stopping, your character slows down or slides back into place. The net result is that moving around inside ships is a lot less irritating and a lot more fluid feeling.
Most people won’t ever even notice 99% of this, but I think it gives a subconscious feeling of the game sucking less the entire time you are playing, and that’s worth a lot more than you might imagine.
You have to hold the right mouse button in order to “aim” your character when firing weapons now. I know, life isn’t fair.
This was done for a number of reasons. First of all, we have a really fancy new animation system where your character actually animates depending on what it’s doing and you can see your character firing your weapon instead of bullets magically spawning from your character’s crotch. The legs move independent from the torso, and your feet play different animations for things like walking backwards or side stepping while shooting at hoards of monsters.
However the new control scheme isn’t only meant to support the new animations. We also wanted weapons and armor types to affect character movement, and we wanted a way for you to reload weapons without firing all of the bullets and waiting, both of which are impossible in the old system. Also it replaces an outdated function (right clicking fire tiles) which is no longer useful thanks to a new item we added (extinguisher) and it prevents your character from shooting crew members while you are trying to click UI elements, but…I’m sure those crew members deserved it, so moving on…
The system allow us to have different art based on what you are wearing and what guns you are using. It’s not as deep as the character customization in some RPG games, but it allows us a lot of freedom to make fun things like powered armor suits that actually make your character look like it’s wearing a powered armor suit etc. So when you try the game and you see that your character can now equip a vanity item in a new vanity item slot we just added, remember that this vanity item slot is the reason you have to hold right click in order to shoot your weapons, and send your complaints to people who like their characters to have funny outfits because this is as much their fault as it is mine.
Also most people won’t ever read these patch notes and they will see the new artwork and think “wow, that character looks flippin’ awesome, I can’t believe how its legs wiggle about when it’s walking”
If I have to have another post where I officially announce that I finally solved the music/sound problem, it’s going to be 90% profanity.
I would like to officially announce that I have finally solved the music problem. I’m 90% sure this time.
We want to have a significant amount of music tracks, like measured in hours significant, and monogame on windows supports uncompressed PCM wave files which take around 100MB of disk space per 10 minutes of audio. Not wanting to have 6GB of music in the game’s distribution files, I was thus forced to learn how decoding compressed audio files works on a level that I wasn’t entirely comfortable with. The .ogg audio format is free and open, and there are lots of open source .NET solutions for playing them, but as I quickly learned windows, monogame, and 64 bit, represents a new combination of environment that’s not exactly tried and tested in the open source (mostly linux) community. I had to spend a lot of time fiddling with unmanaged code, byte streams, dynamic sound effect instances, and scary stuff like that in order to build a system that can play music inside a framework which really can’t be called XNA or monogame anymore. Our framework has moved beyond monogame into something much more sinister and complicated, but hey…there’s music in the game now, so that’s nice.
One of the biggest parts of this patch was about fixing bugs that could potentially lead to a corrupt save file, but one of the other biggest parts was adding a system that makes corrupt save files less of a worry.
It was requested over and over. “Why don’t you make a system where unlocking things in singleplayer makes them available in the testing arena editor” and my concern was that I would need to invalidate everyone’s save games in order to do that. I still might, but that’s an adventure for another day because I’ve solved half of the problem with this update. When you unlock turrets in singleplayer, or when you load an old save with unlocked turrets in it, those turrets are now permanently added to your ship testing arena editor list of turrets that you can set on ships. The system conforms to my policy of making things a little fancier than they need to be, which means that I can probably use this system in the future to make other types of unlocks persistent, or allow things from outside the game to provide unlocks. Also, this change doesn’t break existing save games, and even if your save is 90% corrupt it can usually extract unlocks from it, which is awesome.
I’m trying out a new system that lets your own ship update in a thread when you are flying it (but not when you are walking inside it) so you should hopefully see better FPS while flying around in big ships, and hopefully not see random crashing due to threading issues because it still does things deterministically when you look at it. ALSO, I’m at least half certain this time I squashed the bug that can leave you stranded in limbo after crashing or exploding really bad. If successful, you should be able to reliably die horrible deaths no matter how you screw up, and no longer need to worry that you will be wandering around invisible as a ghost in your own ship waiting forever to respawn.
I fixed lots of other little bugs as well, and I made medbays actually do something. If you tried medbays in the past and couldn’t tell if they were working or not, well I guess we’ll never know, but they work now for sure!