Update 43

From UnderWiki
Jump to navigation Jump to search

Does that hurt?[edit]

May 8 2015

With all the talk of lava, traps and fire we’ve had in our last few updates, it only makes sense that this week we discuss how these things will actually damage players and the environment. Here are the thoughts of Jeff, our lead engineer, on how the damage system will work in Underworld Ascendant:

Doing Damage[edit]

Two weeks ago, when I talked about making things look like they were burning, I promised I’d talk soon about the other side—the actual effect that fire has in game.

A few weeks back Tim and Chris described how we are using physics to allow arbitrary interactions with thing like traps. By having a physics model of objects and forces applied to them, we can resolve most physics situations.

Damage is an analogous problem. Some things in life count as “dangerous”—fire, swinging axes, big rocks, etc. In some cases such as the rock, and to a lesser extent the axe, damage is a direct result of its mass, shape and speed. In other cases, such as fire, the damage is just an innate part of “what it does”. Just like the game has a physics system to decide how much force is applied to whom and what the result is, the game will have a damage system to decide how much damage is applied and what the results are. I did some work on that this week and have a little demo movie to share and discuss.

In our damage system there are two fundamental types (or classes for you programmers out there) of objects: ones that do damage and ones that take damage. Objects that do damage send a message to the objects they interact with that says how much damage they do. Objects that take damage receive that message and change their state based on it. Each is a property of the object in question, so these features are represented as Components in Unity. Many objects will have components for both doing and taking damage.

We realized early on that not all damage is the same. If I crush something, it has one kind of effect on an object, but if I burn it that can have a very different effect. To allow for this, a damage message has two parts. One is a number indicating the amount of damage, and the other is a damage type. Currently we have Fire, Electrical, and Kinetic (physical) damage types in the system but that list is designed to grow as we build out the game.

The swinging axe in the video has a component called DoesCollisionDamage. This component figures out damage based on the weight of the axe, its relative speed at the time of collision, and a hand tweaked multiplier that models the effect of a blade versus a blunt surface. It sends a kinetic damage message to the crate it is hitting every time it collides.

The crate actually has child game objects each with their own component to receive damage messages. This component can have a list of “resistances” that reduce the damage taken. Each resistance applies to one of the damage types and has a number to be subtracted from the damage and/or a percentage to reduce it by. Resistances might represent an object’s innate toughness, armor or magical resistance. Every child object also has its own pool of hit points to which to apply the damage.

The crate starts with only the first child enabled and visible. When the hit points of that child reach 0, it disables itself and enables the next child-object in a pre-defined sequence. Thus the box goes through 3 states of increasing damage before eventually being destroyed by the axe altogether. You can imagine how, in game, you might temporarily block a trap this way, but you has better get through it before the object is destroyed and the trap starts working again!

We have another message in the system called took damage. This gets sent by component to its own object after resistances have been calculated with the final damage taken (if it is more then 0). In Will’s trap video last week, the red screen flash when he ran into a trap was the result of a component that receives the 'took damage' message and flashes the screen in response.

Update TookDamage.png

Ouch, that hurts!

In addition to the axes, the demo video shows two more crates next to each other, a red one and a brown one. The red one is “explosive”. This is an example of a game object that both takes and does damage. Receiving any took damage message will cause it to explode, in turn doing more fire damage to all other objects within a set radius.

The truly important thing to realize throughout the demo is that none of the inter-object interactions were hard coded. Each object only knows its part of how to react to the situation. The results come from their proximities and interactions. All we need to do, for instance, to make objects burn in the final game is give them the combustible component. You can expect that a great many things will be burnable in the Underworld, not always where and when you want. You will be able to pile up burnable things and make bonfires, burning defensive lines or ad hoc torches. You will be able to jam things in traps, but they had better be strong enough to survive the trap damage or they won’t last long. You will be able to drop heavy movable things on creatures or other objects and damage them.

Like everywhere else in UA, we provide you with the parts that make up a sensible world. What you do with them will be up to your own imaginations. We are looking forward to seeing what you come up with!

Lead Engineer Jeff

Other Stuff[edit]

Dave-flamburis.jpg

OtherSide Entertainment is elated to announce that Dave Flamburis has joined our team as Art Lead! Dave is an industry vet having worked with studios such as Harmonix, Papyrus and Demiurge. He has worked on over 30 shipped game titles, including Bioshock Infinite, Rockband, Borderlands, Medal of Honor, and most recently contributed to the upcoming Adrift game. Dave is especially expert in 3D modeling and environments.

Dave has already amazed us with his early takes on what the Underworld will look like, and we can’t wait to share his vision with you all over the coming weeks and months. Please join us in welcoming him aboard this crazy train!

Underworld Ascendant-Player Characters.jpg

With over 375 votes cast in the “What type of character do you anticipate playing?” poll in the forums, we think it’s safe to say that thief-style characters are the clear favorite. Sneaking through the Underworld and picking some pockets along the way is clearly a play style people enjoy. Throw in some backstabbery and trap disarming and, for 32% of you anyways, we’ll have made the perfect game!

Wizards were also high on the list, with 26% of you wanting to master the arcane arts. Judging from the comments, a lot of folks actually want to combine the two archetypes into a magical-thief type character. We can’t wait to see the Underworld’s equivalent of the Gray Mouser!

Fighters came in the lowest, with 17% of our fans wanting to smash their foes with huge battleaxes and yell fearsome battle cries. Most people, it seems, want to blend their fighter-y characters with some thievery or magical means, making them a bit more well-rounded.

Luckily, the Underworld Ascendant character creation system will give players great leeway in creating characters from any or all of these archetypes, so all preferences will be supported. It’s great to see folks already thinking about what they want to be in the Underworld, and this poll has helped us internally to realize how strong and desired our “open ended” character creation system is as a feature.

So, we’ll give you the tools… amaze us!

The OtherSide Team

External Links[edit]