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.

11 November 2023

"Godot 4 Game Development Projects" by Chris Bradfield


I have said on occasion that I do not like Packt Publishing books. I have always felt that they prioritize quantity over quality. The fault is not usually with the authors, as there are both good and bad authors at Packt, but rather with the publisher for not doing its job of polishing the content to meet a minimum quality standard before it reaches the public. As a result, there are too many Packt books that have the whiff of a tutorial that has been copied and pasted straight from the internet, with inconsistencies, repetitions, and errors in content and formatting. In most cases, if the publisher had done its job and provided at least some guidance to the authors, the result could have been much more decent. There are things you can forgive an independently published book, but when there is a publisher behind it that charges the same price as an O'Reilly book, I think the level of expectation has to be higher. On the positive side of the ledger, and for what I believe still saves their business, is that the enormous amount of publications they put out cover very novel and varied topics that other publishers will take at least a year and a half longer to cover, and with much fewer books. It is not uncommon to search for a book on a hot topic and find that Packt is the only publisher with books on the subject. Another thing is their quality level, as I have already said. That is why I usually avoid Packt books, unless I find a pack of their books at a good price. In this case, the book that gives its name to this article was included in a pack of game development books that was released through Humble Bundle. For almost €20, I bought a couple of dozen Packt books, so for that price it was worth it. Based on the above, this book has the advantage that there are very few works that talk about game development with Godot, and even fewer about its recently released version 4, which incorporates enough new features to make it very different from previous versions. It is structured as a series of projects that act as tutorials. There are three 2D projects, of increasing difficulty, and two 3D projects. This structure makes the book practical and entertaining, but it does not delve into the design and approach particularities that make Godot so special compared to, for example, Unreal or Unity. Still, if the tutorials in the official Godot documentation have left you wanting, this book can be a good follow-up to them, as it is very similar to them in both form and content, but it takes them a couple of steps further. In fact, I really enjoyed the last chapter, which talks about how to create procedural levels in real time. The tutorials are detailed and clear to follow. The code it uses is GDScript, and I would say it is clean and well-structured code. I think that in general, the way of working with Godot that is seen in the book is not far from the official best practices. So it is a good introductory work to Godot. On the negative side, there is the typical carelessness of a Packt book. At least in the digital version, which is the one I read, the first lines of the code listings are cut off on the left. It is as if they had cut off everything that was to the left of the first or second level of indentation. This means that the body of many functions is saved, but you have to guess the name of the function and the global variables from the incomplete fragment that you get. I found this very annoying. I have no idea how the book could have passed the quality filter like this, assuming that Packt even does one. Did it pay off? Considering that I bought the book in a pack and therefore it came out at a ridiculously low price, that there are not many Godot books (and even fewer Godot 4) and that I had already finished the official Godot tutorials, then yes, it was worth it. Having all the tutorials collected in a book is very convenient, although you can find others just as good with a little internet research. If I had bought it for the price it is on Amazon, or at Packt itself, I don't know if it would have been worth it.

30 October 2023

"Robust Python: Write Clean and Maintainable Code" by Patrick Viafore


When you don't make a living from programming but are simply an amateur who likes to program, the difficult thing is not learning multiple languages ​​but keeping them alive without forgetting them. When you can only dedicate a little time a day, you focus on a project with a certain language and the rest of them become rusty. It is true that there are books with which to review, but over time you surpass the basic level and no longer just any book will do to keep a language fresh. I'm afraid I've reached that point with Python and I was a little desperate to find a book that would really give me something new. Until I was fortunate enough to acquire this book in a package (blessed Humble Bundle).

"Robust Python: Write Clean and Maintainable Code" by Patrick Viafore is not a book for novices, or even for intermediate developers, but rather for experienced developers who will most appreciate the proposals in this book for developing complex applications that can be maintainable over time.

The book begins by explaining Python's optional typing system and takes it much further than Internet tutorials to an unusual level of sophistication. Did you know that you can define interfaces in Python? Did you know that you can define your own types? Dataclasses, Enums and other types are presented here with very interesting functionalities that are not even glimpsed in the introductory texts.

After that, it dives deeper into some of the SOLID principles and architectures, such as events, to fulfill them. All this, following some simple and easy to understand examples.

Finally, the Python ecosystem for automated testing is discussed extensively, explaining multiple strategies.

I liked the book a lot. It's to the point, it's enjoyable and it really provides new tools that don't usually appear in other books at this level. In short: a very good purchase if what you want is to polish your Python to start becoming an expert.

Course "Hand-Painted Stylized Texturing for Video Games"

I finished the Udemy course "Hand-Painted Stylized Texturing for Video Games" yesterday, and I really enjoyed it. It is a Spanish course of almost 25 hours that explains how to create artistic textures for our 3D models. It focuses on Blender, which I think is a good choice as it is a perfectly open source and free package capable of modeling anything we might need in an indie game.
It is based on the texturing of 6 projects: barrels, rocks, a grass tile, a rosette, a stone floor, and a fantasy character. In my opinion, the difficulty does not increase gradually, but rather each project teaches different techniques. The barrels and rocks projects serve as an introduction to the techniques that will be seen in the rest of the course. The grass, rosette, and floor projects have in common that they serve to explain how to prepare repeatable (tileable) textures. As for the texturing of the fantasy character, it is the most complex project, but it brings together almost all the techniques that have been seen in the rest of the course.

The texturing techniques that are covered are many. For painting, both direct painting on the model using Blender and unwrapping the texture and painting using Photoshop are explained. It also explains how to generate other maps, such as the Ambient Occlusion or the Normal map.

The course is well explained and the professor goes into detail when showing how to paint textures artistically using the different techniques. In fact, the pace of the course allows you to paint at the same time as the professor. In my case, since I was only interested in learning the concepts and techniques, but not practicing them, I chose to set the speed to 2x and watch the course during my elliptical bike sessions, and it was quite understandable. If you want to practice, you can set it to 1x and go painting, for which you will only need a mouse, although I suspect the more artistic sector of the audience will use a tablet (the professor does not explicitly say so, but I suspect he also used a tablet).

In the end, you are left with a fairly clear idea of how to texture 3D models and the work involved. It is clear that it is a job that requires a lot of merit, and the professor manages to convey it.

To put a negative point on the course, although I like that it is based on Blender, it often uses Photoshop and ZBrush, which, unlike the former, are not free or open source. I don't know about the case of ZBrush, but everything he does during the course with Photoshop could have been done with Gimp, which is free and open source. I think the reason he uses Blender is because he prefers open source software, so it would have been more consistent to use Gimp instead of Photoshop. In the case of ZBrush, I think the alternative would have been the same Blender, so I don't understand why he doesn't use it to create high-detail polygons, to then make the bakes, instead of using ZBrush. At the level he uses ZBrush, I think he could have used Blender perfectly and the course would have been better.

In any case, I am glad I took the course and I recommend it to anyone who wants to get started in the more artistic aspects of video game development. That said, I recommend you wait for it to go on sale on Udemy, for less than €20 (which happens often). Don't even think about buying it for the exorbitant price they sometimes put it at.

20 October 2023

Game AI Pro 360 - Guide to Tactics and Strategy


There are many books about artificial intelligence (AI), but most are either very academic, take a purely educational approach, or focus on more applied topics such as machine learning and data analysis. The bibliography on AI focused on video games is very scarce, especially if you are looking for it in digital format (in my case Kindle).

However, one of the great authors in this field is Steve Ravin, not so much for his own contributions as for his work compiling those of others in his works. His is the series of books "AI Game Programming Wisdom" of which this is one of his latest exponents. As in the previous ones, each chapter of this book is an article by a different author, developing a concept related to AI in video games. Unlike the previous books, which had articles covering a wide range of areas, in this one all the articles focus on the facet of analysis and the making of tactical and strategic decisions.

The main value of the book is that the authors of the different chapters are professionals specialized in this field who work in reputable video game studios. Thus, the problems, nuances, and approaches they propose are backed by their extensive experience. The authors' competence is also evident in the academic air that emanates from each of their pages.

However, the main handicap of the book is precisely this: the work background of its authors. Coming from large studios, they must be subject to confidentiality clauses and I suppose that is the reason why they do not go into detail about specific implementations, since they could compromise the intellectual property of their companies. These authors can explain the general concepts adopted in their games, but they cannot reveal the details of how they have put them into practice without compromising the core of those games.

For this reason, the book moves at a very conceptual level in which they propose really interesting things, but it falls short when it comes to explaining how they have implemented them. Code snippets are conspicuous by their absence and when they appear they are mere pseudocode that in reality does not fully explain the concepts raised. There have been complete chapters in which I lost the thread after a few pages and I did not know how to fill in the gaps that the authors were leaving. In others I have understood everything they were proposing, but I was left wanting an example of a real implementation.

Probably I lack the level that the authors have, but my conclusion is that it is certainly not a book to get started in the field of AI for video games. For this, I recommend the book "AI for Games" by Ian Millington before this book. This last book, does go from an introductory level to a medium-high level and with all the details. I thought that this book would already leave me prepared for others, already at an intermediate level, but it turns out that not for this one by Steve Ravin.

Do I regret having read it? No. When I was able to get the hang of the chapters I enjoyed them and I came up with a couple of ideas that even though I don't know how to implement them yet, they have been suggestive enough for me to try them at the first opportunity.

Verdict of the book: not suitable for beginners, but an interesting read to get you familiar with the concepts that drive the AI of major video games.

10 August 2023

Unity Turn-Based Strategy Game: Intermediate C# Coding

Main cover for the course

A few weeks ago I finished the course "Unity Turn-Based Strategy Game: Intermediate C# Coding", available on Udemy

t is a course created by the GameDev.tv team and, above all, by an author who is already a classic of Unity tutorials: Code Monkey.

The course is paid, but even though sometimes they put it at outrageous prices, it happens to the rest of the Udemy courses: if you wait a few days with the course in your wishlist, they end up offering it to you for around €12.

Keep in mind that it is in English, so you must be comfortable with that language to understand the explanations. It does not have subtitles in Spanish, but it does have them in English, so I have left them enabled for when the pronunciation of a word has resisted me.

The content is a very detailed tutorial on how to create in Unity some of the usual mechanics in turn-based tactical games, of the X-Com type. While it is true that at the graphic level the developed game is nothing more than a mockup, it is true that it does explain, among others, the main mechanics:

  • Selection of objects with the mouse.
  • Management of grids for the stage.
  • Movement and pathfinding on the grid.
  • Camera management.
  • Game HUD.
  • Turn system.
  • Character animation.
  • Life and damage system.
  • Visual effects, such as trails or explosions.
In general, the quality of the content is very high and the programming used is clean, although in the grid section I am left wondering why he created his own grid from scratch instead of using the component that Unity includes. I have also been a little cold in the part of the implementation of the AI ​​of the enemies, which is minimal. Still, there are other sections that I have not seen in other tutorials or books, such as the one on destructible objects or the pathfinding in environments with multiple floors.

So I loved the course. I think it is very suitable for someone who wants to move from the basic level of Unity to more intermediate topics, especially if you plan to make your next game a board or turn-based game. It has left me such a good taste in my mouth that I will probably end up buying the course that the same author has on how to make a Tower Defense game in Unity. If I finally do it, I will say what I thought of it here.

24 February 2023

Introduction to Game Design, Prototyping, and Development: From Concept to Playable Game with Unity and C#


Introduction to Game Design, Prototyping, and Development: From Concept to Playable Game with Unity and C#
 by Jeremy Gibson Bond is a great book to start with game development. Whereas other books focus on Unity development, Bond shows his academic experience with an overall focus that includes both theoretical concepts and technical ones. It's well thought structure has an academic smell indeed, but this one is for good and will give a knowledge that won't fade in few years or few versions of your specific game engine.

The first part of the book is focused in theoretical topics beginning with a high abstraction level and descending afterwards to detail step by step. In fact, it begins describing the concept of what we know as a game and which are its elements and structure. Take note that I've said game and not specifically computer game. This book part concepts are so general that author encourages to practice them with pencil and papers. It's evident that Bond is a great board and role playing games fan, starting with D&D, by his several references to that kind of games and its mechanics. This part goal is that the reader can model the game in his head, focusing in the mechanic development needed to make it appealing to be played. In this part has been specially suggestive the layered structure for the different games kinds that are inside a game: there is the game intended by its creators when they designed its rules, there is the game that rises when the game is played at the table, and then there is a game than appears when people start to mod the game and evolves it beyond what its creators thought (modding fan will really enjoy this part).

The second part deals with game design. Starting from theoretical concepts different parts of a game are defined, first with paper prototypes played by different tester rings. Here is specially interesting the part where the subtle ways to guide player are covered. In this part event Agile and Scrum is covered. 

I think this two first part will be the most interesting for seasoned Unity developers.

The third part implement paper prototypes in technical prototypes, more similar to the end game. Here is where Unity basic topics start, from the very beginning starting from editor layout setup and later with C# Unity development. Those who already know about C# and Unity probably will read fast these pages, although I don't recommend to skip them because you ca still learn useful tips. I've developed a lot in Unity and I'v still learned one or two things.   

The fourth part is focused in prototype development to cover some of the basic game kinds. They are like mini tutorials being each of them a different game. Those who are starting with Unity development will find here and excellent way to advance learning even good practices. 

So, it is a complete book, well structured and didactic, with a lot of links and book references to continue after ending this book. I recommend it both to those who already know Unity and want to start with game design, and to those who are starting and want to learn Unity from the scratch.