Looking for some suggestions on how to implement an attack speed system

Started by
14 comments, last by CaseyHardman 13 years, 1 month ago
In the game I'm designing, you pretty much have three stats: Strength, Agility and Wisdom.
Each stat does something. Strength gives health and wisdom gives extra damage with magic. You have a primary attribute depending on your class, and that attribute gives you bonus melee damage (adds to your weapon's damage).
Problematically, I'm not sure how to implement a system for agility to decrease the time you spend attacking (increase how fast you attack).
Since it's an RPG, you'll most likely be gaining a lot of each stat before you finish. So percentages don't work very well, because eventually your attack speed will be so fast that it'll be reduced to near nothing, and that would be imbalanced.
Weapons are supposed to have a minimum value that can be the time spent attacking (like one-handed swords cannot go under 1 second of attack, or something) and each weapon has it's own attack speed that is reduced by agility until it reaches the minimum value, but I don't want you to start with 25 agility and instantly have it reduced to the minimum value.
So how could I make a good system for this?

Maybe diminishing returns, but I have no idea how to make a system for that, and I tried googling but it's just not helpful.

Any suggestions?
Thanks!

[twitter]Casey_Hardman[/twitter]

Advertisement
Usually with agility and dexterity stats you are looking at increase of chance to hit and critical hits rather than speed of attack. But if you are set on doing it with speed of attack you would have to include weapon weight and weapon size as a modifier to the attack speed. So it could be something like: Agility - Weapon Weight - Weapon Size = Hit speed.

Itll be a lot to balance though as you'll need to make sure that hitting faster doesn't become over powered when compared to slower stronger hits etc.
Have agility roll against the average of the enemies.

So as the strength of enemies goes up it stays about the same if you level agility at the same rate as the enemy. This doesn't factor for fighting against low level targets again though.
But that would work in your favor, making mundane fights against weak enemies trivial.
I wasn't planning on making it so you have a chance to hit, as that's the thing I hate the most in RPGs. You either hit them or you don't, and you can guard and dodge around to help defend yourself.
I might go with this:
Your weapon has a set value of attack time and each weapon type has a minimum attack time.
Every 5 points of agility reduces the attack time by 0.03 seconds until the attack time reaches under 81% of its original value. After that, 6 points of agility reduces it by 0.02 seconds until it reaches under 61%. Then every 7 reduces it by 0.01 until it reaches the minimum value.

Do you think it'd work?

Thanks for the suggestions, also!

[twitter]Casey_Hardman[/twitter]

I would make strength and agility determine attack speed and agility determine speed of counterattack.

Also, you could have the weapons require a certain level (either experience level or strength & agility level) to be used and then decrease the minimum level from there.

Beginner in Game Development?  Read here. And read here.

 


Since it's an RPG, you'll most likely be gaining a lot of each stat before you finish.


It really depends on your game. When I first started playing RPGs it was pretty difficult to increase your primary attributes (str, con, dex, etc.) and usually could only do so with gear. Diablo was one game where this dynamic changed and you gained points to spend on attributes as you increased in levels.

Your scaling system seems to be the right approach and I like how you have a hard 'cap' in place. The diminished returns are essentially an approximated logarithm. A good idea overall and it's up to you if you want to use discrete intervals as you suggested or use a continuous function instead.

The biggest problem I predict you'll face is balance. If agility increases attack speed then it also increases damage (over time) as well. If strength only affects damage then wouldn't a player rather increase agility instead?

[quote name='GHMP' timestamp='1299390322' post='4782318']
Since it's an RPG, you'll most likely be gaining a lot of each stat before you finish.


It really depends on your game. When I first started playing RPGs it was pretty difficult to increase your primary attributes (str, con, dex, etc.) and usually could only do so with gear. Diablo was one game where this dynamic changed and you gained points to spend on attributes as you increased in levels.

Your scaling system seems to be the right approach and I like how you have a hard 'cap' in place. The diminished returns are essentially an approximated logarithm. A good idea overall and it's up to you if you want to use discrete intervals as you suggested or use a continuous function instead.

The biggest problem I predict you'll face is balance. If agility increases attack speed then it also increases damage (over time) as well. If strength only affects damage then wouldn't a player rather increase agility instead?
[/quote]

The game has automatically distributed stat points per level depending on your class and subclass. If you switch classes, which is as easy as the hit of a button, the stats/level multiplied by your current level will be added to your stats, even if you didn't originally level up on that class.
Since there are going to be probably around 60 or so levels before you're at the cap (I might change that to be lower/higher, though), you'll probably end up with a lot...

Agility was originally just going to increase attack speed, strength health, wisdom damage dealt with spells, and each class has a primary attribute which will increase it's damage dealt with melee attacks.
So classes with higher agility and primary agility get more damage and less HP, since they'll not only be getting more damage with their primary attribute being agility, they'll also be getting more attack speed (that way strength isn't just flat out better because you get the same damage bonus and extra health).

Thanks for the reply, I appreciate it and it helped! : )

EDIT: I might also make it so a stat gives critical strike chances, but I'm not exactly sure which one or if I'll make a new one that does that and something else. Right now, Agility isn't necessarily GREAT as a stat in its own, so I might add that to it or buff its bonuses to attack speed more.

[twitter]Casey_Hardman[/twitter]

What's the total number of different attributes for a character? While I can understand the desire to keep the total number of varying statistics low, my opinion would be that you'll have an easier time by adding in a few more variables to get the job done. That would also give you more opportunities for ideas regarding weapons/armor, different player character/npc's in the game, etc.

Just throwing it out there.

EDIT: missed a word in the first sentence. d'oh!
What about instead of increasing attack speed it allows let the character get extras hits in? Say 1 extra hit per 10 agility points higher then the opponent?
Or it could be static and every 20 agility points grants an extra hit per attack.

If extra hits turn out to be to powerful you can always introduce decreased damage for each additional hit.

This topic is closed to new replies.

Advertisement