DevLog #3 – Working on game systems (pt. 1)


It’s been a while since the last entry, so I thought I’d give an update on the game. The past week or so has been going slow; that’s partially because of some issues with with graphics driver and UE. Turns out, GeForce driver 528.02 had some major issues with Unreal Engine 5.1, which resulted in crashes the second the engine started. The solution was to revert back to 527.26. That also wasn’t without issues as the driver was refusing to install no matter what. It worked out in the end, but don’t ask me how I fixed it. I have no idea. It just randomly installed itself at one point…

Game progress

Anyways, back on topic. Currently I’m working mostly on preparing game mechanics and systems. So far, I implemented a stamina system (used mostly for sprinting), sneaking, basic enemy hunter AI and inventory.

Stamina

I was a bit hesitant about including sprinting in the game, but in the end I thought that it’s simple enough to implement it that it wouldn’t be an issue, even if it didn’t make it into the final version.

The game first checks if sprinting is possible and if the player is moving (checking if velocity > 0 prevents the game from draining stamina when pressing sprint button, but not moving). It then changes movement speed to sprint. I used timers to fire an event at a set interval (still needs adjustments) and once the player runs out of stamina, it goes back to normal movement speed. Using another timer, I set up a stamina regeneration system that fires after few seconds. I still need to fine tune the values, but I’m gonna need to do more testing and for now, I don’t want to spent too much time on it.

Enemy AI

The game has only one enemy whose only purpose is to find and kill the player. Ideally, it would behave similar to the Xenomorph from Alien: Isolation, but I have to be realistic if I want to have this game out in the foreseeable future.

Unreal Engine’s behavior trees make it really easy to set up an NPC AI and make something interesting. The only downside is that they are not optimized as well in blueprints as they are in C++.

For now, the enemy is programmed to simply roam around and check different random locations, and if it sees the player, chase them. If it loses sight of the player, it will stay in an alert mode for a while, and if nothing happens in the meantime it will return to its idle state.

Once I’m done with the first loop of laying the foundation for different systems, I’ll come back to the AI to add more variations to how it detects the player.

Inventory

Now, an inventory system might not be the hardest thing to implement in a game, but it’s definitely easy to get lost and write yourself into a corner if you don’t have things thought through. Especially when you’re a green newbie like me…

Fortunately I have already made a few inventory systems in the past for practice, so I decided to just reuse one and adjust it for my current needs.

If I were to start from scratch, my first step would be to list all the things that I wanted to include in it:

  • the ability to examine items from the inventory menu – since we’re planning to give additional info about the world and lore in item descriptions and on items themselves, it’s very important to have a system that would allow the player to take a closer look at what they just picked up;
  • the ability to use items from the inventory – seems like a logical choice.

To make my life easier, I always try to make a simple algorithm outline for more complex stuff so I don’t get lost.

A very general algorithm for adding items to inventory, but it helps me keep track of what I still have to do.

In this game, I decided that the ability to drop items was unneeded as I don’t want to have limited inventory slots. I feel that in this specific case, it would turn into an unnecessary inventory management mini game and detract from the experience.

I’m planning to go into the specifics of some of the systems I mentioned after I finish them and do some cleaning.

What’s still left to do?

I still need to implement a health system and shooting, since we want to give the players some way of defending themselves from the enemy. On top of that, there’s still the matter of finishing the level layout and making necessary models.

We would love to release the game sometime in February (Valentine’s Day release quite possible… I mean it’s a perfect time to play horror game, am I right?), but nothing is set in stone yet.

Leave a comment

Log in with itch.io to leave a comment.