August 2018
Beginner
334 pages
10h 19m
English
Sometimes, we need to create random behaviors that don't differ too much from a pivot point; this is the case for an aiming behavior. A normalized random behavior would shoot equally along the x and y axes, given a distance from the aiming point; however, we would like most of the bullets to aim close, because that's the expected behavior.
Most of the random functions out there return normalized values along the range given to them, and those are the expected results. Nonetheless, this is not completely useful for certain features in game development, as we just discussed. So now, we will be implementing a random function to be used in our games with normal distribution instead of a normal distribution.
Read now
Unlock full access