Thursday, January 31, 2008

From CCG to RPG: Brainstorming... Part 1!

Note: This is a random and convoluted article that requires both an understanding of collectible card games, specifically Magic: The Gathering and conventional online RPG's.

One of my most major desires is to experienced a skill system in an RPG that is complex and customizable to me. I am a Johnny/Spike, which means I like to win (Spike) and I like to find interactions and explore dynamics so that I can express my creativity through the system (Johny.)

One thing I've noticed is that Collectible Card Games speak to the imagination of us all. If only there was a way to take gaming card concepts and have a RPG skill system that would capture it...
...so you know what, I'm going to try. I'll take each mechanic I can think of and turn it into a skill that you might find in an online massive multiplayer RPG.

1. CCG - Kindle: "Deal 2 + X damage to target creature or player, where X is the amount of cards named Kindle in the graveyard."

What is a graveyard in an MMORPG? A Graveyard in the CCG represents a list of spells cast and a list of spells that have no effect anymore. Therefore, the easiest way to think about it is that the graveyard is a way of keeping track of spell history. Therefore...

RPG - Kindle: Deals 2 flame damage to a target. You gain 1 bonus damage to every Kindle spell cast until you exit combat. This bonus stacks up to X times.

Fairly straightfoward, I think. Each time you cast Kindle, your Kindle spells are more awesome until you finally kill the thing you were trying to kill. It doesn't capture the interaction of when other players cast Kindle, thus boosting your own Kindle. We could do this by changing the spell slightly.

RPG - Kindle 2: Deals 2 damage to a target. Then, each creature or player within 30 meters is afflicted with 'Scorched' status which increases damage they receive from Kindle by 1. This effect lasts until end of combat.

This isn't quite as elegant as the previous incarnation, but it does capture more of the original interaction.

2. CCG Discard Spell - Target Opponent discards two cards (at random)

What is a card in the MMORPG sense? It is something like a skill or ability. Therefore, the most elegant way I can turn this is...

RPG Discard Spell - The next two skills that the target attempts to start using become disabled for 30 seconds. (Or, two random skills from the target become disabled for 30 seconds.)

While at first glance, this seems a little weird, I think it captures the feeling of discard pretty well. There's some timing interactions to this that could be bad, but on the whole, it captures the feeling of discard in a way that I need for the next interaction..

3. CCG Madness - When this card is discarded, you may play it for madness cost instead.

See where I was going?

RPG Madness - If this skill is disabled, you may still use this skill except that its cost is now its Madness cost instead. You may only use this ability once for each the time the skill is disabled.

Given better templating, I'm sure it would sound nice and even.

4. Flashback - You may play this card from your graveyard for its Flashback cost. If you do, remove it from the game.

Nice.
What's worse than having a spell in the graveyard? It not being in the game at all. What's a game in RPG terms? One combat. What does it mean for something to not be in the game? Not being relevant to combat ever, any longer.

RPG Flashback - You may play this skill while it is temporarily disabled or cooling down for its Flashback cost. If you do so, the skill becomes permanently disabled until end of combat.

Tuesday, January 29, 2008

The Setup: RPG-style.

This article is a spiritual successor to this one.

I talked about the setup in the previous article, which is when a little bit of work allows you to create some very cool interactions in the future without any previous work. Let's start by drawing obvious crossovers from the CCG world into our RPG world.

Just for reference, the card was a card named 'Arcane Blast.'

Arcane Blast deals 1 arcane damage to each opposing ally or player. Draw a card for each damage dealt this way.

1. Keying off Keywords: "Deal ARCANE damage..."

From the card, we can see that we are able to reference the type of damage on the card. This is easily translated in RPG terms and has been done so for many years. The idea of damage 'types'.

For example, instead of having a skill do damage, have it do fire damage. Then we can create things like: Resistance to fire damage or Weakness to fire damage.

So a monster could take more damage from fire or less damage from fire. This is a fairly obvious change.

The second thing that we noticed, was that now we could boost the damage of the skill without mentioning the skill directly. Then, we can create things like: Bonus to all fire damage dealt, or Double all fire damage.

So our fire mage could learn some passive that could increase his damage dealt, or multiply it by a factor of two or something.

Thirdly, we realized we can create things that can trigger off the type of damage. Then, we can create effects like: Chance to set target on fire or Dispelled when hit by fire.

So our fire mage could learn a skill that could set his target on fire if he hits him with fire damage, sort of a burning effect added onto all his fire skills. Or suppose that our fire mage has encountered an evil tree monster, protected by thick layers of bark. Then we could make the protective layers of wood burn away when hit by fire damage, making the tree much weaker.

Each of these interactions would force the player to reconsider what fire damage actually means, whether or not fire damage is an appropriate response to what he is doing, and what other skills/effects can interact with his given mode of damage.

2. Area of Effect: Multiple Targets, "Deal Damage to EACH ally / player..."

In the Card World, we can let a card affect multiple targets. In the RPG world, this becomes the notion of 'Area of Effect.' We can increase the complexity of interaction by specifying what kind of Area of Effect interaction the spell can have.

For example, the most generic effect is Spherical. The damage is spread out among a sphere, like an explosion. This is the most commonly seen area of effect spell and increases complexity by encouraging the player to bunch together groups of monsters. Our fire mage would like to see tight packs of monsters.

An interesting twist on the Spherical Area of Effect is the Point-Blank Spherical Area of Effect. This is the type of Area of Effect spell that is High Risk / High Reward, as it rewards the fire mage for being at the center of all the monsters.

However, the RPG world has a great deal more targeting shapes than the real world. Consider the wide multitude of area of effects:

Piercing (A straight line, like a bullet that goes through people)
Conical (A cone extending outwards from the caster, like a cone of flame)
Chaining (Bouncing from monster to monster, like electricity or chain lightning)
Spherical (Extending radially outward from the initial point, like a fireball)
Spiraling (Imagine a Spiral slowly spinning outwards)
Wave (Everything in front of me, like a tidal wave)
Random X (Randomly hitting X targets. Imagine a chaotic lightning storm)

These interactions force the player to think about what time he attempts the spell, as well as what position him and the monsters are at. They reward the player for being in the right place at the right time, or maneuvering the situation to be just right.

3. Triggered Effect: "Draw a card for each damage dealt."

This type of effect generally doesn't translate well into the RPG world's flavor. The notion of a 'card' does not have an clear analogy in most RPG worlds.

What is important however, is that the spell or ability itself is attempting to reward the player for maximizing a specific behavior, in this case: Damage. Translated as literally as possible, this would be a spell that reads something like follows:

Fiery Explosion
Costs 20 Mana to Use:
'Deals 1 damage to all enemies in a 30 foot radius. You gain 2 mana for every damage you deal.

This spell would be somewhat interesting in a game. It would be a spell that is only usable when there are large hordes of monsters. It scales extremely well to handling a large amount of monsters, as it costs the fire mage essentially nothing to cast. However, if there were very few monsters, the spells effects would be drastically reduced.

However, imagine the damage boosting interactions that was previously mentioned. This spell would also be extremely cheap to use if our fire mage could somehow double his damage. It would also be extremely cheap to use if our fire mage hits something that is weak to fire. If our opponent was somehow able to magically shield himself, preventing the damage, then our fire mage would be unable to regain mana.

Additionally, if our fire mage was careless and missed the spell, it would cost him a lot more mana than if he had only hit a few targets.

All these interactions come from rewarding the player additionally for something he wants to do anyway. The fire mage obviously wants to deal damage. Then, if we add an additional trigger based on what the fire mage already wants to do, it adds a layer of interactivity as the player seeks to maximize the benefit of that trigger.

4. Risk / Reward and Target Limitations: "Deal damage to each opposing allies and player."

Recall that the card restricted you to damaging opposing characters. In most RPG's generally you do not want the player to have the ability to damage allies. Normally, that would be that. If we let players hurt players who are supposed to be their friends, no end of trouble could happen.

However, if you think about it, dealing damage to your own creatures in a card game essentially means hurting yourself, not other friendly people. Thus, the analogy we draw from this is the self-harming spell.

For example, we could have our fire mage cast a Fiery Explosion so deadly, that it also incinerates him as well as the entire room of monsters. This then poses a question to the fire mage: Can he survive his own spell? Will it be effective enough to ensure his survival? Is there something he can do to mitigate or nullify the damage to himself, making the spell one-sided?

Additionally, by letting spells be able to target the caster itself, brings up more interesting interactions. For example, the fire mage might think twice about doubling his fire damage through some ability because this would mean that his Fiery Explosion would ALSO deal double the damage to him!

These ask the player if he would like to trade security for a powerful effect. How close to destruction do you wish to walk? Can you handle a momentary set-back in exchange for a great effect?

5. Putting it all together.

So compare....

Magic Bolt
Cost 20 mana to use
"Deals 1 damage to targeted monster."

...Boring.

Fiery Explosion

Costs 20 mana to use:
"Deals 1 fire damage to the caster and monsters within a 30 foot radius. Gain 2 mana for each damage dealt this way."

This is a spell that can be boosted or reduced by abilities that care about fire damage. But he needs to be careful because it also hurts him. However, if it hurts him more, the spell will cost less, as he will have dealt damage to himself and gained mana back. Addi tonally, the spells gets maximum benefit when the caster is surrounded by enemies because of the type of area of effect it is. This entails more risk as to get maximum benefit, he puts himself in a dangerous location. However, he is rewarded with an essentially free spell, if he puts himself through all the trouble.

Phew. All those things to think about with a single spell made from a single card! Imagine what you could do with all the other examples out there in the world. All those interactions are because the spell thought a little in advance and set up interesting interactions down the line.

Saturday, January 19, 2008

Adding Complexity: The Setup

There is a formula for writing in which authors pen in character or plot events that they themselves don't know how to end. They leave loose threads dangling in the hopes that it will be useful there. How many ominous shadows have you counted in your favorite TV-shows, only to have them be explained away simply or never mentioned again? How many dangling plot threads seem to be hanging off, never explained? Now how many of those ominous shadows or mysterious threads came back to grand effect, making the entire affair seem like a brilliantly orchestrated concerto?

This is a simple technique in which I will call 'the setup.' It is a method of opening up the complexity with a tiny bit of extra work at the outset.

Take this card from the World of Warcraft trading card game:

Arcane Blast deals one arcane damage to each opposing ally and player. Draw a card for each damage dealt this way.

The first part of this ability is a generic ability that anyone could think of. Hit someone for one point of damage. Then, you draw a card to replace the card you just used. However, compare that ability to this one:

Lunge deals one damage to an ally or player. Draw a card.

In a vacuum, Arcane Blast and Fire Bolt do the exact same thing. They both do a single point of damage to the opposing player and allow the user to draw a card. However, games are not played in a vacuum.

There are four key differences between the two cards. One is obvious, the other three, far less so.

1) Mutiplicative Effects: Area of Effect

The first obvious difference is that Arcane Blast deals one point of damage to every opposing ally. This makes the spell an Area of Effect spell. However, note that you draw a card for each point of damage you do, thus, not only is it better to hit multiple enemies with the Arcane Blast, it lets you draw a card for each damage dealt, significantly increasing the reward if there is more than one target to hit.

This kind of setup asks the question: Should I wait or should I apply the effect now? Maybe there will be greater payoff later.

2) Additional Clauses: Negation or Boosting

Consider if your opponent has the following effect:

Negation: Prevent all damage that would be dealt from the next source that would deal damage.

Now playing Arcane Blast becomes a little more tricky. In order for you to draw a card with Arcane Blast, you must *deal* damage first. The little "setup" clause enabled a deeper interaction with other effects in the game. Will you play some other card first to absorb the negation? Will you simply wait the shield out before blasting him with Arcane Magics?

Even better, if my opponent attempts to cast Arcane Blast against me, in the hopes of drawing a card, if I can somehow prevent that damage with a shield, I will prevent that player from drawing a card. Arcane Blast as a card also creates more interesting choices for your opponent as well as the player playing Arcane Blast.

This kind of setup asks the question: Is there some sort of interaction can happen *at the moment* to boost or negate my move?

3) Keyworded Damage Types: Arcane

Alternatively, consider if your opponent has the following effect:

Weak to Arcane: Takes double damage from Arcane Sources.

Because the damage type was keyworded, it was able to be referenced by other sources. This is a fairly intuitive concept that is very easy to miss. The ability to reference damage types allows for crazy interactions later on down the line. For example, one could now create this card:

Reckless Arcane: Whenever you deal damage with an arcane source, double that damage and you lose 3 life.

Note that casting Arcane Blast with this card active will most likely kill you. But then, you'd also double the amount of cards you draw and the amount of damage you deal. Trade-offs and choices...

This kind of setup asks the question: What kind of scenario will I be in? What kind of planning and synergy can I add to boost my effects.

In all fairness, this kind of effect could be done with Lunge, it's not hard to imagine a card like:

Weakness to Damage: This card takes twice as much damage from all sources.

But on the other hand, this kind of card is generic and all too often involves too many uncontrolled interactions. Additionally, it also feels kind of bland and overdone on the complexity side. It is also harder to justify from the perspective of flavor as, what exactly is a weakness to damage? If he was weak to damage, wouldn't he just have lower health? Weakness to Arcane fits better and 'feels' more right.

4) Targeting Restrictions: Limiting or Expanding Choices

Arcane Blast is actually *less* interactive in one regard, than Lunge. It has the choice of limiting your targets to Opposing ones. Arcane Blast doesn't actually let you kill off friendly allies.

Although, most of the time this is very desirable, it is interesting to note that by making the card more user-friendly, we have also limited the interactivity of it somewhat. A quick example should illustrate the point well enough:

Let's say I have just cast Arcane Blast upon my opponent's character while he has a character with one hit point. If the opponent has lunge, he has the option of destroying his *own* character with lunge before my Arcane Blast hits him, by responding to my Arcane Blast with his Lunge. He can do that because Lunge allows you to hit anyone, not just opposing allies. Since his character dies before I did damage to it with Arcane Blast, I don't draw a card for damaging him.

A simple setup can inspire a lot more interactions and complexity. Later on, I'll discuss my own musings for transporting this mechanic into other game types and take it out of the context of card games.





Thursday, January 17, 2008

Exponential Math and Games.

Note: This post is a spiritual follow-up to an earlier post, which can be found here.

Exponentials are hard to understand.

Most of us understand instinctively how big 100 is compared to 10. If I gave you 10 dollars a week for a year, you'd have a fairly decent grasp of how much money you'd have at the end of the time period. 10 x 52 = 520.

What if I gave you a choice? I could give you 10 dollars a week for a year or instead, I would start by giving you a dollar each week, and I would give you a 10% raise every week for a year, how would you respond? On the one hand, 520 dollars is relatively easy to understand. But starting with one dollar and going 10% bigger every week.. that seems rather small compared to 520 dollars, no? I mean, how big could that dollar get?

Fast forward to 51 weeks from now, and realize that you would get 142 dollars on the 52nd week. In total you'd rake up about... 2000 dollars for the last 4 months alone. Raise your hands if you guessed anywhere near that range.

Some of us have some grasp that exponentials tend to grow out of hand really fast, but the human mind tends to be really bad at grasping exactly how much those exponentials will be. We tend to dramatically overshoot or undershoot our guesses. Part of it is due to the complex and compound math involved but there's some evidence to suggest that it is hard-wired into our systems. Human beings tend to live for the immediate moment and look towards the future in a linear fashion.

So, what does this have to do with games? It has to do with the difficulties in grasping what is truly effective at first glance. It has to do with balance and the interplays between choices in games.

Qualitative Example: Contra

If you have ever played a little gem called Contra, perhaps you've noticed a slight discrepancy in the weapon power-up selection. It has to do with a weapon dearly beloved and known as 'Spread' or 'Shotgun.'

For those of you unfamiliar with the Contra series, imagine you have a tiny little pistol that can shoot one bullet a second.

One bullet a second seems reasonable.

Now, we could improve your gun in several ways. We could make the pistol fire more powerful shots, like say, a flaming shot. Or we could make your pistol fire faster and fire many bullets at a time.

One powerful fireball a second seems reasonable.
Several bullets a second also seems reasonable.

In practice, the machine gun is somewhat more effective than the fireball weapon simply because increasing the Rate of Fire on a gun is far more effective as the shots can hit multiple targets and sometimes a fireball is simply overkill on a small enemy (like a chicken.) The discrepancy isn't very high, however, as the fireball's sheer stopping power and 'fire and forget' mentality makes up for the versatility and ease of use of the machine-gun.

Now, let us examine the 'Spread' or 'Shot' gun. This is meant to be a slightly rarer power-up than the machine gun or fireball power ups. So, maybe we can make it a little more powerful. But not too much.

The 'Spread' gives you the ability to shoot out three balls every half a second. These balls are pitched at an angle to give it a wide arc of attack. The Spread gun can't really attack a single enemy since the balls spread out in an arc, and so it is less powerful than a machine-gun at long range and somewhat more powerful than the flame-thrower at close range. These balls are slightly bigger and stronger than the machine gun shots, but nowhere near as powerful as the flame shot.

This seems like a reasonable power up, in comparison with the machine gun and the flame shot weapon, no? It fires slightly more shots, slightly faster, for slightly more damage and is slightly safer. This seems on far with the ridiculous firing rate of the machine gun or the superb damage of the flame thrower.

However, in practice, any Contra player would tell you that the 'Spread' gun is the weapon of the game. This is in part due to the fact that although the 'Spread' guns *damage* is about equivalent to the flame thrower or the machine gun (In reality, the spread gun is slightly less damaging than either of the two) ; the fact that the spread guns *arc* gives the player far more survivability. It also shoots faster than the flame shot with about the same power as the flame-shot up close if all 3 shots connect.

What gives? Each individual ball of the 'Spread' is far weaker than a single fire shot. The 'Spread' gun fires slower than the machine gun which literally is an unending hailstorm of bullets. The 'Spread' guns marginally safer attack angle doesn't seem to make it *so* much more powerful than the other two. What gives?

It is again, the power of exponential math.

The Spread Gun is faster than your regular gun.
The Spread Gun has slightly more powerful bullets.
The Spread Gun shoots more bullets at once.
The Spread Gun lets the player survive longer by not having to be in the direct path of fire.

The combination of all four gives the final weapon a dramatically increased value in relation to everything else. Imagine each bonus as a numerical value.

The machine gun would increase your rate of fire 5 to 7 times. This would mean that roughly speaking, it is 5 to 7 times better than your old gun.

The flame shot increases your damage 6 or 7 times over. This would mean that roughly speaking, it is 6 or 7 times better than your old gun.

Let us perform a very very rough analysis of the spread gun's benefits, however.

The Spread gun only doubles your rate of fire. (2x) However, it lets you shoot 3 balls at a time (3x, Running Total: 2x * 3x = 6x). It can't hit a single target with all three balls which costs it some points. Usually, you'll only be able to land 2 out of 3 balls on a target. However, the third ball might actually hit something else as a nice bonus. (2/3 x, Running Total: 2x * 3x * 2/3x = 4x) However, these pellets are also stronger than your regular gun's pellets, they are about twice as strong (2x, Running Total: 2x * 3x * 2/3x *2x = 8x). And the 'Spread' gun lets you survive a lot longer against bosses by not putting you in the direct line of fire, maybe even twice as long. (2x? , Running Total: 2x, * 3x, * 2/3x * 2x * 2x? = 16x?)

And so we have a gun that, roughly speaking, is about a hojillion times better than your pellet gun and 3 to 4 times better than the machine gun. The cumulative effect of small incremental bonuses (slightly faster speed, slightly more damaging shots, slightly more shots) gives the final effect a huge boost in the end.

Linear vs. Exponential: MMORPG's

What is more effective in an online MMORPG to be the best player? Raising your attack speed? Raising your chance to hit? Raising your chance to dodge attacks? Raising your chance to block? Raising your raw damage potential? Raising your chance to critically hit?

Let's say I could choose to choose to improve 3 attributes by 100% -or- two attributes by 150% -or- one attribute by 300%.

So I could double 3 things, or 2.5 x two things, or quadruple one thing.

On the surface, this seems fairly intuitive and straightforward.

However, in practice, this is what happens.

If someone swings twice as fast, and hits twice as often and hits twice as hard, he will be doing eight times the damage. He will not be doing (100% + 100% + 100% + 100% = 400%) damage, he will instead be doing 800% damage.

If instead he simply chose to quadruple his damage, he would only be doing 4 times as much damage.

What if we could distribute things farther? What if we could improve 6 attributes by 50%.

So I could swing 1.5 times as fast, hit 1.5 times as often, hit 1.5 times harder, hit 1.5 times critically, dodge 1.5 times as much, take 1.5 as many hits. I would be twelve times as effective as someone else on average.

This is the insane power of exponentials, something that's not quite easily grasped. The difference between offering the player a choice of doing a few more points of damage, and attacking slightly faster, realize the difference between a small linear boost and an exponential percent based boost. If balance is your goal, then you need to carefully consider how different exponential gains will produce dramatic increases in power that need to be accounted for.

So the next time someone offers you to double your damage or double your speed, instead ask for 50% more damage and 50% more speed. This will give you a net increase of 25% over merely doubling one or the other.