Second Wind: Guns’R’Us

Now that the game has some basic enemies. The player now needs the tools to kill them. Weapons has been something I’ve been excited for but at the same time dreading. The amount of logic required for them, the processes, the fine-tuning is essentially what makes or breaks a shooter game. Now although this is my first ever shooter game, and I have no illusions or grand ambitions as to the quality of my first ever shooter game. Weapons are still a colossal amount of work. Different types of weapons each with their own ammo/projectiles, their own firing characteristics, reloading, damage and one of the biggest tasks of all, feedback.

I’ve come to appreciate the little things that we gamers take for granted in our games. I’ve been surprised how its the little details we hardly pay homage to, that have the greatest impact. The bullet impact particles, the hit sounds, the gun recoil, the HUD to name a few. Without these our games would be frustrating as hell to play, maybe even unplayable.

So tentatively I started implementing weapons. I created a pistol, machine gun, laser, rocket launcher and grenade right off the bat. I want to implement a machete and C4 but like the spider jumping AI, i’ll add it in the end if I find the time. Right now with my struggles with scripting, I need to focus on getting as much of the marks as possible. Initially I had to think of how to get a weapon system based upon player input of the num keys. For example, when the player hits ‘1’ the pistol is activated and every other weapon is inactive, when ‘2’ is pressed the machine gun activates and everything else is inactive etc. Straight away I knew I had to do an enum system incorporating bools so that when one weapon was active the rest would be inactive. After that I figured that I would need a switch statement so that when a weapon was active it would run that particular weapons code.

Surprisingly, implementing weapons was a lot easier then I expected, but at the same time it took a lot longer then I expected as well. Apart from each weapons characteristics, I had to figure out the reloading mechanics, and the visual and audio feedback for the player. Once this was done, I then needed to display this information via the HUD. After I couldn’t find any appealing sprites online, I decided to create my own sprites in photoshop. As I expected the feedback for the weapons was the most time consuming part. Now that the weapon logic is complete for the most part, I now need to create another level and also create pickups and polish up the feedback mechanics for the game. The game is due next week so hopefully I will also be able to create a basic scoreboard before the assessment is due.