Exercises

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

  1. Add more options to the random string generator. Try to create a generator that uses two random words.
  2. Amend the random character generation program so we generate the characters A-Z uppercase, and a-z lowercase.
  3. The player is currently spawned at a fixed location in the level. Create a set of possible spawn coordinates, and choose randomly between them at run-time so the spawn location varies.

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.