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.