Christopher Pitt

Procedural Generation in Godot

Learn to Generate Enjoyable Content for Your Games

Christopher Pitt
Durbanville, South Africa
ISBN 978-1-4842-8794-1e-ISBN 978-1-4842-8795-8
© Christopher Pitt 2023
Standard Apress
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights.
The publisher, the authors and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, express or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

This Apress imprint is published by the registered company APress Media, LLC, part of Springer Nature.

The registered company address is: 1 New York Plaza, New York, NY 10004, U.S.A.

This book is dedicated to my patient wife, my enthusiastic kids, and my supportive friends.

Introduction

This book is about the practical steps you can take to create games that include procedural content generation. It’s been a hard six months of writing, but the games I built leading up to it were instrumental in my understanding and teaching of procedural content generation. I won’t bore you with the details, except to say that the most polished games I have released are heavily featured in these pages.

You won’t find a lot of complicated math, or theory about different kinds of noise generation functions. I have kept things simple and useful. If you follow along, you’ll have built four games by the time you’re finished. I think that’s one of the best parts about this book.

It’s wonderful to look back on these last six months and see how the content of this book has evolved. I started writing it with Godot 4 alpha 1 and finished writing it with Godot 4 beta 1. A lot changed during that time, so I went back through and re-built everything in beta 1 so that I was sure it would work for you. There might be small changes to the engine before launch, but the worst is behind us.

It was important for me to demonstrate this topic using Godot 4 because it’s the future. I want this book to be useful to you for a long time. If you struggle with anything in it, please reach out to me.

You can find the source code for the experiments at https://github.com/assertchris/book-experiments

I mostly follow popular GDScript syntax conventions. Feel free to deviate from these as you like; but be careful to update the code where you’ve chosen different node, script, class, or file names. My habits have also changed while writing the book; but things are mostly consistent following the most recent set of edits. All source code used in the book can be downloaded from http://github.com/apress/procedural-generation-godot.

I suggest you learn the basics of GDScript before attempting to master this topic. GDQuest has a brilliant introductory application you can try: https://gdquest.github.io/learn-gdscript. I explain things as simply as possible, but you’ll have an easier time if you already know some programming concepts.

Acknowledgments

I acknowledge the folks at Apress for their tireless work and the opportunity to write this book. I’d also like to thank Christopher for his encouragement over the years and his valuable perspective as technical reviewer.

Table of Contents
About the Author
Christopher Pitt

is a developer living in South Africa. He has published a bunch of indie games, many of which use procedural content generation. Most of his games have been built in the Godot engine. He also likes to bake sweet things and build wood things.

 
About the Technical Reviewer
Christopher Bray

Over the past 15 years, Christopher Bray has spent his career creating enterprise applications for hotel chains, giant analytics firms, and one of the largest businesses in the food service industry. Now, he’s developing video games using Godot.

 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset