Now that the gameplay loop involving management is (mostly) functional, I’ve started to work on the other half: stealth. Half of the game involves the player creating an environment to safeguard the level against intruders, but the other half the player takes on the role of an intruder to work around the systems they put in place. In essence, the player is playing against themself to find the right balance between appeasing both factions they work for, while ultimately deciding which one they want to side with. A complex and ambitious idea, but one that I am confident I can pull off.
I also finally got around to fixing the inventory system, which became a convuluted mess of nested dictonaries and arrays that never worked right. The initial idea seemed fairly easy, just have a dictionary entry for each item that has the name and the quantity you currently have. Unfortunately, dictionaries are only really meant to be accessed in one direction (that is, it’s easy to access a value by its key, but not the other way around). So I had an annoying system in each interface that would create its own dictionary for the player’s dictionary just to make it easier to access the name of an item rather than its quantity. And then items wouldn’t get removed properly and would still be stuck in the slot they were in and wouldn’t allow new items to occupy its space.
Can you see why this got annoying?
So now it’s just an array of other arrays that store the item name and quantity. Easy to access from anywhere. Although checking if an item is in the array rather than adding/removing it was a bit difficult, but Godot’s filter() function made it pretty easy:
GameState.playerInventory.filter(func(i): return i[0] == "ItemName")
I don’t know how it works but I’m not questioning it.
I’ll also be looking into getting a tile artist soon to replace the basic ones I have, now that I’m getting close to having a demo out (still aiming for October).
Some of the big changes:
- “Day” gameplay loop is mostly functional
- “Night” gameplay loop is partially functional
- Fixed inventory system for real this time (nested arrays work much better than dictionaries)
- Added basic lighting
- Added “Home” level
- Added basic hacking system
Game of the Week
My friend really wanted me to play Barotrauma, a 2D survival horror-esque where you play as a crew member of a submarine within the flooded moon of Europa to complete tasks for various factions in-game. Unfortunately I found the whole experience to be very boring, sitting around and maybe shooting at something if it showed up. Even worse, by the time I realized how bored I was I had passed the two hour “no refunds” point. Maybe it gets better later on, but for now I am not impressed.