Thursday, May 14, 2009

making a game is... hard

I've finally gotten my "engine" up to the point that I'm actually starting to make a game of sorts, which is sort of like hitting a brick wall given that I haven't really thought much about how the game I want to make will actually work.

Take a simple attack for example - the attacker conceivably needs a set of values to represents how accurate their attack will be, how long that attack might take, and possibly how much damage that attack would do were it to hit successfully. Of course on the other side you have the victim, who conceivably has some sort of evasion or dodging properties, some damage absorption/resistance, and of course a health value which our attacker is attempting to deplete. It all sounds relatively straightforward right? Pretty much, except now we have to figure out what sorts of relationships all those properties have to each other, what sort of equation do we need to work out to make something that's workable much less balanced, or even worse... fun.

For the chance to hit I went with something pretty simple really:

- Accuracy (Some summation of various Attacker stats)
- Evasion (Another vague summation of various Victim stats)
- ToHitCap = Accuracy + Evasion
- ChanceToHit = BaseChanceToHit + ScalingToHitValue * (Accuracy - Evasion)/ToHitCap

Basically this means that if my accuracy matches your evasion then I have no advantage or disadvantage in hitting you, but as my accuracy starts to outpace your evasion it becomes easier for me to successfully hit. I have no idea if this is going to work very well in the long run, but so far it seems to be working well enough, and leaves me free to keep both those stats somewhat unbounded.

Now I just need to work out about 5 more of those sorts of encounters, implement an inventory system (or at the very least a weapon for the player to wield), and I might actually get to the point where someone might confuse this project for a game...

No comments:

Post a Comment