Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Yes, it really helped understanding the reload time and profit the game. Now the ammo could benefit from it but it is less necessary.

The randomization feels really punishing when we get 1 ammo but 9s of reloading, then 2 ammo for 7s.

I think it is true randomization, I just had bad luck. However, you can manipulate player’s luck to reduce the probability of these situations by increasing the weight of the "best" results with RandomNumberGenerator.

For instance:

var rng = RandomNumberGenerator.new()
# the player will get more often 4,5 bullets, then 3,6,7, then 1,2,8,9
var ammos = rng.rand_weighted(PackedFloat32Array([0., 1., 1., 2., 3., 3., 2., 2., 1., 1.]))