top of page

Programming

Player Mobility

Technical Summary:

With the player mobility, this was to get the underlying controls and mechanics of the player ahead of them being needed. This included the player sprinting and being able to crouch, interactions, and equipping items. 

For the different actions, these were assigned to an enhance input actions. So when the player was sprinting, we would increase the max walk speed, and then reduce the players' stamina, which can be seen through the UI. During this process, we also had a boolean that would make sure that the player wouldn't be able to also go invisible whilst sprinting. When the player stops sprinting, the boolean turns to false and the UI bar stops decreasing.

The player can also go invisible, when pressing the Left Control Key the player crouches and changes materials. When the player goes invisible, it changes a boolean relating to the player's visibility, so that when they are near enemies, they are ignored. Something that I learned with the invisibility was how to properly make the player crouch. Thankfully, there is a designated block for crouching and un-crouching which can connect to the player's animation blueprints to switch to a different set of animations.

For the E Key, we used blueprint interfaces to send a signal to do a specific action when interacting with the item. This was mainly for interacting with the market and shops throughout the level to create UI elements, or to have doors to open as well.

With the Q Key, we changed the original intention of the key from being the button to pick up and put down different items, but we altered it to be a menu where you could equip two of the key items that you could craft throughout the level. Instead, this became an equip/unequip feature, originally also featuring other key items (Spaceport Keycard, Battering Ram) that would have been interchangeable between the key items, since you could only hold one of them.

Further through the development of the Sneaking Method, we knew that we'd need a way to have the key items changeable as well as be able to then pick it back up if needs be. By this point, the function of Q was already complete and worked really well with the structure of the game, but its original intention was still required which would have originally merged with the E Key, but was separated and gave function to the F Key. This also came with an issue where the key item would be placed beneath the player, which when held down would cause the player to ride the item like a skateboard or launch the player. 

Reflection:

I think the player movements and interactions work really well with the game as well as the change for the Q Key was a reasonable change that functions really well. I do wish that instead of giving the key items found around the town their own individual key, that the function of Q was combined into what F does which wouldn't have been a hard change in the long run, but works fine as it is. It could potentially be a bit confusing for people, even with the UI prompts and control menu. If the pickup function was to be merged with the interact key, this would make the player experience much easier. We also haven't included the ability to take down the Redcoats, which doesn't feel like a necessary feature, but could be something we ask about when testing the game with others.

Enemy AI

Technical Summary:

The enemy AI are a key component throughout the game. They use behaviour trees to follow a set of instructions to either make them move around or chase the player. The AI itself uses the Pawn Sensing component to allow for them to sense sight and sound, which currently only has functionality of sight. The behaviours also follow a boolean attached to the player that changes when the player is invisible, allowing for you to move undetected. The movement of the AI uses a vector array to hold several locations that the AI then cycles through using the AI Move To block where they then wait for a couple of seconds before moving to the next. When the AI sees the player, they will move towards the player, and within an acceptable distance create a sphere trace that if detects the player, it broadcasts a message to the player to take damage and ultimately end the game.

​Enemies were something that I dragged into the level, but had individual instances that could have vector locations applied to them so they can patrol through a customisable set of locations. This was also paired with variables that would interrupt this section of code when they can see the player.

Reflection:

The AI works really simply, and I'm happy with these results. However, the AI, on occasions, looks like it changes its mind on the location it wants to move to, which does work as a way to through the player off of the typical movements, but is entirely unintentional. This is most likely an issue with the behaviour tree itself which I'm uncertain where it is coming from, but something I could definitely improve upon. I think it would also be cool to incorporate sounds that the AI could hear and attract them to the player to really lean into the stealth genre of games.

At this current stage, there are few enemies around, which makes playing through the game pretty easy, so throughout Beta as we upgrade the aesthetic and level design, we can populate the scene to include more enemies and make them seem more uniform through patrolling around like a soldier. This really helped me understand how you can get a piece of data from an array through the use of an integer.  

Cantina Contraband Shop

Technical Summary:

The Contraband Boxes were an idea we had during the pre-production phase as a way for the player to roll the dice and hope they get lucky, which would either greatly benefit them or work terribly against them. The UI requires the player to have 500 credits to purchase a singular box of either Crafting or Key Items. It then uses an array of items and gives the player a random amount of those items. When the player moves into the night phase, the box is then placed in the player's home for them to collect the items from.

Reflection:

I think the boxes are a great way to open up options for the player, but are currently hidden to any new player who tests the game, having a poster or notice for the player to see would help them find the interaction easier. I also think the mechanic would be enhanced just that much further by having a dedicated model rather than the white box.

Cantina Drinks

Technical Summary:

The Cantina Drinks were our way of helping the player through a specific boost if they had the money to spare or felt like it would provide enough of an advantage to make it a necessary purchase over more items to make the night easier. The main dependency came through the UI, created when the player interacted with the Actor, which would offer the choice of a drink to add additional Stamina or Invisibility for the player to use. Additionally at this period, we had also added drinks that would randomly spawn around the level as well, which would allow for the player to replenish Stamina or Invisibility, but not add extra like the ones from the Cantina. This did present me with a challenge to allow for the player to not increase the stat higher with the drinks, but also not reduce the boosted stat when they interacted with a drink. We did eventually solve this, before being hit with another, indicating to the player that they had bonus stamina. This was a solution that both myself and another team member helped to resolve, originally settling for just a change in colour to the different stats, before also including the text alongside it.

Reflection:

I think this works really well with the game and adds some additional layers to how the player can navigate and change the game to fit how they wish to play further. Evidently, there are still some issues to resolve with this mechanic at the moment, but that doesn't detract from the concept. I think adding more drink options to allow for the player to pick and choose more would also be in line with the customisable experience of our game. Maybe adding the same drinks that add more but at a higher cost? Maybe something that could give the player more speed during the night?

© 2024 - 2025 BY ELIOT WILLIAMS. Powered and secured by Wix

bottom of page