#Probability & Rate of Fire
1 messages · Page 1 of 1 (latest)
secondly, that would be a measure of "chance of activating the effect in 1 second"
the rate of fire doesn't matter, what matters is how many bullets hit
Correct.
This is why most games have whats called a "Proc Coefficient" on faster weapons, that reduces the proc chance.
that's a balancing thing right, not a factor for actual probability ?
If you have a machine gun that fires 50 bullets a second. You're ALWAYS going to see it happening.
1-(1-0.5)^50 = 1
And yeah, its a blancing thing.
if you're talking about balancing then the question is worded strangely and I misunderstood
I see
in that case I do think it makes the most sense to either: determine the bullet's effect on shooting
or have the bullet store info on what shot it and then determine it on hit
Yeah I mean, I already have it working in my game.
It was just a discussion point my artist brought up with how he wanted to stylize/ground something.
i see
my two cents is that determining beforehand let's you do cool stuff like special effects for onhit bullets
In what sense?
if, for example, your onhit effect was fire damage, you could make the bullet's that shoot have that effect have a fire trail
just a bit of artistic freedom you would get as a bonus
Yeah, I was just unsure if, for example, determining that, would feel worse for the player. Or even fuck with balancing.
Example: You see a fire ball leaving your gun and it misses and does nothing because you missed your target.
ah you're right if you count in accuracy it does end up being lower
since if you hit 80% of your shots, a meaningful proc would only happen in like 5% x 80% = 4% instead of 5%
I may be understanding it wrong, but what you have is : a weapon that randomly proc an effect (say fire for example) on hit ?
Right, but at the same time, that same number should take into account for a on hit effect tho as well.
Correct.
And I'm trying to determine if a projectile leaving a gun, if, the number would be "Lower" for On Hit effects if it is pre-determined as the bullet leaves the gun, vs, when the bullet hits the target.
it would definitely
The other question also comes down to, how would I apply it for a weapon like a Flame Thrower.
for a weapon like that you'd probably need to give it damage ticks and adjust it around that
while in the flames you'll take damage every x seconds, and treat those ticks the same as you would single hits
Not reallytho?
If we go back to my math formula: 1 - (1 - P)^N
and lets add accuracy to that. So.
1 - (1 - P)^N*A
Where P = 0.5
N = Shots per second.
A = Accuracy.
No matter what, the proc chance comes out to 0.43. Doesnt matter if its calculated before or after leaving the gun.
I guess some players might try to, for example.
Shoot a blank shot that doesn't apply the effect, then go "Okay my next shot will apply that effect.". Which, isn't how math works, but you know.
Well, math works the way you design the formula
the 5% check will only occur after hitting though
so you need not count accuracy into there, right?
In some case, you'd want to increase proc probability each time it doesn't proc
I'm kind of out of my water rn tho, so let me know if I'm just clogging up space in the thread and I'll stop
5% is still 5%.
Its the chance of seeing something happen over the course of 1 second that I care about. Thats where the balance happens.
I'm genuinely interested in this though
Same for me
Yeah, in this case, that would be better suited for "On Hit" effects. I forget what its called, but its like in Hearthstone, where if you don't see a Legendary card pulled from the pack you just bought, then, they increase the chance of you seeing one next pull.
Bit different in this case.
iirc league of legends does this for their crit rate, where it dynamically updates and increases if you don't crit for a few hits and decreases immediately after hitting a crit
Yep, they do
the idea is to not have spurts of 6 consecutive crits or dry seasons of no crits
Yeah, which, honestly, I'm surprised that they do that. Its why attack speed is a great item choice in their case.
also something I should specify. it may be worthwhile not obfuscating the probability too much and focusing on making it more in line with what your players "expect" to receive
you may have proper math but people will complain because they don't know how the probability adds up
At some point in the game, most character that play around crit has a 100% crit chance, so it probably doesn't matter in their design
Youre not wrong still weird tho.
like how some tactical rpgs secretly have 95% hit chsnces act like closer to 98%
And I agree with this, I've mostly been looking at the Math for Risk of Rain/2
As a player, it makes more sense to me that a weapon has X% chance to deal fire damage, whether it hits or not
I think it should specified
See, thats what I'd rather hear at the end of the day. Lol.
So you'd rather see the bullet, leaving your gun, with a fire effect, say, 5% of the time. Vs seeing a fire effect on hit 5% of the time?
"5% chance to shoot flaming bullet" or "5% chance to burn on hit" for example
whatever it is, make it clear to the player
and they'll do the math on their own
Jody formulated it better than i did
Right, but. This is the big but here.
The artist currently dislikes that the bullet isn't grounded, and as such, it should never apply a burning effect on hit, beacuse the bullet isn't on fire.
if you're specifying it as an "On hit" effect then I guess the most intuitive thing would be be to determine it On Hit
then you would have to change it from an onhit effect to a bullet effect and deal with rebalancing around that
which is probably the kind of thing that gives balance teams headaches
When it has X% to burn on hit, seeing it again as a player, I would expect every bullets to look alike

In game like Borderlands, a weapon can deal fire damage but the burn isn't guaranteed for example
Right, so, thats what I think as well. And I even proposed to him that "We can have another effect that is like '5% chance on shooting for your bullet to be imbued with fire damage.'" which we could layer on other things with it.
Like for example "On hitting a target whos burning with fire damage, explode into a ball of fire."
IIRC
because at the end of the day there's no way to know if your bullet will hit or not
Well, there is. Its just Math. Lol
depends on your game
Right but in those games, they bullets are on fire when they leave the gun every time.
if it's multiplayer then you gotta take into consideration the other person moving lut of the way
Yes, it was to illustrate the fact that I expect all bullets to look the same if it's an on hit effect
Its not in my case. :^)
possibly genius and or dumb idea. determine the hit with a raycast and then draw the bullet afterwards following the ray
Yeah so in this case, its a Rogue Like.
So you get upgrades that will effect every gun you get, that can apply "On hit burn enemy"
Thats how hit scan weapons work in most games. Lol.
Twin stick shooter like isaac or enter the gungeon ?
Yeah, our original prototype/demo is on itch, youtube video on the right if you dont want to download it: https://thestoff.itch.io/robodome
neuron activation
Pretty much the case is what I'm thinking.
I think at the end of the day, I bite the bullet, and let the artist have this one. Its a big code rework for me, but I'm sure I can figure it out.
okay in that kind of game yeah I'd make the bullet have the effect on shoot
In that kind of game it's more common to have X% chance to shoot a bullet of type
the visual effect would be great
Coolio. Cheers.
Getting feedback is part of why we released the original prototype.
Pretty much every streamer we got to play it I told them "Please, only give us NEGATIVE feedback. We already know whats good."
Lol
also to a lesser degree players may make different choices depending on what bullet they see come out of their gun
if they see the big boy they might stick it for the dps rather than dodging out of the way if the boss is about to die
half the fun of gungeon and isaac is watching all the crazy projectiles though
so I'd definitely do whatever I can to give the artist more tools to work with

I'll let the artist figure it out from here:
https://gyazo.com/310257ee8500f1fa93788c63eadb4ef1
@bold ruin @sick shore - Thanks again for feedback and whatnot.
And this kinda goes to what I was saying where shooting for long periods of time with nothing happening, feels bad. Even tho this is a 50% chance.
yeah in that case maybe your game would benefit from that skewed math that other games use to make 50% feel more like 50%
though i have no idea what math they use for that
They probably just do 50% every time, no matter the rate of fire.
no i mean increasing the odds when you activate it and decreasing the odds after consecutive procs
Ah, yeah, so, no many games actually do that :).
But, I get it.