View RSS Feed

Carnage

Game Design: Making formulas make sense

Rate this Entry
I was going to post this up in KOC as a suggestion on how to fix sabotage however, as some people mentioned that rocco may not be too receptive to suggestions of this nature (I'm guessing he gets a lot of them) I figured I'd take a slightly more generalised approach and go into how to design an algorithm for an online game using kings of chaos as an example where needed.

So, how should you go about desiging an algorithm for sabotage (or any feature for that matter)?

Firstly, to make an (online) game fun it needs to be balanced and consistant.

For a game to be balanced, it should mean that every player has the same chance of doing well. At the moment i'd say koc isn't balanced. Looking at the top ranks the majority of the top players are dwarves. Also, the only gaming stratergy that works in the long run is to have a huge defence a huge TFF and bank your gold as often as possible. Foe suffers from a similar mono stratergy issue but it is something i'm working to compensate for.

For a game to be consistant, the game should play how the player expects it to and shouldn't deviate from that very often. If it plays differantly to how a player would expect, it should at least alwats behaive in that manner. An easy example here; if my attack is greater than a players defence I expect to be able to beat them if I attack them, if for some reason the opposite is true (lower strike beats higher defence) then if i go on to attack another player with a higher defence than my attack, i would expect to beat them.

With these two key properties in mind we can start to design an algorithm but first, a quick look at what is there at the moment.

1) sab turns.
In my oppinion these are redundant. It makes no sense at all to ever use less than 5.

2) number of spies
Again, no one has ever offered any proof that more than one spy is better than just sending one.

3) weapons
In my experiance it is far more difficult to sab an IS or BPM than it is to sab a NUN or a LT. This may not acctually be the case, but if it is its rather stupid. All the weapons have the a similar gold value, they should be equally difficult to sab

4) AAT's
This is something in the current system which i think works well. It seems to be set at about the right level, however with the other proposed changes to the system, this will need a few tweaks to remain as effective.

Design criteria

1) Higher spy should prevail against lower sentry
2) A lower spy should still be able to do damage to a high sentry but this damage should be less than (1)
3) Smaller accounts should take less damage
4) In general a high sentry should mean less damage from sabotage
5) In general having high spy should mean you can do a lot of damage.
6) A sab account should be a viable method of play
7) A sab account should be beatable

Player assumptions

The following is a list of things that a player may assume when presented with a sab form

1) bigger weapons are harder to sab than smaller ones. (eg easier to sab a dragonskin than an IS)
2) sending more spies makes it easier to sab weapons
3) sending more spies make it more likely you'll get caught
4) using more turns increases the chance you'll be caught
5) using more turns increases the damage you can do
6) its harder to sab 2 weapons than 1

A good system would forfill these assumptions or not allow them to be made in the first place.

First pass.

There are so many variables in the current system, as a first pass attempt at a design I will set a number of these in stone to make other criteria easier to resolve.

1) Turns.
The current system is confusing an unneeded. Drop turns all together. Instead, each player may make one sucessful attempt per 24 hours and has 10 tries per player to get an attempt to succeed

2) Spies.
25 is probably too many, the max will be reduced to 10

3) AAT.
As a first pass, the ATT of the target will be doubled, this means that the system stays the same as before.

Algorithm.

At its core, the algorithm needs to decide the differance between the sentry of the target and the spy of the sabber. A simple ratio is too volatile considering that some accounts have over a billion spy compared to accounts which have 100k sentry. We deal with this using a log and the max function (putting a cap on the ratio)

Code:
max(-2,log2((sentry+1)/(spy+1)))
This gives a number between -2 and +infinity. With a value close to 0 if the sentry and spy are close to each other, -1 if the spy is double the sentry, -2 if the spy is more than quadruple the sentry. On the other end of the spectrum, if the sentry is quadruple the spy you get a value of 2, 3 if the sentry is 8x the spy etc.

The next step is to define a mapping between the number coming out of that forumla and a %age success rate. Considering a few things:

1) -2 should be the most likely to succeed.
2) values of 2 of greater should have a very low chance of success (this makes it similar to the current 3x sentry to be unsabbable)
3) even at -2 there should still be a chance of failing.
4) even at a high number (eg 25) there should be a very very slight chance of suceeding.

My suggestion here would be a mapping akin to this:

Code:
value | base sucess rate
-2: 90%
-1: 75%
0: 60%
1: 30%
2:10%
3:5%
4:1%
5:0.1%
These values are fairly arbitary and need to be subjected to some mathmatical analisis. Esp when combined with the modifiers below.

The base success rate assumes sending 1 spy to sab 1/10 of a persons AAT. The maximum that 1 spy would be able to sab is 1/10th AAT. Attempting to send 1 spy to sab more than 1/10th would result in an error informing you that 'Your spy's are only <race name> and can't possibly sab that much at once.'

The sucess rate is then modified based on the AAT/spys ratio sabbing for the full AAT with 10 spies gives the same ratio as sabbing 1/10th with 1 spy, but sabbing 1/20th with 2 spys gives 4 times that ratio.

Sending more spies increases the risk to you; if you send 10, you could potentially loose upto 10 Nuns and 10 spies. Only increasing/decreasing the amount you try to sab change the sucess chance.

Essentially, the idea being that if I (with a pathetic 50 million spy) were to try and sab someone with 50 billion sentry, i'd fail. A lot. However since their AAT would probably be 1000+ I may well be able to succeed if i sent 10 spies to try and sab 1 or 2 weapons at a time. This brings balance to the game: A small account can do about the same amount of damage to a large account that the larger account can inflict back on them (due to the smaller account having a lower AAT)

This formula is incomplete and before being implemented would need to go through several stages of Analisis and Refinement.

For the analisis stage, you would simply take some values from the database and figure out what the results would be; look for anomolies; perhaps its too easy for someone to sab someone with 10x their spy. You would then enter the refinement stage and edit the %ages a little and try again till you got the result that you were after.

Finially the resulting system should be compared to the design brief and to the player assumptions. (new assumptions would need to be made based on the new system) If its behaviour is consistant the system is good. If it isn't, either you need to further refine the system or you need to explain to the player how it dosn't meet their expectations through some sort of feed back as they are playing.

Submit "Game Design: Making formulas make sense" to Digg Submit "Game Design: Making formulas make sense" to del.icio.us Submit "Game Design: Making formulas make sense" to StumbleUpon Submit "Game Design: Making formulas make sense" to Google

Categories
/php , /dev

Comments

  1. snoop's Avatar
    Here is a short list of the cancer that is killing the game:

    1. Online indicators have screwed up the game
    2. AAs have screwed up the game
    3. The 200 item unsabble thing ruined the game (you can't wipe someone out, or bring them much closer it)
    4. Spy casualties during attack
    5. The sab formulas blow donkey balls.