Difference between revisions of "Simple Combat in the Dungeon"
Jump to navigation
Jump to search
m |
|||
(4 intermediate revisions by 4 users not shown) | |||
Line 5: | Line 5: | ||
Section 1 : The Question | Section 1 : The Question | ||
One of the most defining aspects of a RL is | One of the most defining aspects of a RL is its combat. Who can | ||
say they don't feel the | say they don't feel the thrill of rapidly pounding a directional key until | ||
that horrid mass of white Ws is but a scattering of corpses on the floor? | that horrid mass of white Ws is but a scattering of corpses on the floor? | ||
The basics of combat are fairly simple, and below I'll summarize | The basics of combat are fairly simple, and below I'll summarize | ||
Line 13: | Line 13: | ||
Section 2 : The Foundation | Section 2 : The Foundation | ||
Our combat system will be | Our combat system will be initiated when the player attempts to move | ||
into a tile occupied by a monster, or a monster decides to attempt to eat | into a tile occupied by a monster, or a monster decides to attempt to eat | ||
a nearby player. | a nearby player. | ||
Line 19: | Line 19: | ||
the monster's statistics and abilities into account. One of the easiest | the monster's statistics and abilities into account. One of the easiest | ||
ways to do this is to combine a player's statistics, equipment and any other | ways to do this is to combine a player's statistics, equipment and any other | ||
magical bonuses he | magical bonuses he receives into two ratings, an Attack Rating (AR) and a | ||
Defensive Rating (DR). | Defensive Rating (DR). | ||
We can then take a random roll (say 1-100) and add the attack rating, | We can then take a random roll (say 1-100) and add the attack rating, | ||
Line 26: | Line 26: | ||
onions, or whatever other effect that hit might have. (See Section 3 : OW!) | onions, or whatever other effect that hit might have. (See Section 3 : OW!) | ||
The hardest part of a system like this is the balancing of the | The hardest part of a system like this is the balancing of the | ||
ratings... But then again, | ratings... But then again, that's probably the hardest part of any game | ||
design... ;) | design... ;) | ||
Line 35: | Line 35: | ||
+ Any Magical Bonuses Granted By Special Equipment | + Any Magical Bonuses Granted By Special Equipment | ||
Example of DR | Example of DR Calculation: | ||
DR = (Dexterity * 4) | DR = (Dexterity * 4) | ||
Line 49: | Line 49: | ||
The easiest way to represent health and wounds in a RL is a pool of | The easiest way to represent health and wounds in a RL is a pool of | ||
points that | points that represents the damage a player or monster can take until they die. | ||
Usually ( | Usually (thanks to D&D) these are referred to as Hit-Points (HP for short). | ||
The player and all of the monsters will have some amount of | The player and all of the monsters will have some amount of Hit-Points. | ||
(***Side Trek : Random Number Representation) | (***Side Trek : Random Number Representation) | ||
Line 57: | Line 57: | ||
Thanks to pen-and-paper RPGs (pNp), there is a common nomenclature for | Thanks to pen-and-paper RPGs (pNp), there is a common nomenclature for | ||
representing a random number. | representing a random number. | ||
If you haven't played or watched pNp RPGs, it might come as a | If you haven't played or watched pNp RPGs, it might come as a surprise | ||
that dice come in a number of different side-counts. There are 4,6,8,10,12,20, | that dice come in a number of different side-counts. There are 4,6,8,10,12,20, | ||
and even 100 sided dice... Dice that often come in varying colors, shapes and | and even 100-sided dice... Dice that often come in varying colors, shapes and | ||
sizes. | sizes. | ||
Usually pNp games represent a random roll as : | Usually pNp games represent a random roll as : | ||
Line 66: | Line 66: | ||
Y = Sides of the Dice... so: | Y = Sides of the Dice... so: | ||
A | A Yahtzee roll is 5d6... | ||
A Monopoly roll 2d6... | A Monopoly roll 2d6... | ||
Line 96: | Line 96: | ||
}; | }; | ||
(***End Side Trek : Random Number | (***End Side Trek : Random Number Representation) | ||
Each time a blow lands, that blow should subtract a number of HP based | Each time a blow lands, that blow should subtract a number of HP based | ||
Line 115: | Line 115: | ||
That, in a nutshell, is a simple combat engine for a RL. The engine | That, in a nutshell, is a simple combat engine for a RL. The engine | ||
itself is the easy part, balancing the system is what makes it fun!... | itself is the easy part, balancing the system is what makes it fun!... heehee | ||
The Author: | The Author: | ||
Line 124: | Line 124: | ||
</pre> | </pre> | ||
[[Category:Articles | [[Category:Articles]] |
Latest revision as of 01:15, 14 June 2009
Slimies Vs. Pointies - [Note: C++ Class Definitions Will Be Used Throughout] Section 1 : The Question One of the most defining aspects of a RL is its combat. Who can say they don't feel the thrill of rapidly pounding a directional key until that horrid mass of white Ws is but a scattering of corpses on the floor? The basics of combat are fairly simple, and below I'll summarize some of the most important facets of a simple combat engine for a RL. Section 2 : The Foundation Our combat system will be initiated when the player attempts to move into a tile occupied by a monster, or a monster decides to attempt to eat a nearby player. In designing our combat system, we need to take the player's and the monster's statistics and abilities into account. One of the easiest ways to do this is to combine a player's statistics, equipment and any other magical bonuses he receives into two ratings, an Attack Rating (AR) and a Defensive Rating (DR). We can then take a random roll (say 1-100) and add the attack rating, if that number (AR+RandomRoll) is greater than the DR of the target, then the hit deals damage, or saps energy, or turns the target into a plate of liver and onions, or whatever other effect that hit might have. (See Section 3 : OW!) The hardest part of a system like this is the balancing of the ratings... But then again, that's probably the hardest part of any game design... ;) Example Of AR Calculation: AR = (Strength / 4) + A Modifier Based On Class & Level (More AR for Warrior-Types) + Any Magical Bonuses Granted By Special Equipment Example of DR Calculation: DR = (Dexterity * 4) + A Modifier Based On Class & Level (More DR for Thief-Types) + Any Magical Bonuses Granted By Special Equipment We might also allow higher-level characters or nasty monsters to hit several times a round... Section 3 : OW! Once the hit scores it's time to resolve the hit. The easiest way to represent health and wounds in a RL is a pool of points that represents the damage a player or monster can take until they die. Usually (thanks to D&D) these are referred to as Hit-Points (HP for short). The player and all of the monsters will have some amount of Hit-Points. (***Side Trek : Random Number Representation) Thanks to pen-and-paper RPGs (pNp), there is a common nomenclature for representing a random number. If you haven't played or watched pNp RPGs, it might come as a surprise that dice come in a number of different side-counts. There are 4,6,8,10,12,20, and even 100-sided dice... Dice that often come in varying colors, shapes and sizes. Usually pNp games represent a random roll as : XdY where: X = Number of Dice Y = Sides of the Dice... so: A Yahtzee roll is 5d6... A Monopoly roll 2d6... If we want to represent 3 eight-sided dice it would be 3d8, 6 four-sided dice, 6d4... And so on... We might take advantage of this for our own purposes : class Die { public: void Roll( void ) { Number = 0; Type = 0; }; void Roll( int x, int y ) { Number = x; Type = y; }; int Number,Type; int Roll( void ) { int x; int acc; for( x=0;x<Number;x++ ) { acc += GetRandom(1,Type); } return acc; } }; (***End Side Trek : Random Number Representation) Each time a blow lands, that blow should subtract a number of HP based on the weapon or creature that inflicts the damage... For Example: Weapons: Dagger - 1d4 damage Sword - 1d8 damage BIG Stick - 2d6 damage Creatures: Kobold - 1d3 damage Griffon - 2d8 damage BIG Monkey - 2 hits for 3d6 damage each That, in a nutshell, is a simple combat engine for a RL. The engine itself is the easy part, balancing the system is what makes it fun!... heehee The Author: Brian Bucklew, 18 bbucklew@inteletek.com Current RL Project : Dungeon or "This game needs a new name"... :) Projected Beta Release : Early 98