Summary

In this chapter, we implemented RNG to procedurally generate a suitable spawn location in the levels, and we encapsulated this behavior in its own function. We then used this to spawn items and enemies around the map at random locations.

In the next chapter, we're going to look at creating unique, randomized game objects. Certain items will be procedurally generated during runtime, meaning there will be an almost infinite number of possible combinations. We covered the skills and techniques that are used to achieve this in the earlier chapters, so it's time to pull it together and build our own procedural system!

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.