Exercises

To help you test your knowledge of this chapter's content, the following are a few exercises that you should work on. They are not imperative to the rest of the book, but working on them will help you assess your strengths and weaknesses in the material covered:

  1. Add your own trait to the player class. There is a spare trait resource included in the project that you can use.
  2. When generating player traits, we identified that it was possible to give the player the same trait multiple times. Improve the Player::SetRandomTraits function so that that's no longer possible.
  3. The stats that we have given to the player and enemies aren't hooked up to how much damage they deal or take. Hook these stats up so that they affect the player and enemy to ...

Get Procedural Content Generation for C++ Game Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.