Showing posts from June, 2017

Moveset Expansion (and controller support!)

I've added two new moves to the player's set. The first is a dash, which lets you dart away from danger or tackle an enemy. After the dash, you temporarily slow for a moment. The idea being, the dash should be deliberate, and not quickly clearing distance. You dash away from gunfire, or into an enemy, or close enough for a melee attack. You don't dash three times in a row, for example.

The second is magazine tossing. When you reload, you throw your magazine forward. The magazine can hit enemies and briefly stun them, enough to buy you a window to reload and then finish them off. Obviously, you don't get a magazine with shotguns or other invidually loaded weapons.

I've also coded in checks for when a controller is plugged in, or unplugged, to enable/disable controller support. I'm testing with an X1 controller and will have to rely on others to test PS4/PS3/X360 controllers, but hopefully there are no problems.

All of the actions and controls are set to variable…

Shatterable Objects

I've been working on restoring thin walls and shatterables. Like my previous post, "game feel" is a big concern right now, I want things to have a punchy sound and visual effect to make things feel weighty.

Additionally, when glass smashes it now creates a AI sound node, so unalerted enemies will now come to investigate. You can use this to distract an enemy before moving in and either taking them out at close range, or taking out another without raising an alarm.

Only certain weapons will have this wall penetrating power; at the moment, the powerful loud weapons like assault rifles and shotguns. This is to give them an fighting chance against the suppressed weapons, so the player's choice isn't so one sided.

Cover Code Revision

I've spent the past few hours revising some of the code used for enemies taking cover. For starters, I realised I'd never told enemies not to shoot if an ally is in their way. Whoops. Also, now they won't take a cover position already occupied by another character. Hopefully. I haven't stress tested that one.

- Rob

Spring Cleaning & Optimisations

I was testing the new cover mechanic when I stumbled upon a second game breaking bug. Like the first, none of my attempts to fix it worked. The original bug threw up an error about being unable to find the enemy's path, so I made sure to always check the enemy's path existed before trying to assign it, and an else condition created said path if it didn't exist.. the bug was seemingly random, it was semi-repeatable but generally it just felt like a bloody ghost in the machine.

With the emergence of a second, I realised I really needed to rip out some of this old redundant code. There was a lot of remnant code for features like body carrying, crouching ect that was causing problems. I also took this opportunity to remove redundant objects, sprites, backgrounds ect. The project had started to bloat with old stuff. For example, I had three variables that identical functions -- clearly remnants from three separate attempts to do the same thing at three different dates. Probably…