Download

Feasibility of Realism Discussion

Hi guys, Kyero here!

I wanted to start a discussion about what kinds of elements of realism would be feasible for anyone working on a project and who’s on a tight budget. Obviously time and dedication are the two biggest investments to any project, as well as passion. But when it comes to actually accomplishing some of the things I list below I’d like to know what everyone thinks regarding whether or not they’re actually doable in unreal engine 4. And if they are I’d like to know the kinds of ways you’d accomplish them as well as what you guys think some of the obstacles to making them function or to bringing them into an actual project would be.

So here we go!

  • Health
  • Obviously the HP bar is the mainstay of many, many kinds of games. But I’m not actually talking about an HP bar. I mean realistic health. Illness, injury, built up fatigue and lack of sleep, etc.

How feasible would it be to incorporate mechanics like this such as an illness slowly lowering the ‘Health Meter,’ and the more the Health Meter drops the more the player’s movement speed is affected as well as changing the way the Player Avatar moves around such as holding their stomach or leaning against a nearby wall if the Player is idle? If the Health Meter is allowed to drop to 0, the HP bar goes down until it hits 0 or until the Player does something to heal themselves. If the HP bar hits 0, they’re dead and it’s game over.

For injuries such as a broken leg, having the Player Avatar limp along and need to stop frequently to rest and deal with the pain.

For injuries in fights with bladed weapons, is it feasible to actually put gashes on the Player Avatar from where the enemy’s blade went? Is that a texture thing? And if the Player Avatar is gashed, it affects how quickly the limb/body segment in question responds to combat commands and combinations. For example if you have a gash on your leg your kicking speed on that leg will be reduced and it will have a higher chance to throw the player off balance when trying to kick with the other leg since the gashed one is having muscular problems so balance becomes an issue.

For lack of sleep, if the Player doesn’t sleep anywhere for a long period of time the Player Avatar grows sluggish and their movement speed is reduced as well as their climbing ability hindered.

And I Fatigue is different from stamina. Stamina can be recovered, but fatigue takes longer to go away. For instance when you go to the gym and your muscles are sore for three days. That’s muscle fatigue. If the Player drains their Stamina bar too much too often a Fatigue Meter builds up. And if it reaches 80% or higher (for example) the Player can no longer scale objects or surfaces efficiently or smoothly. If the Fatigue bar is at 90% or higher the player can’t run/sprint anymore and climbing anything that involves pulling themselves up like climbing a tree or the side of a building becomes impossible.

  • Player Avatar Realism
  • Realism with respect to the Player Avatar would be if the Player changed the camera angle to look at the sun and the Avatar raises an arm to shield their eyes and has to squint their eyes a little bit to protect them from the sunlight.

  • When it’s raining, the Player Avatar should blink more frequently if they’re not wearing any protective headgear to simulate the water hitting their eyes.

  • When it’s windy out, the player should quint the eye closest to the wind’s oncoming direction and tilt their head to protect their other eye and allow it to remain open as much as possible.

So that’s the kind of “Realism” I had in mind and wanted to know about. Obviously some of these things are easier to accomplish than others, but what does everyone think? Does all of this sound like it would be feasible to add to a game in unreal engine 4 or is this a stretch for someone on a budget and best left for a larger and more professional setting?

Thanks in advance, and I look forward to everyone’s responses and discussions of what kinds of things are possible and how to accomplish them!

~ Kyero

Programming-wise, none of that is that difficult to accomplish. You could create a character, with structure variables for each of his or her body parts, with health, illness, injury, fatigue, for each individual body part, and then have those variables modify the players properties such as speed, etc. Every one of the items you just mentioned comes down to keeping track of a variable or a state, and then performing actions or modifying attributes or animations based on that.

I’ve got some free time, so I’ll jump into each of your cases and see if I can help out. For your first case regarding Health, animation blending is probably what you want to look into. You would have at least 2 (maybe more) different animations for standard actions. Running normal, running injured, running near death (or something like that) and you could blend between them based on a variable stored on your character called “wellness” or “health” or something.

Re: Injuries with bladed weapons. This is something I’m not familiar with. I guarantee it’s possible, but I’m not sure how it would be implemented. Maybe with a texture decal that knew exactly where the player was hit and applied itself there. From there on, the animation system starts to get a little more complicated. You could then try using blending on a per bone basis, so for example, if the player’s left leg was injured, you would switch to “injured” animations for all actions that involved only the left leg. This way you are at least still only dealing with 2 or 3 different set’s of animations and blending between them.

Re: Lack of sleep. Pretty simple. Store a variable that ticks down if the player doesn’t sleep and ticks up if the player is sleeping, and then when it hits certain markers, you can modify the character’s max speed, and also the visual representation of that by using blendspaces to show the player slowing down. (You may want to create a new set of animations for the player being tired at this point, your call)

When any of your fatigue, health, sleep, etc meters reaches certain points, you could disable or enable booleans that allow certain actions. Maybe when your characters “muscle fatigue” meter is below 20, he can no longer climb up onto a ledge. So at that point, now his new climbing animation is that he attempts to climb but ultimately falls down panting, or something.

Player Avatar Realism:

RE: Player looking into sun. I can’t immediately think of a way to achieve this. Animation isn’t really my strong suit, but it might involve blendspaces again or even an aim offset?

RE: Player blinking. Store a level variable called “rain level” and store a player variable named “has goggles”. Then just blend between a rapidly blinking animation and a normal blinking animation, based on the amount of “rain level” and if the player “has goggles” or not.

At the end of it, none of this really has anything to do with a budget or not, but more to do with your skill with the engine and dedication to learn more about it to achieve your goals. All of this would however be achievable with blueprints and UE4 animation knowledge, and the extent to which you could polish it really depends on how much time you want to spend on it.

My advice, if you don’t know much about blueprints, start following tutorials for survival type games that go about implementing health/hunger/thirst meters etc. Think about all the variables that your character would have, and break them down into logical programming statements.

Best of luck to you!

If you added that level of realism to the player avatar, it would seem odd if you didn’t also add it to NPC avatars (including enemies). This would mean the biggest obstacle you faced would be time if you had many non-humans in the game.

I’m not sure it would add much to the gameplay for the amount of effort involved.

Literature on the “uncanny valley” is definitely well worth a read wrt realism just to get a well rounded view IMHO.