0.3.3.10 bugfixing remastered

Posted On 1 Feb, 2016

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.

Inventory UI overhaul

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.

Interior movement

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.

Interior animations and control scheme changed

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”

Music

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.

Singleplayer unlock persistence

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.

Fixes and optimizations

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!

Full patch notes

0.3.3.10

  • ship interior character movement and collision detection drastically improved, you no longer get stuck on corners or bounce off of invisible cracks
  • crew weapon bullet velocity increased for all weapon types
  • crew weapon dps is now more balanced between types (auto shotguns are no longer insanely OP)
  • crew weapon types are now a bit more diverse across the board
  • crew weapon accuracy numbers tweaked so that accuracy is a bit less binary and burst fire matters
  • crew weapons can now only be fired while aiming (right mouse by default)
  • while aiming your weapon, you move slower depending on what type of weapon you are using
  • base run speed for all crew has been increased from 150 to 175
  • crew run speed can now be modified by equipped items like armor
  • guns now reload themselves while you have them holstered (whenever you aren’t holding right mouse button)
  • there is a new animation which shows weapon reload progress
  • updated the description of some key bindings to reflect control changes
  • you can now start the game with a fire extinguisher if you are wise enough to click things that look useful without being told
  • music! it’s finally working. If you find a bug with music then seriously don’t even tell me I might go insane if I have to work on music any more.
  • added back threaded updating of the player’s own ship when you aren’t looking at it. As a result players in large ships should see better combat FPS
  • rewrote inventory UI from scratch to use 64×64 icons because they look prettier and use the available space better
  • inventory UI overlay is now a proper thing that’s not hard coded into screens and so we can now more easily display the inventory of a thing from anywhere
  • you can now delete items from your inventory
  • fixed a typo in some dialogue.
  • fixed a type in the previous patch note. Lets hope I’ve finally got them all.
  • fixed an issue with one of the intro dialogues where some text wasn’t showing up
  • fixed an issue where you could skip ahead in the narrative by talking to One in the bar before finishing the tutorial
  • music now stops playing when you set music volume to zero
  • music now stops playing when you turn off sound
  • music will no longer play if sound is on but music volume is set to zero
  • added some ways to get out of One’s dialogue if you want to delay the dialogue until later
  • fixed a bug where turret spawners were spawning more than one turret inside stations
  • medbays are no longer simply placeholder art, they actually heal you when you enter them
  • further nerfed the guns available by default in the ship editor
  • built a new framework for tracking persistent progress outside of singleplayer that is a bit modular and so should hopefully allow future expansion witout breaking save formats
  • researching a turret type in singleplayer now permanently unlocks that turret type for use in the ship testing arena
  • the game should extract unlocked turret types from save game files, even in some cases where they are corrupt and fail to load
  • all console connectors made into blocking tiles. This is your fault cheaters.
  • added a fail safe to faction code which forces them to initialize if the tutorial has ended without initializing them
  • upgraded all crew animations with new art, new logic, and new states for walking various directions and aiming various weapons
  • There is a new character slot for a vanity item that changes how your character looks
  • added a new gun category: side arms
  • you now start the game with a side arm instead of an assault weapon
  • reduced the health of existing monsters by around 50% to make the new player experience less brutal in stations and so your start weapon isn’t useless in the first station you enter
  • found and fixed some code that may have been resulting in a very hard to reproduce bug where the character can become trapped in limbo after standing in the wrong location during a ship breaking event
  • updated the color scheme of many UI elements for more consistency with newer UI elements
  • upgraded the repair tool tool tip to a tool tool tip that is much more informative and mature. Tool tip accuracy + 100%

0.3.3.11

  • fixed the tool tips for your quest log which were still trying to reference the old icon artwork we updated for the inventory UI overhaul
  • fixed a bug in the inventory widget where read-only mode was applying to the close button
  • rerendered crew sprites to fix an animation frame offset error that caused them to strut around like they owned the place. They should know better.
  • redid all offset vectors for crew weapons and body parts for various animation states
  • updated the name and text for scrap metal tool tips
  • the tool tip art for scrap metal was fixed for the last patch and nobody ever saw the wrong one, but it got fixed post upload so here’s the patch note for it
  • fixed a bug where music wasn’t looping. In all my excitement at hearing music play at all, I forgot to check if it would play forever. It does now.