C++/Game Tutorial 8: Random Number Generator! @makinggameswithben
C++/Game Tutorial 8: Random Number Generator!  @makinggameswithben
Uploaded May 2014 | Updated September 2026, 2 weeks ago
Today we learn how to use a random number generator so that we can use probability in our games!

NOTE: mt19937 is a much better choice than default_random_engine since you are guaranteed that it will be a good random engine. So instead of:

default_random_engine randomGenerator;

you type:

mt19937 randomGenerator;

And it should work fine! In fact, it is better to just always use mt19937 :)

en.wikipedia.org/wiki/Mersenne_Twister
cplusplus.com/reference/random/mt19937

Donate Via Paypal: goo.gl/ifsOMt

Twitter: twitter.com/ChillstepCoder
Seed Of Andromeda Channel: youtube.com/user/DubstepCoder
Seed Of Andromeda Website: seedofandromeda.com
C++/Game Tutorial 8: Random Number Generator!C++/Game Tutorial 12: Arrays For Item Shop!C++/Game Tutorial 35: Default Parameters and Structs!Advanced C++/Graphics Tutorial 30: Optimized Spritebatch!Advanced C++/Graphics Tutorial 17: VSYNC, GL_VERSIONAdvanced C++/Graphics Tutorial 24: Basic Transparency!C++/Game Tutorial 16: Separate Files And Constructors!Advanced C++/Graphics Tutorial 8: GLSLProgram, Initialization Lists, extern!C++/Game Tutorial 27: new, delete, and delete[]Advanced C++/Graphics Tutorial 36: Cache-FriendlinessAdvanced C++/Graphics Tutorial 14: Maps, Binary Search, Caching!Advanced C++/Graphics Tutorial 47: Platformer Player Control
MakingGamesWithBen |

C++/Game Tutorial 8: Random Number Generator!

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER