CompiledFrog

Post #73: Godot's RNG API

After the random location generation in yesterday's post, I wanted to learn more about Godot's RNG (random number generator) API.

And wow, there is some great writing about Godot's RNG API! You should definitely check it out: Random number generation.

Godot provides a global way to do more simple RNG (using global scope methods), and a RandomNumberGenerator class for more advanced / custom use cases.

I'm impressed by the design of the API for real world use cases. I think they've covered a really solid amount of use cases with great writing on how to use different functions. And, they even have crypto RNG for anyone doing encryption, auth, etc. Pretty awesome.

I can't wait to have a game that allows players to set their own seed! (Looking at you, RandomNumberGenerator.set_seed()!)