Calculating the "power" of a player in a "Defend Your Castle" type game
Posted
by
Jesse Emond
on Game Development
See other posts from Game Development
or by Jesse Emond
Published on 2011-03-11T19:24:28Z
Indexed on
2011/03/12
0:19 UTC
Read the original article
Hit count: 349
game-design
|ai
I'm a making a "Defend Your Castle" type game, where each player has a castle and must send units to destroy the opponent's castle. It looks like this (and yeah, this is the actual game, not a quick paint drawing..):
Now, I'm trying to implement the AI of the opponent, and I'd like to create 4 different AI levels: Easy, Normal, Hard and Hardcore. I've never made any "serious" AI before and I'd like to create a quite complete one this time.
My idea is to calculate a player's "power" score, based on the current health of its castle and the individual "power" score of its units. Then, the AI would just try to keep a score close to the player's one(Easy would stay below it, Normal would stay near it and Hard would try to get above it). But I just don't know how to calculate a player's power score. There are just too many variables to take into account and I don't know how to properly use them to create one significant number(the power level).
Could anyone help me out on this one?
Here are the variables that should influence a player's power score:
Current castle health, the unit's total health, damage, speed and attack range. Also, the player can have increased Income(the money bag), damage(the + Damage) and speed(the + speed)... How could I include them in the score?
I'm really stuck here... Or is there an other way that I could implement AI for this type of game?
Thanks for your precious time.
© Game Development or respective owner