07 January 2024

"Artificial Intelligence in Games" by Paul Roberts

The best book I've read so far on how to develop game AI is AI for Games by Ian Millington. The problem is that there aren't many books on the market that cover the game AI branch in a practical way. The ones that exist are either too theoretical or they only cover a couple of topics, such as pathfinding and state machines. That's why I read Game AI Programming with Unity by Paul Roberts with eagerness.

Fortunately, it has a practical and introductory approach. I would recommend that anyone who wants to get started in the world of game AI read this book before Millington's, since Roberts's book doesn't go as deep, but it's written in a more plain language. It's ideal for a first contact with the different branches of AI used in games, to then go deeper with Millington.

The topics it covers are varied and interesting: steering behaviors, terrain analysis with influence maps, pathfinding, decision structures, fuzzy logic, minimax, genetic algorithms, and neural networks. Unlike Millington's, you won't end up with enough knowledge to implement your own version with Roberts's book, but you will have a good understanding of the main concepts, which will make things much easier when you start reading more detailed texts.

The Kindle digital version has some defects that have made it difficult to progress at times, mainly that the formulas are not well formatted and have lost most of the operators in the digital conversion. So it's very difficult to get an idea of the formula just from what's in it. Fortunately, the formulas are not abundant or complex, so in the end you end up figuring out what they mean, even though you have to think about it for a while. I really don't understand why he didn't do the same with the diagrams, which are hand-drawn and digitized, but at least they are understandable. If he had done the same with the formulas, there would have been no problem.

But more than the theory, whose depth I have already said is quite scarce, where the book really shines is with the practical part. The author has developed a series of mini-games in Unity to test the concepts of the book. So, after the theoretical part of each chapter, there is another part in which he guides you, step by step, in a tutorial format, to implement those concepts to create an AI that will face you in the mini-game. It must be recognized that the author has made an effort to create complex, well-presented mini-games that are very well suited as a platform for testing theoretical concepts. I think this is the main value of the book. There are others that explain the different concepts better and more in depth, but they stay in theory. Having the opportunity to tinker with and test these concepts directly in a game is something that only this book has offered me so far.

So, it's a book that I recommend. Recognizing its limitations and defects, I think it's a book that adds value to the limited ecosystem of books on game AI.

24 December 2023

"Godot 4 Game Development Cookbook" by Jeff Johnson

This book was part of the latest bundle from Humble Bundle, which included books for developing games with Unity and Godot.

The book offers a series of tutorials on specific use cases of Godot. It is fair to say that the index is suggestive and covers intermediate-level topics, ideal if you already have some experience with other engines and have just finished the initial Godot tutorials.

There is an introduction to the advanced features recently introduced in GDScript 2.0. It explains how to introduce volumetric fog in scenes, decal particle systems, pathfinding, deformable models, tiles, sound emitters, and offers an initial approach to Godot's multiplayer features.

It also offers recipes on shaders, but they are so superficial and the topic is so extensive that I found those recipes to be practically useless.

The different recipes follow a common structure. First, a very brief description of what is to be achieved with the recipe is offered. Then there is a "How to do it" section where the steps to be taken through the Godot editor are listed. Finally, there is a "How it works..." section that is supposed to explain in depth the steps that have been taken in the previous section.

I think the selection of topics for the recipes is very appropriate and suggestive. The description of the tasks to be performed is clear and I have had no problems following them. Although in some cases, I had to add some things for it to work and I had to complete it on my own. In general, I have enjoyed the following practices because they have allowed me to discover how far Godot can go.

However, where the book falls short is in the "How it works..." sections. It's okay if the "How to do it" section is limited to listing steps, but the "How it works" section is supposed to be where it should explain in detail why the previous steps have been taken and thus delve into the engine's features. Instead, what the author does is simply recount the tasks performed, but in a literary way instead of a numbered list. In other words, the "How it works" section does not add anything to the "How to do it" section. If you have more or less understood the steps in the "How to do it" section, you can skip the "How it works" section because it will not add anything to you. This greatly limits the value of the book. My advice, if you read this book, is to consult the Godot documentation for the different components as you progress through the steps of the different tutorials. This way, you can partially make up for the lack of explanations from the author.

In my opinion, this is a new example of Packt's poor editorial work. I think the problem with the book is not that the author is unfamiliar with the subject, but that the editorial did not review the book and did not alert him that he was focusing the "How it works" sections incorrectly. Packt is still a machine for churning out books where quantity is valued above quality.

I do not regret having read this book. It has really allowed me to tinker with Godot and convince myself that it is a viable engine for making games of all kinds. It is not that there are many books about Godot 4 on the market. In fact, most of them are from Packt, so there is little alternative. The thing is, I don't think the book is worth its full price. It may be worth it if it is discounted or included in a bundle like Humble Bundle, but I don't think it is worth the usual price. Before that, there are multiple tutorials on YouTube that are much better and more affordable.