Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Procedural Content Generation for C++ Game Development

You're reading from   Procedural Content Generation for C++ Game Development Get to know techniques and approaches to procedurally generate game content in C++ using Simple and Fast Multimedia Library

Arrow left icon
Product type Paperback
Published in Jan 2016
Publisher
ISBN-13 9781785886713
Length 304 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Dale Green Dale Green
Author Profile Icon Dale Green
Dale Green
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. An Introduction to Procedural Generation FREE CHAPTER 2. Project Setup and Breakdown 3. Using RNG with C++ Data Types 4. Procedurally Populating Game Environments 5. Creating Unique and Randomized Game Objects 6. Procedurally Generating Art 7. Procedurally Modifying Audio 8. Procedural Behavior and Mechanics 9. Procedural Dungeon Generation 10. Component-Based Architecture 11. Epilogue Index

What this book covers

Chapter 1, An Introduction to Procedural Generation, introduces us to the vast topic that it procedural generation. I've always felt a crucial part of really learning something is understanding why it's done the way it is. Its great knowing how something is done, but knowing its origin and why it's the way it is creates a much more complete picture and a deeper understanding. In this chapter, we'll go right back to the birth of procedural generation and its journey into modern computer games.

Chapter 2, Project Setup and Breakdown, explains how to set up the provided rogue-like game project in your chosen IDE with detailed instructions for both Visual Studio and Code::Blocks. It's written in C++/SFML, and we'll be extending it throughout this book. We'll also cover common issues that you may face and run the project for the first time.

Chapter 3, Using RNG with C++ Data Types, explores random number generation (RNG), including the problems surrounding it and how we can use it with C++ data types to achieve random results during runtime. RNG lies at the heart of procedural generation and is how we emulate computers acting randomly and achieve dynamic results with our algorithms.

Chapter 4, Procedurally Populating Environments, helps us develop our level further by spawning items and enemies in random locations around the map. Procedurally generated environments is a staple in procedurally generated games, and spawning game objects at random locations is a big step toward achieving this.

Chapter 5, Creating Unique, Randomized Objects, explores ways in which we can create unique and randomized game objects. Certain items will be procedurally generated during runtime, which means that there will be a vast number of possible combinations. We'll cover the skills and techniques that were used to achieve this in the earlier chapters. We'll pull it all together and build a procedural system!

Chapter 6, Procedurally Generating Art, steps up our procedural efforts by moving away from the simple setting up of member variables randomly to the creation of procedural art and graphics. We'll procedurally create textures for our enemies and alter the level sprites to give each floor of our dungeon a unique feel.

Chapter 7, Procedurally Modifying Audio, looks at the nearest cousin of art, audio, using similar techniques to create variance in our sounds. We'll also use SFML's audio functions to create specialized 3D sound, bringing more depth to our levels.

Chapter 8, Procedural Behavior and Mechanics, uses everything that we've learned so far to create complex procedural behavior and mechanics in the form of pathfinding and unique level goals. We'll give our enemies the intelligence to traverse levels and chase the player. We'll also create unique level goals with unique rewards for the player to carry out.

Chapter 9, Procedural Dungeon Generation, finishes our work on the game project. We're going to implement what is perhaps the most icon feature of roguelike games: procedurally generated levels. All the way through the book, we've been working with the same fixed level. So, it's about time we started generating them procedurally! We'll also create some variance between levels and implement the goal generator that we created in the previous chapter.

Chapter 10, Component-Based Architecture, takes a look at component-based design, since our work on our template project is now complete. Procedural generation is all about flexibility. So, it makes sense that we'd want to work with the most flexible architecture that we can. Component-based architecture can achieve this, and having a good understanding of this design approach will help you progress and build larger systems in the future.

Chapter 11, Epilogue, takes a retrospective look at the project and the topics that we covered as we finish our procedural journey. For each area of procedural generation that we've used, we'll also identify some jumping-off points should you wish to explore the topic in depth.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime