|
-
Aug 10th, 2002, 07:35 PM
#1
Thread Starter
Fanatic Member
algorithm help
well there isnt really a forum which will fit this..i think
since its not actual coding either (though that would be good ) i just stuck it in here...and cuz itll get more exposure
i have these for 4 variables for 2 opponents, each has their own ratings
attack
defense
agility
speed
in addition to that, i have:
an armor rating (for defense)
weapons (which add on a certain amount to attack ability)
i want to use all of the stats for a hit/miss probabily, and then do the hit, and subtract the amount of damage done by the attack. the attack has a certain damage rating, which is used with the attack rating. defensive armor is used in conjunction with the defense rating. i cant really think of anything good
most of the coding is done aside from this. items they buy are used, such as armor etc.
ideas/algorithms would be awesome
Visit www.fragblast.com
Gaming, forums, and a online RPG/Battle system
(__Flagg) DOT NET? is this a Hindi Dating service?
-
Aug 10th, 2002, 07:55 PM
#2
Hyperactive Member
I suggest making a player class, and have member functions for finding damage done with a certain weapon, taking damage with certain armor, properties for the attributes, etc. For Example
Class:
VB Code:
Property Let AttackStrength(NewValue as Byte)
'code goes here
End Property
Property Get AttackStrength() as Byte
'code goes here
End Property
Public Sub TakeDamage(Amount as Double)
'code for decreasing health, armor, etc. go here
End Sub
Public Function GetDamageDealt(WeaponIndex as Long) as Double
'code goes here to calculate how much damage a weapon will do with a certain weapon
End Function
Is that the kind of idea you were looking for? That would make it easier.
-
Aug 10th, 2002, 08:01 PM
#3
Thread Starter
Fanatic Member
its in PHP, everything is taken from the DB, each player has an array with their stats in it, like what weapons/armor they have etc
Visit www.fragblast.com
Gaming, forums, and a online RPG/Battle system
(__Flagg) DOT NET? is this a Hindi Dating service?
-
Aug 10th, 2002, 08:03 PM
#4
Hyperactive Member
-
Aug 10th, 2002, 08:06 PM
#5
Thread Starter
Fanatic Member
yah np. i just need ideas for the algorithms.
for tha attack ive comeup with:
abs(weapon damage - (attack rating * weapon damage) / 2)
something like that.
i need ideas
Visit www.fragblast.com
Gaming, forums, and a online RPG/Battle system
(__Flagg) DOT NET? is this a Hindi Dating service?
-
Aug 10th, 2002, 08:36 PM
#6
Frenzied Member
you might want to put some randomization in that
retired member. Thanks for everything 
-
Aug 10th, 2002, 08:44 PM
#7
Thread Starter
Fanatic Member
theres an idea
that would be good for hit and miss too
random(1, (speed * agility) / rand(1, agility))
Visit www.fragblast.com
Gaming, forums, and a online RPG/Battle system
(__Flagg) DOT NET? is this a Hindi Dating service?
-
Aug 10th, 2002, 09:30 PM
#8
Frenzied Member
IF you really want to get a broad set of ideas -
read Jarulf's guide to Diablo & Hellfire. Everything has a normally distributed probability range for each action - ie. similar monsters are created with ranges of armor ratings, hit probabilities depend on weapon type, dexterity, etc.
http://www.lurkerlounge.com/jarulf/index.shtml
-
Aug 10th, 2002, 09:45 PM
#9
Thread Starter
Fanatic Member
ah, thats cool, thanks
i was looking for something like this
Visit www.fragblast.com
Gaming, forums, and a online RPG/Battle system
(__Flagg) DOT NET? is this a Hindi Dating service?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|