Looking for more advanced training to help you better understand how to actually build something in C++? Want to go beyond example snippets that don’t really teach you anything? How about being able to ask questions or get feedback on a suggestion?

You can get all these things by attending a live game development session. This is where you get to watch and participate as I work on building a game. This is real code and unscripted.

And now through the middle of January 2019, you can get a free game development session bonus when you sign up to be a patron of Take Up Code. This bonus is normally only for those patrons who choose the $10 per month game development session tier. You can get a free game development session bonus when you sign up to be a patron at any tier, now through the middle of January 2019. Just $1 a month is enough to become a patron.

And for that $1, you also get access to a special podcast just for patrons. There’s already a whole series that you can listen to that will explain databases, how to use them, what they are, the differences between SQL and NoSQL databases, and even my number one suggestion for avoiding security attacks in your data.

What can you learn in a game development session? Well, for one, the project I’m working on is starting to get big. Not as big as what you might find working in a large software company like Microsoft. But definitely big for what one person can create over several years. You can see and learn for yourself how to manage a large project.

But more than that, you get to understand all the work that goes into the project even between commits. I try to commit regularly but even that leaves out all the small things that I try and then change my mind about. This is super important for you to understand because it’s how software actually gets written.

When you read a book or watch a tutorial online, you’re getting an edited account that makes it look like the developer knew exactly how to proceed and just started writing the final code. Sure, sometimes it does work out like that. But not often. And this can leave you feeling lost and confused and maybe even thinking that you’re no good at writing code because your own attempts don’t turn out anything like what you read or watch.

For a specific example, I was recently working on a hashing class. You can create a hash of different lengths. I mean a different number of bits. But the hash algorithm I was implementing only works with a couple fixed sizes. You can listen to the full episode or read the transcript below as I describe in about two minutes what actually took me several hours to create.

All you have to do is visit takeupcode.com and click the Patron link at the top to get started. This will take you to a site called Patreon that I use to manage and coordinate patron registration and bonuses. While you’re there, check out some of the other creators that I support. It’s a great way to help creators such as myself and get valuable rewards at the same time for yourself.

Transcript

You can get all these things by attending a live game development session. This is where you get to watch and participate as I work on building a game. This is real code and unscripted.

And now through the middle of January 2019, you can get a free game development session bonus when you sign up to be a patron of Take Up Code.

This bonus is normally only for those patrons who choose the $10 per month game development session tier. You can get a free game development session bonus when you sign up to be a patron at any tier, now through the middle of January 2019. Just $1 a month is enough to become a patron.

And for that $1, you also get access to a special podcast just for patrons. There’s already a whole series that you can listen to that will explain databases, how to use them, what they are, the differences between SQL and NoSQL databases, and even my number one suggestion for avoiding security attacks in your data.

If you want to attend regular game development sessions, then $10 per month will already give you a free game development session each month. So if you choose this option, don’t worry, I’ve got an even bigger offer for you. Now through the middle of January 2019, when you sign up to be a patron at the $10 per month game development tier, you’ll get four extra game development sessions to use whenever you want throughout 2019. That’s a $100 dollar value of extra bonuses on top of your already free game development session each month.

What can you learn in a game development session? Well, for one, the project I’m working on is starting to get big. Not as big as what you might find working in a large software company like Microsoft. But definitely big for what one person can create over several years. You can see and learn for yourself how to manage a large project.

But more than that, you get to understand all the work that goes into the project even between commits. I try to commit regularly but even that leaves out all the small things that I try and then change my mind about. This is super important for you to understand because it’s how software actually gets written.

When you read a book or watch a tutorial online, you’re getting an edited account that makes it look like the developer knew exactly how to proceed and just started writing the final code. Sure, sometimes it does work out like that. But not often. And this can leave you feeling lost and confused and maybe even thinking that you’re no good at writing code because your own attempts don’t turn out anything like what you read or watch.

You also don’t get to ask questions in real time. It’s all after the fact if even then. You definitely get no chance for your question or suggestion to change the development. Maybe while participating, you think you would have done something in a different way. Just mention it, and you’ll get a conversation going that will help you understand the differences between the solutions. You might even have a better solution. You’ll learn either way.

It does take time to learn how to code. One way to speed up this process is to incorporate different learning methods. If you only watch YouTube videos, that’s not enough. If you only read books, that’s not enough. If you only attend lectures and presentations, that’s not enough. You need to do as many different activities as you can. There’s nothing quite like attending a live session to bring you back to reality and see firsthand how software really gets written.

The code that I’m working on uses some advanced C++ techniques. And it’s all modern C++ too. My main development tool doesn’t yet support all the modern C++ features that I’d like to include. So this is well past C++11.

And of course, this is a video presentation. It’s not an audio podcast anymore. You get to see the code from anywhere in the world. All you need to join is a computer with a decent internet connection. I recommend headphones with a mic just like you might use for playing an online game.

We’ll talk about more than just C++ features. You’ll be exposed to design patterns, creating your own template and specializations, custom data structures, algorithms, and well, pretty much everything, really.

All you have to do is visit takeupcode.com and click the Patron link at the top to get started. This will take you to a site called Patreon that I use to manage and coordinate patron registration and bonuses. While you’re there, check out some of the other creators that I support. It’s a great way to help creators such as myself and get valuable rewards at the same time for yourself.

For a specific example, I was recently working on a hashing class. You can create a hash of different lengths. I mean a different number of bits. But the hash algorithm I was implementing only works with a couple fixed sizes.

So I first created a template class called HashSize with an int value template parameter. This is one of C++’s greatest strengths, the ability to create templates based on not just types but values too. If you look at a language like C#, it has the ability to create generic classes that can change based on types. But the C# language creators never included the ability to create generic classes based on values.

The HashSize template that I created needs an integer value in order to construct it. You can create a HashSize instance with a value of 5, or 105, or anything you want and these become different and distinct types. They’re not just the same class type with a different member value. The value becomes part of the type itself and doesn’t need a data member variable to hold the value.

This is a good start but isn’t exactly what I wanted. I wanted to limit the values that could be used in the hash algorithm to just 32 or 64. You might think an enumeration would be good for this. And that could work. But an enumeration can hold other values. Plus I eventually wanted a method like getHash that would either return a 32 bit value or a 64 bit value and have different implementations for each. That means I needed something that could change the return type of a method. In other words, I wanted to start out with a value such as 32 or 64 and then use that value to control the return type as well as the entire algorithm of the getHash method. For this, a value itself like an enumeration just wouldn’t work.

What I eventually did was to create two full template specializations of the HashSize class. And in each template specialization, I declared a using statement called HashValue to be either a 32 bit integer or a 64 bit integer.

Then in another class called the HashGenerator, I made it also a template based on an int value. And inside this class, I declared another using statement also called HashValue that made use of the HashValue inside the HashSize template specializations. This might be a little hard to follow with just audio, so don’t worry if you don’t get everything.

The important part is that if a user tries to create a HashGenerator of say size 5, it will then try to make use of a HashValue inside the HashSize 5 template. But since HashSize was never specialized for the value 5, then the HashValue doesn’t exist and the user would get a compile error.

If instead, the user creates a HashGenerator 32, then it will try using the HashValue inside a HashSize 32 which does exist and everything works. The HashGenerator 32 instance now knows both how many bits to use, 32, as well as the proper type to use, an int32.

Now, I described all this in just a couple minutes. And I could describe the whole thing in a video in just a couple minutes also. But it actually took me several hours to initially figure out how I wanted to write all this. I tried several approaches and had to think about what I wanted and if the current code would meet those needs. I changed my mind several times and tried things that didn’t work. Some wouldn’t compile and some wouldn’t run or would crash. This is how software is written.

You can participate and learn firsthand by joining one of the live game development sessions. And for a limited time, you can get a free game development session by becoming a patron.

Feedback

What's on your mind?
On a scale of 0 to 10, how likely are you to refer us to friends?