Attributes
There are three attributes that apply to player abilities, enemies, projectiles, and area-of-effect abilities (like explosions): Momentum, Size, and Absorption.
They function like Paper-Rock-Scissors: Momentum beats Size, Size beats Absorption, Absorption beats Momentum. How this dynamic is implemented depends on the circumstance, but the player can rely on the rules to figure out which strategies will work against which enemies.
Attributes can be mixed and matched as well, so an ability or enemy might have two or three of the attributes, or even one attribute magnified. Generally speaking, two combined attributes will draw with the third, be strong against the weak gem in the combination, and weak against the strong one. For example, Momentum+Size will beat Size, draw with Absorb, and fail against Momentum.
Momentum
Momentum determines how fast an object is. If it’s a projectile, the speed affects how far it can go because it interacts with gravity.
The walk and run speeds of characters are determined by Momentum given Size.
Size
Size determines how much damage the enemy can take.
It interacts with Absorb (which is a multiplier per unit of Size) to determine the Absorption value (More Size = More Absorption).
It interacts with Momentum to determine speed (More Size = Less Speed).
Each enemy’s physical size on screen will vary according to this value, within some set range.
Absorption
Absorb works by providing a sort of armor meter – say you have 100 HP, and 10 Absorb. If you are shot for 5 damage, then the absorb will lose 5 and the HP will be fine. Absorb will recharge fairly quickly on its own. With more than 10 damage, you’ll start dipping into your HP. If an enemy does absorb to capacity, then it backfires taking all the Absorb damage * some multiplier away from your HP:
You have 100 HP, 10 Absorb
Enemy1 does 5 damage to you, you lose 5 Absorb but kill the enemy. Your Absorb recharges automatically.
Enemy2 does 15 damage, you lose 10 Absorb, 5 HP, then you lose 10 * 1.1 (for example) HP, leaving you with 89 HP
The idea is that absorb will protect you only long enough to get out of a situation. If you fail to get out, you have to “pay back” the HP it saved you with interest.
The player is not absorptive (unless she’s invoked an absorption ability), it’s enemies who are. Small attacks will not work well against absorptive enemies unless you can fire them in quick succession. Big attacks will work extra well against them as their absorption of damage backfires.
Absorb interacts with Size so that the Absorb value isn’t so much a set point value but an absorptive multiplier per unit of Size. That means a small enemy with a high absorb could potentially have the same overall absorption as a large enemy with a low absorb.
Absorb will be represented on screen by color – will be a range depending on the type of enemy from no added color, to a specific color: sea goblins might be a seaweed green most of the time, but the higher their absorb value, the bluer they get.
Emergent
As much as possible, I want the three factors to interact based on formulas, not special cases. For example, with the Fire Dart ability, the dart travels farther not because of code that says:
-
if (gem1 == Momentum && gem2 = Momentum)
-
{
-
dart.MoveFarther();
-
}
But rather:
-
dart.Momentum = 0;
-
foreach (attribute in dart.attributes)
-
dart.Momentum += attribute.Momentum;
-
-
dart.MoveDistance(dart.Momentum);
That’s a trivial example, but the point is that I don’t want to hard code any behavior, I want all the behavior to interact mathematically.
