Using Target-Based Development on SBCs
From here you can jump to the chapter selection for the book which will give you some hints and tips and corrections or information on updates to the 1st edition. The first edition was written for the Pi3, and as such it made use of the Pi3's graphic systems especially using Broadcom's BCM commands.
Since these graphic systems depricated with the launch of the Pi4, that code gradually became less and less useful, as the Pi3 also moved to the same graphic systems as the Pi4. This meant that the code in the original book is no longer going to work.
Of course I can't send you out new updated editons of the book so we have to just make it clear to you that a lot of the early content in the book needs to be done differently and here is where I will explain those differences while trying to keep the core content of the code the same and recognisable.
Take note of the new content, compare it to the book if you like, only the GLES and Input content is different but it does force us to use slightly different methods. The chapter content here will help you and if you still don't get it. Post questions in the forum.
Of course if you are a die-hard lover of the 2017-2019 era of Raspbian OS, I still have some of the old code available but you will have to email me for it.
One other big change is that we no longer use VisualGDB, so you don't have to buy any extra software unless you want to.
Although this is very much a beginner's book, it is not really aimed at a total novice who has never programmed before; you should be able to understand at least the basic concepts and syntax of C/C++ programming.
There are some excellent beginner's books I recommend to all my students, such as Michael Dawson's excellent Beginning C++ Through Game Programming, which though light on actual graphic gaming, is a superb foundation for C++. I will give some very simple getting started examples and build on those, so even the most code wary beginner should pick things up as they go.
None of the code in this book is complex, indeed it can be comfortably argued it's over simplified, it's designed as a jumping off point for a novice to expand their knowledge and most of the initial explanations are going to be understandable even for a total beginner. I'll start slow and explain much at first, but the pace will pick up as we get going and I'll let the online source code go into more detail as I explain the overall intent of what we are doing rather than the specific functions. If you still don't understand the syntax of the code, you should undertake a beginners coding course, there are several on line.
Also, despite the title, this isn't a book solely about programming Single Board Computers (SBC's). The use of a cheap target system is a means to an end to encourage the reader to limit expectations and work within tight constraints which game programmers, especially console programmers have to work with. I want primarily to focus on gameplay concepts and game structures which will let us get games up and running really quickly. However, we do have to introduce some technical concepts later, when we're a bit more comfortable, since most of these technical concepts will have a direct impact on the performance of your games. You will need to know just enough to avoid some pitfalls and get things up and running correctly.
SBC's are usually quite simple systems, so building a working knowledge of the fairly generic hardware to produce graphics, sound and data storage is generally easier to learn on them, than it would be on your up to the minute PC which will shield you from errors by virtue of massive processing performance and near unlimited memory.
Once understood, all of the concepts and projects in this book are easily transferrable to any development target where the reader can stretch their growing skills on more powerful systems while still being mindful of the need to work within constraints of hardware which are hard to push, as well as personal limits which should always be pushed.
But SBC's are really fun to work with, cheap to acquire and present a real sense of achievement when you make them to do more than just act as media servers or control units.
Most important, this is not a how to do x, with y kind of book. I want to take you through a journey of discovery, mine as well as yours, and provide suggestions and working examples on how to do things that games need, and let you decide if the approach I've taken is valid. I want to make you question things and hopefully come to different conclusions, using what I supply as a base for debate and expansion rather than a gospel to be followed. When working with beginners, I don't believe in imposing "the right way", I prefer to have faith in, "this works for me, can I make it better?". The "right way", for you at least, will come with practice and the joy of achievement.