Home > Game Development > New Battle System

New Battle System

So, I came up with an idea for my Battle System for my RPG. Currently, the battle system is just a series of comparisons of the attributes between the two fighting Units. For example, the system works like this:

  1. Take the two Units’ Initiative attribute and modify slightly by a random number, then compare. Whichever is higher will attack first.
  2. Compare the Agility attribute of the attacker and defender. If the attacker’s Agility is greater than or equal to that of the defenders’, the attack is successful.
  3. If the attack is successful, take the attacker’s Attack attribute and subtract the defender’s Defense attribute, then subtract that total from the defender’s Health.
  4. If the defender’s Health is less than or equal to zero, announce the attacker as the winner, and exit the battle system. If the defender’s Health is greater than zero, continue.
  5. Repeat step 2 with the attacker and defender switched.

During this entire process the user does not interact with the game, they just sit back and watch whether or not their attributes are higher than the opponents.

For the new Battle System, the user will create a battle sequence prior to each round. As the user advances in level, the length of their battle sequence increases. The enemy Units in the game have levels as well, so their battle sequences will be dependent on their level as well. There is no set amount of rounds; however many it takes for either of the Unit’s Health to reach 0. This system allows for Items to be taken into account (once they’re added) as well as different Classes (once they’re added). The idea of the battle sequence is this:

  • Say both the user and the enemy are low level, so their battle sequence only has length 4. Prior to each Round, the Units decide their 4 actions (separated by a space) for that Round. The actions are pretty basic–either attack or block–but directions or parts of the body are required. For example, the user might choose their battle sequence to be: blockLeft slashLeft swipeRight blockRight (I will explain these later)
  • Once both Units have chosen their battle sequence, each action is compared with the opponents action, and they are executed simultaneously. For example, the first action the user has selected is blockLeft, and the first action the enemy has selected is swipeLeft, then the user would have blocked the opponents attack.
  • If an attack is not appropriately blocked, the defenders has a chance to evade the attack, which is their Agility attribute modified by their armor’s weight. If a hit is made, then Unit that was hit will lose an amount of Health equal to the attackers Attack value (which will be their Strength attribute plus their weapon damage) minus the Unit’s Defense value (which will be their armor’s defense value, if any, for that part of the body). Once the Health has been deducted, continue with the comparisons.
  • Once all of the battle sequences have been parsed, if both Units are still alive, the user will once again enter in their 4 actions for the next Round, and the enemy will do the same. This process will continue until one Unit is dead.
  • The possible actions will be:
    • slashLeft – a slash at Left shoulder/neck
    • slashRight – a slash at Right shoulder/neck
    • swipeLeft – a swipe at Left side of torso
    • swipeRight – a swipe at Right side of torso
    • blockLeft – a block that covers entire Left side
    • blockRight – a block that covers entire Right side
    • (With the inclusion of other Items such as Potions, there will be actions to consume/use those Items)
  • Since each attack corresponds with a particular part of the body (left side of shoulder/neck, right side of shoulder/neck, left side of torso, right side of torso), the inclusion of Armor will be able to include various pieces. As of now, with these attacks, the pieces of armor would be:
    • Helmet/Head
    • Pauldrons/Shoulders
    • Torso/Chest
  • Different types of weapons (Sword, Axe, Mace, PoleArm, etc.) could allow for different attacks. For example, you could thrust with a Sword or PoleArm but not with a Mace or Axe. This concept will not hold high priority as I plan on it introducing a lot of headaches, so this will be in the distant future.
  • As the levels of the Units increase, their battle sequence increases in length, allowing for more actions per Round. This may seem unnecessary, but when the combating Units have different levels and different battle sequence lengths, the Unit with the longer battle sequence will continue to execute those actions while the weaker Unit is helpless. At this point, there are no comparisons made between actions; if a Unit attacks, they hit, since the defender does not have a corresponding action. For example:
    • User has a battle sequence of length 6, they choose – blockRight swipeRight slashRight swipeLeft blockRight swipeRight
    • Enemy has a battle sequence of length 4, they choose – blockLeft blockRight slashRight blockRight
    • The outcome for Round 1 would be:
      • Action 1: Both Units blocked, nothing happens
      • Action 2: User swipesRight and Enemy blocksRight, no damage done
      • Action 3: Both Units slashRight, calculate if either Unit dodges, and subtract Health accordingly
      • Action 4: User swipesLeft and Enemy blockesRight, the attack is not blocked, calculate if Enemy dodges, subtract Health
      • Action 5: User blocksRight, Enemy has no action, nothing happens
      • Action 6: User swipesRight, Enemy has no action, calculate if Enemy dodges, subtract Health accordingly
  • The battle sequences will be a part of the Unit class and stored in a vector to allow for dynamic resizing (a character levels up and their battle sequence increases).

Well that seems to cover everything, once I realize details and specifics I will add them to this post. Now I just have to hope that I can find the time and energy to add these new features, which I think will add a huge level of interactivity and fun to the game. Thanks for reading!

Advertisements
Categories: Game Development Tags:
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: