Combat Engine

Combat Engine

Postby die Feder » 25 Apr 2015, 16:58

Hi,

I'm looking for feedback for my new project. Before i start to develop, i want to know if somebody needs this tool.

Many rpg-games have a different and complicated calculations for parameters like damage, life points, drop rates of items. But there are also other games, non rpg games, that use this calculations. The are many tools and game engines that provide you help with sound/music, input, physics and network communication. But i couldn't find a tool to calculate damage, so i had the idea to develop this tool.

My question are: Do know of some tools to calculate damage? Do you need this tool? Do you think, damage calculation tool()s could be needed by many game developers?
die Feder
 
Posts: 2
Joined: 25 Apr 2015, 16:45

Re: Combat Engine

Postby eugeneloza » 27 Apr 2015, 08:55

I think it's the problem - everybody uses his own damage calculation because its a derivative of a complete RPG system used in the game (armor set, weapons, boost items, spells, etc.) I.e. you may create your own system that might get popular and be used in many games. But it won't be only 'calculate damage' but a guideline to determine the items/spells/characters characteristics.
I.e. its something like this:
Hero has an emerald sword and STR attribute that determine 'raw damage'. Monster has ironplate armor and natural weapon resistance that determine 'damping'. Moreover, hero has DX wich determines to-hit chance, and the monster has AG wihich is his evade factor. Moreover, hero has cast a 'bless' and 'holy weapon' spells which increase his raw damage and to-hit chance plus 'enchanted weapon' spell which ignores monster armor and resistance. Moreover monster has cast shadow on himself which increases its evade factor and casted Curse on hero, which halves his raw damage. Moreover, monster is located in his natural habitat (the swamp) which gives him additional initiative boost and raises his evade factor. On the other hand its night and no moon in the sky (or cloudy) so it's very dark which almost doesn't affect a feline hero whith night vision skill and dramatically affects monster to-hit chance because its day-creature. Moreover, monster has additional damage by acid, which ignores (and destroys) the armor and is handled by heroe's protective 'Earth elemental ring'... etc, etc, etc.

So I think that damage calculation tool is useless on its own. But as a part of a complex (or not a very complex) RPG system it would be a great addition to an existing (RPG) game engine.

Do know of some tools to calculate damage?

Not tools but guidelines like ADnD.
Do you need this tool?

No, my upcoming RPG game uses an extremely complex damage calculation system which has to be created. There are 1000 game factors that affect the battle and they cannot be 'confined' to some external tool.
Do you think, damage calculation tool()s could be needed by many game developers?

On its own - no. As a part of some game engine - yes, but not many. IMHO.
User avatar
eugeneloza
 
Posts: 500
Joined: 22 Aug 2014, 12:15
Location: Ukraine

Re: Combat Engine

Postby c_xong » 28 Apr 2015, 00:45

Isn't this what spreadsheets are for? Even ignoring those combat systems that are too complex to be done easily in spreadsheets, since spreadsheets have a lot of features already, you'll have your work cut out to reach feature parity. Perhaps this would be easier: create a series of spreadsheet templates, implementing combat systems of popular RPGs, so amateur designers can get started quickly.
User avatar
c_xong
 
Posts: 234
Joined: 06 Sep 2013, 04:33

Re: Combat Engine

Postby CruzR » 28 Apr 2015, 13:58

I actually once thought about creating such a tool myself.
However, I came to the same conclusion as c_xong - that in order to be useful, it would have to have a fair amount of features:

  • Being able to create your own damage system is a must.
    That means you'll need to add some scripting language (I'd suggest Lua or Python).
    It also means that your program needs to handle custom attributes (you won't know how the user wants to calculate damage).
  • In most systems, what really counts isn't just pure attack damage, but rather skills/spells/whatever and how these interact.
    That means that your tool needs to know not only the stats of the attacker and the defender, but also the actions that both of them take.
  • Once you've got these in place, you'll want to build extensive statistics on top of it (otherwise, your tool wouldn't really have any value.)

As you can see, it would already be quite a lot of work for you. But worse, it would be quite a lot of work for your users as well
(they'd basicly have to reimplement their combat system completely within your tool), which might seriously limit adoption.

Here are some ideas to mitigate this flaw:

  • Provide a library (or engine) that uses the same scripting interface as your tool and that users can integrate into their project.
    This way, they only need to write their combat system once (in your tool) and reuse it for the game.
  • Alternatively, instead of writing a standalone tool, provide a library containing only the statistics code.
    Users can then integrate this into their game, they'll only need to calculate the damage themselfs.
  • Or define some simple IPC protocol for damage calculations and a library shim that makes it easy to use this.
    Your tool would then fire up the game, let it do the damage calculations and analyze the results.

IMHO the last version would be the most elegant - this way, the game is completely separate from
your tool and it doesn't matter what language/framework/engine is used to implement the game, as
long as it can access the IPC mechanism (just use something that is
accessible from just about any language, like stdin/stdout or TCP sockets).

But anyway, I don't want to disencourage you from trying to create a damage calculation tool,
just curb your enthusiasm a bit and make sure you understand it will probably be a lot of work.
CruzR
 
Posts: 9
Joined: 15 Apr 2013, 15:53

Re: Combat Engine

Postby Vandar » 06 May 2015, 15:10

Damage calculations seem to be pretty straightforward to me. I wouldn't want or need some tool for that. Usually I set up a number of attack effects, defensive effects and then fit it all together in a sensible way. Also, combat will be different in each flavor of game, actually it defines most games with combat, so one wants to make it as special as possible, to give the player a unique impression tied to this one game.

The really tricky parts seem to be figuring out the right attack effects (as in mechancis, not visuals) and defensive effects that fit bets to the game in question. The math isn't the problem.
In soviet russia, code debugs you.
User avatar
Vandar
 
Posts: 318
Joined: 17 Mar 2014, 14:32

Re: Combat Engine

Postby DGMurdockIII » 18 May 2015, 19:19

How to develop RPG Damage Formulas? - http://gamedev.stackexchange.com/questi ... e-formulas
DGMurdockIII
 
Posts: 50
Joined: 03 Feb 2010, 17:47

Re: Combat Engine

Postby eugeneloza » 19 May 2015, 08:48

Well... developing RPG Damage Formulas is very easy. The problem is developing INTERESTING formulas: balanced, easy to tweak by the developer, obviously understood by the player.
I.e. you may have the most easy stuff:
DAMAGE = STRENGTH / ARMOR > 1;
So, when heroe's armor gets 100, low-level opponents cannot hurt him. Unbalanced.
DAMAGE = STRENGTH - ARMOR > 1;
The same here. At some point low-level opponents cannot hurt him. Unbalanced.
But many really just leave this simple formula.

Another approach.
Throw the dice, add strength substract armor & resistive dice. Wait... dice? 2015?
But balanced and interesting ADnD mechanics.

Now I'm working on Decoherence battle mechanics... and 'calculating damage' is the most simple stuff to do.
There's a skill, it has active&passive perks plus resistive perks, plus overall character perks and modifiers. There are weapons and armor characteristics. There are character's stats. They all, up to a dozen of them, come together to one single number: calculated damage. I really doubt it can be covered by any possible universal damage calculation system...
User avatar
eugeneloza
 
Posts: 500
Joined: 22 Aug 2014, 12:15
Location: Ukraine

Re: Combat Engine

Postby die Feder » 31 May 2015, 15:45

Thank you for the feedback.

I see two problems i have to solve:

1. How to create different formulas for different requirements, which are balanced?
It is a problem of math. I can use different formulas and show the range of values for balanced damage calculation. There have to be one or more values in the formule, which make the calculation scalable. If not i will add one.
At the end i want to have one or more formulas for diffenrent grow rates of values like defence or attack.

2. How to integrate the calculation.
At the beginning I can start using excel so I can easily test the formulas.
Then I want to create a kind of code generator. This generator creates the code depending on the diffenrent parameters (attack, defense...), the growth rate and other information. This code can be integrated in the game and changed es you want. Therefore I have to create the code in different languages.
Alternatively I use an IPC protocol or any other technique for the communication to my tool. The integration might be easier this way, but you can't modify the calculation, so I have to cover all the different requirements.
die Feder
 
Posts: 2
Joined: 25 Apr 2015, 16:45

Re: Combat Engine

Postby eugeneloza » 02 Jun 2015, 07:56

die Feder {l Wrote}:1. How to create different formulas for different requirements, which are balanced?
It is a problem of math. I can use different formulas and show the range of values for balanced damage calculation. There have to be one or more values in the formule, which make the calculation scalable. If not i will add one.
At the end i want to have one or more formulas for diffenrent grow rates of values like defence or attack.

Mathematically in general case you get a vector function of a vector variable.
I.e. you have 'input vector' of character's stats, skills and choosen attack style/spell & other conditions (like amount of light in the dungeon), enemy stats and resistances, etc.
And you have the output vector of effective damage to enemy health & armor, cost in stamina/mana/etc, damage to attacker's weapon.
The problem of balance is:
a) to match the stats & items curve to the enemy strenghts (i.e. that the game would be hard according to some difficulty curve, but not easy or impossible in the end).
b) to make the game interesting (i.e. not 'click him to death' but choosing the right strategy whether turn-based or in realtime action) - to make the game of skill and knowledge, but not of simply 'math matching' of the player's level and monster's level.

2. How to integrate the calculation.
At the beginning I can start using excel so I can easily test the formulas.
Then I want to create a kind of code generator. This generator creates the code depending on the diffenrent parameters (attack, defense...), the growth rate and other information. This code can be integrated in the game and changed es you want. Therefore I have to create the code in different languages.
Alternatively I use an IPC protocol or any other technique for the communication to my tool. The integration might be easier this way, but you can't modify the calculation, so I have to cover all the different requirements.

Excel/LibreOfficeCalc is a good stuff. But it is very limited in case of a complex system development.
I.e. in Decoherence I have 6 perks per each action, which add an effect or modify the efficiency of the primary action. Each action has a different set of perks. I can't imagine how this stuff can be done in excel - only calculating the basic damage.
On the other hand, if you speak of an universal system - then it's not going to be too complex, so a single formula (with little if-s case-s) would be fine.
Just an advice - avoid % resistances which lead to 'possible cheating' (like getting 120% resistance to damage). It's fine for poison resistance, but 100% fire resistance would eliminate threat from fire-breathing enemies at volcano map, and: a) make the player collect a set of m% resistance armor and b) reduce the value of those maps meant to be hard to zero if the player 'knows in advance' what waits for him and collects an appropriate armor set.
User avatar
eugeneloza
 
Posts: 500
Joined: 22 Aug 2014, 12:15
Location: Ukraine

Re: Combat Engine

Postby Vandar » 28 Aug 2015, 10:57

Some games have caps on % Resistances. Diablo II had a 75% cap for elemental resists, and a 50% cap for physical resistance. There were some skills and items to raise the caps for elemental resistences to 95%, but that was the absolute cap, and physical resistance was always capped at 50%.

I plan to use % resistances if I ever get to work on my RPG again, with caps like in D2
In soviet russia, code debugs you.
User avatar
Vandar
 
Posts: 318
Joined: 17 Mar 2014, 14:32

Who is online

Users browsing this forum: No registered users and 1 guest