# SolarMongoose

Member

5

168 Neutral

• Rank
Newbie

• Website

## Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

1. ## What to consider for an RPG damage formula?

I'm not multiplying the stat by itself........ am I? And the greater the difference between attack and defense, the less each point would be "worth", right? So if there's a difference, adding n points to whichever one is lower would have a greater impact than adding n points to the higher one.
2. ## What to consider for an RPG damage formula?

Thanks for all the replies! So I get the impression a big part of it is just testing it out and seeing. Which makes sense. I just wanted to make sure there weren't any obvious foreseeable problems (eg, dividing by 0) or optimizations that I'd missed. Or just any other considerations that might come to mind. Like that it could inhibit the idea of a "tank" character, for example; that's a good observation.   I suppose it's probably worth mentioning that it's specifically a ye olde..... fashioned turn-based (j?)rpg... type game. For the most part. While we are trying to keep everything happening smoothly and with as little breaks in the action as we can, I don't think you could call it fast paced, just by virtue of it being turn-based. Also this won't necessarily be the only part of the equation. I can give "modifiers" to any of the numbers, so like if a character is "defending" I could multiply their defense by 1.5, or if something is weak to some element, multiply the final damage by 2. Stuff like that. Maybe if we did want to incorporate a character being a tank or something I could use this in someway. They subtract some value from all damage they receive or something.     Maybe I need help paring down what the "desired behavior" actually is? It's like...   "Compare an 'attack' value to a 'defense' value to determine an amount of 'damage' to be dealt" Given an attack value and defense value, it should be relatively easy to estimate an HP value for a given number-of-hits-needed-to-defeat-someone, or vice-versa. I guess the three things I mentioned in the opening post. ... and uh........... that's all I've got.   Well if there's anything else that anyone can think of that I should be considering, let me know. Since it sounds like there's nothing obvious wrong what Ihave, I guess I'll just... use it for a while and see how it works. Thanks again!
3. ## What to consider for an RPG damage formula?

So I've come up with a damage formula I might use, and I can't find any reason why it wouldn't work. I can only assume this means I need some outside help to see what's wrong with it. # The base (at 0 defense) difference between attack and defense needed to add/subtract 50% damage base_d_factor = 10      # Amount added to the base factor for every point of defense over 0 scaled_d_factor = 0.5 # ...(stuff goes here) dif = attack - defense if dif: sign_dif = sign(dif) scale = 1.0 + (-1.0/(sign_dif + dif/(base_d_factor + defense*scaled_d_factor)) + sign_dif) return attack * scale else:        # else we'd be dividing by 0 return attack Or to summarize, a character's attack value gets multiplied by a number on this curve dependant on how much higher or lower it (the attack value) is than the targets defense.   [sharedmedia=gallery:images:7655]   Also here's a completely unhelpful visual aid about that curve that I made for no reason. http://www.gamedev.net/gallery/image/7654-curve/   Anyway, the motivations I was working with when I came up with this nonsense are: I wanted the numbers to seem at least a little intuitive. Damage value is always "close" to attack value. If you're fighting an enemy who's roughly the same "level" as you, you'll be doing damage basically equal to your attack value The most damage you'll ever be doing is double what your attack value is. I didn't want a relatively super high defense to completely invalidate any attack. If a character has 40 attack, but an enemy has 120 defense, they'll do around 20 damage. Maybe still not much, but you're never doing just 0 or 1 damage. I wanted it to be easy to balance. Setting an enemies defense indicates a certain range of where the player is expected to be when they fight them and how much damage they will be able to consistently do... In theory. So... are there any glaring flaws or heinous crimes against decency that anyone's aware of? Have I created some hideous over-complication of what should be some simple... "Bicubic Factorial Curve" or some such? Have I accidentally made an impossible-to-balance Explosive-Feedback-System? Is my code so unreadable that it'll absorb the soul of anyone who reads it too many times? Or just... is there anything else I should consider?

5. ## Timeline of stuff

Just a showcase of my development as a... developer
6. ## Transformation matrices and linear algebra in 2d development

Here's where I learned everything I know about matrices and junk.   http://docs.godotengine.org/en/latest/tutorials/_math.html   It's not... the best? explanation? Maybe? But it worked for me, and maybe it can help you. The silliest thing is that it doesn't explain how, once you have a "rotated" matrix, you use to to calculate a rotated point/vector/whatever. (for future reference, a 2D matrix has an x-axis vector and a y-axis vector. To rotate a point/vector, you take the matrix's x-axis vector, multiply both values by the point's x value, then similarly multiply the matrix's y-axis vector by the point's y value, then add the two results together. I'm sure that explanation makes any sense.)   (Btw, for just 2D, you don't need to read the bits at the end about cross product and... 3D.)
7. ## Currency in post-apoc / zombie world?

How about food? Just... really vauge "food". Oregon Trail vague: you have x pounds of "food".   Or in your evil government scenario, in that same vein, food stamps. They've got intrinsic value, they can be easily exchanged...   I dunno, just throwing ideas out there.