Tuesday 22 November 2016

Unreal Engine 4: Experimentation With Video Game Tropes

This post will document some of my experiments with two video game tropes; Regenerating health and Health item placements in levels.

Health Regeneration:

A mechanic present in a lot of games, replicated in Unreal Engine 4 using the blueprint system.

By calling this function, Update Health, on each tick, the game will continually check to see if our health is more or less than the max health. In this case, the player starts with 1 health and that is also the maximum health. The first branch is used to make sure the player's health doesn't go past 1, always keeping the player's health a 1 and not letting the regeneration put it at 1.04 or anything else. The second branch is used to see if the player's current health is less than the maximum, if this is true then it will then check if the player has taken damage recently via the third branch and a variable called 'Damage Received'. This check is used to create a delay between the player taking damage and regenerating health.


After setting up a basic HUD, this health will be represented by a simple health bar.

Experimentation:

- What would happen if these variables were altered?

Changing these values can make or break the balance of the mechanic based on many things. For example, if the delay before health regeneration begins was removed, the only way enemies would be able to kill the player would be if they can deal more damage-per-second than than the health regenerates per second. This is an example of why the delay balances this mechanic, as otherwise the player could sustain damage infinitely as long as it is not too much.

By selectively changing certain values we can change how much the health regeneration has on gameplay. Increasingly the delay before regeneration begins can make it less common in battles, making players rely on the amount of health they started a battle with until they've won the battle and have enough time to regenerate health, or if they hide for an extended amount of time. Whether these mechanics would have a positive effect on gameplay is arguable and depends on the gameplay.

Changing these values in unison can effect how powerful the player is overall, for example, decreasing the max health, starting health, regen rate and increasing the delay could make the game incredibly hard and possibly unfair, whereas the reverse of this would make the player so powerful the only way to keep the game challenging would be to have enemies powerful enough to actually pose a threat.

'Suspicious Videogame Generosity':

This trope refers to the abundance of healing items and ammunition before battles, usually boss battles or encounters of similar description. 

An example of a common design of such rooms, an abundance of health items at the entrance to a battle.

Each of the floating cube is a basic health kit that provides the player with .25 health when the player walks into them. If being at 0 didn't kill the player, it would take 4 of these to heal the player to full health without a health regeneration system.

The health kit blueprint.
The health kit is relatively simple. When the player character overlaps a collision box in the blueprint, the blueprint checks to see if the player character's health variable is below 1, if so then the health kit will add .25 to the current health value of the character. The actor is then destroyed to make this a one-use item. The health kit can never increase the player's health beyond 1 as the player character blueprint checks to see if the player's health is more than 1 and, if so, reduces it to 1.

Experimentation:

- Removing the health cap forced by the player blueprint

By removing the maximum health variable, or at least increasing it to more than the player starts with, we can allow health kits to increase the player's health to more than they start with. This allows the player to begin the battle with more health than they would usually have.

- Adding an inventory system to allow the player to use the health kits later

If the player enters this area with full health, the health pick ups are useless to them, if an inventory system existed, these items could be kept until needed in the battle. This will avoid the problem with items being useless if the player doesn't need them immediately, and avoids the need for the player to backtrack to the room, if the game will allow them to do so.

- Altering the health increase

Altering how much health is given to the player per health kit could determine how many would be needed in this situation. For example, there could only one health kit that fully restores the player's health, circumventing this trope to a degree. Alternatively the amount of health restored could be lowered, making health kits less valuable and would mean that they would need to be more abundant to balance. If the level designer makes the decision to not place more health kits to balance the smaller health bonus, the level would become harder.

- Not removing the health kit after healing the player

The health kit would be able to be used endlessly until the player is healed fully, if the player's health cap was removed, their health would increase infinitely as long as the player continues to overlap repeatedly with the health kit.

- How does a health regeneration system affect this trope?

Due to the health regeneration system implemented earlier, this trope is largely useless as the player could just wait in this room for their health to regenerate. One way to allow these two tropes to co-exist is to allow health kits to increase the player's health beyond what the health regeneration ever allow the player's health to go to. For example, allow the player's health to regenerate to 100 at most, and allow health kits to increase the player's health to 150 or even 200. This would make rooms such as these still viable while also allowing the health regeneration to be important for the other parts of the games.

- Not including health kits at all

If a health regeneration system isn't in place, the difficulty of the following areas depends entirely on the player's skill and current health. Doing this will increase the difficulty of the game significantly to the point where players may just be tempted to restart all over again if they don't have enough health when they reach this point.

- Ammunition?

If this were a game where ammunition isn't infinite, placing ammunition in this room be the same as the placement of health kits, and possibly even more important. Some games have specific types of ammunition unique to each gun that can be supplied based on what enemies will be present in the upcoming battle. If the player can not pass the following area without ammunition, for example if they had no method of damaging enemies while out of ammo, such as a melee weapon or attack, then the importance of ammunition piles in these rooms increases.




No comments:

Post a Comment