
Procedural Content Generation for C++ Game Development
By :

A classic way in which this random distribution of numbers can be used is to give a player random stats. Traditionally, a character in a game is given n
stat points, and it's up to the player to distribute them. Since we're making a procedural game, we'll instead distribute them randomly to create procedurally generated character stats.
To do this we need to hook up the previous code with the assignment of our player's stat variables. Our player stats are currently fixed, and assigned in the following way:
m_attack = 10; m_defense = 10; m_strength = 10; m_dexterity = 10; m_stamina = 10;
Let's replace that with the following to randomly distribute the stats. We'll also add a variable to the player so we can change how many stat
points the player has to distribute.
To start, add the following variable to the player, and don't forget to add it to our initializer list:
int m_statPoints;
Now let's use this to give our player random...
Change the font size
Change margin width
Change background colour