Reinforcements, sounds and pauses.

The week started with working on reinforcement code. The idea is that in certain points in the game the player will order up reinforcements via the gates. There are a bunch of reasons for this – one of them is that as a developer I need to know how many ships the player has access to so that I can properly send enemies at the player. So with the reinforcement system I can be sure that the player has a chance at a full fleet before at certain points. It also gives the player a sense of continuation with the assets that they hard fought for – researching new ships and capturing bases.

When I started working on the code I was a bit lost and then quickly realized that I should just re-use the shipyard code. So what I do is when the player enters a gate leaving a sector that includes asteroid bases behind, I copy their paramaters/properties/inventories including their shipyard capabilities. For simplicity I lump the external shipyards and the internal shipyards of the bases and give player access to them. This also led me to tweak the shipyard gui screen in tactical mode allowing selecting of shipyards from within that screen. This should make the process of managing ship building much less annoying – having to select a shipyard, then go back to tactical to select another. Now you get a list. I’ll have to create something similar for base management.

Next up was working on sounds. Early in the week my sound designer sent over about 1/3 or 1/4 of sounds needed in Tactical mode. I had to force myself away from coding the reinforcement system since I don’t like having an artist wait for me to send over funds for assets. So at around 10PM I thought, ok I have about an hour or two of life left in me I might as well use it at the relatively easy task of adding in sounds. This got the ball rolling and when I mostly finished up reinforcement code – Thursday it allowed to hit the sounds full force on Saturday. Things are going pretty well in that area, very pleased.

Saturday night I wanted to re-visit the pause/un-pause sounds. To give you a brief overview I wanted the pause sound to be a heart(s) beat that slows down, and the un-pause sound to be a heart beat(s) that speeds up. The quickly apparent problem was that pause/un-pause were instantaneous – but the sounds were over the course of 5 seconds. I asked my sound designer to cut it down to 3 seconds, but that change didn’t help. The solution became apparent to have a gradual slow down to a stop and a gradual speed up to a resume. This was a few weeks ago, and I wanted to ship iteration 17 to the Beta backers so I decided to put these guys off to the side. Like I said at the start of the paragraph Saturday night I revisited. My initial struggles melted away this time and I quickly got the gradual code running well. I went to sleep very excited and realized that since the idea of the pause system is that the command ship “overclocks” the player character’s in game brain – therefore seemingly slowing down time – it would be good not to have a total stop. And it does work very well – a (incredible) side bonus is that this solves an issue the game was having with issuing orders in tactical mode – where the AI when the game is paused wouldn’t respond to the order until the game was un-paused. Since now the action is slowed down – not paused completely – the AI responds. This system also works in ship mode – which before when paused was completely disabled – now the player can jump into command mode and have plenty of time to issue commands.

I plan on putting in a bullet time like system more suited for dogfighting, the current time slow down is about 5% of normal – which is too slow for combat but good for issuing orders. Something like a 33% or 50% slow would allow for a ok amount of control and dodging in a dogfight.