|
| 03 Aug 2016 08:07 AM |
I'm getting to the point in my game that I'll start making a formula for attacking other players. Problem is a basic formula wont work and I'm looking for suggestions on how I should do this.
Basic Formula player 1 Attack = 1000 Defense = 1000
player 2 Attack = 950 Defense = 950
If player 2 attacks player 1 950 - 1000 = -50 (no damage)
If player 1 attacks player 2 1000 - 950 = 50 (Half of their life)
In the future players could have attack and defense in the millions. I don't want them to kill players with 1000 less attack/defense in 1 hit. Any suggestions? |
|
|
| Report Abuse |
|
|
eRanged
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 9746 |
|
|
| 03 Aug 2016 08:11 AM |
if Attack/2 > Defense then
Idk, just don't let people with super high attacks attack super low defense.
|
|
|
| Report Abuse |
|
|
Eslerp
|
  |
| Joined: 07 May 2016 |
| Total Posts: 205 |
|
|
| 03 Aug 2016 08:14 AM |
| Maybe you could have some randomness in it. For an example, they missed, or they did low/med/high/full damage. |
|
|
| Report Abuse |
|
|
|
| 03 Aug 2016 02:32 PM |
| Thanks for the suggestions. They will definitely help me try to figure out a system. Does anyone have any more suggestions? |
|
|
| Report Abuse |
|
|
|
| 03 Aug 2016 02:36 PM |
| Connect players to servers based on their attack/defense stats. Highly skilled players only fight highly skilled players. |
|
|
| Report Abuse |
|
|
|
| 03 Aug 2016 02:38 PM |
I mean what's the point of having a million attack if you can't even 1 hit a noob? Lame.
|
|
|
| Report Abuse |
|
|
Wowgnomes
|
  |
| Joined: 27 Sep 2009 |
| Total Posts: 26255 |
|
|
| 03 Aug 2016 02:38 PM |
Basic Formula player 1 Attack1 = 1000 Defense1 = 1000
player 2 Attack2 = 600 Defense2 = 600
If player 2 attacks player 1 if Defense 1 > Attack 2 then damage = math.sqrt(Attack2/2) (~16 damage to higher defense player instead of 0) else damage = math.sqrt(Attack2) (~24 damage)
sqrt really helps with big numbers
you might want to divide after sqrt, that way its a bigger difference for not having enough attack power
but this would still encourage ppl not to attack low ppl because low ppl would still do some damage to them |
|
|
| Report Abuse |
|
|
|
| 03 Aug 2016 09:50 PM |
| That's awesome Wowgnomes! Thanks for suggesting it. |
|
|
| Report Abuse |
|
|
Wowgnomes
|
  |
| Joined: 27 Sep 2009 |
| Total Posts: 26255 |
|
|
| 03 Aug 2016 09:55 PM |
| Glad i could help dave, best of luck! |
|
|
| Report Abuse |
|
|
Tynezz
|
  |
| Joined: 28 Apr 2014 |
| Total Posts: 4945 |
|
|
| 03 Aug 2016 10:21 PM |
| https://forum.roblox.com/Forum/ShowPost.aspx?PostID=193511484 |
|
|
| Report Abuse |
|
|