Saturday 4 December 2021

v6.0 Release

 


The major implementation this time around is the ability to equip dropped weapons.  While this may seem like a very mundane feature, trust me it's a milestone from a game dev perspective.

Since different weapons could now be equipped I had to go back and change how swapping between weapons worked.  Previously I set it so pressing the Q key would cycle though the 3 available weapons, but now that weapons could be changed, I wanted to adhere to the two equipment slot rule.

The HUD also had to be changed.  Originally I had a fairly static way of changing the information on the HUD via specifically crafted functions for each weapon.  Since each slot can now have different equipment, or none, things had to be more dynamic.

I skimped out and just used a Godot panel node and label to make an info box in the inventory.  Other games like Diablo use the mouse to move weapons and items around, so a popup menu works well enough for this kind of deign.  But the inventory system I made is more static in nature and was meant to be used with a game pad or keyboard, so I felt that it would be more appropriate to have a mini HUD in the inventory menu to tell the player what it is they are focused on.  Right now it only shows the stats of items that have been selected (as apposed to showing when the cursor is over the time), but I plan to refine this, if not in this prototype, then in the main game.

The inventory controls have been revised a bit.  I got rid of the use of the C key and set the S key to invoke the exit command when an item is not selected.  I also removed the Z key from the state machine, it was meant to be a temporary way to exit the inventory before the menu, completely forgot about it. 

One of the drawbacks of the inventory system I made is it operates somewhat like Tetris, the 'blocks' are spawned in the upper left corner and then moved inside the inventory.  So I placed several labels in the inventory to designate what area does what.

I also implemented a save system.  Press the P key to save what is in your inventory.  Press the L key to load.  I recommend using this when you start a fresh game, as the save system will not remove anything that was previously gotten.  In its current state I don't recommend using it seriously.

While I still have a lot of polish to do on the enemy's state machine there was a random bug were the enemy's would get suck in the dying state.  I think I managed to get rid of this bug, but since it's kind of random I won't know until there is more testing done.  There was also a problem with the bullets having the wrong vector or the player suddenly snapping in the wrong direction during entering/exiting strafing state which seemed to happen at 'random'.  I think I got this one too.

The next update will probably feature a shop.  I went back to Blender to model a shopkeeper and other assets that I'll need.  I'll also likely work on the dialogue system too, since I want the shop keeper to interact with the player.  I'll probably be in Blender for a while, since I'm getting a little tired of programming and want to do some artwork for a change.

 

Head over to Itch or GameJolt to try it out if you want.