Hope in the face of despair.

Update

Its been a crazy and interesting stretch.

I've worked at learning more about Unreal engine and C++ over the last four months. As part of a class, I took this semester as a directed study course, I took it upon myself to increase my familiarity with C++, how it's used in Unreal Engine and how C++ classes relate to Blueprints. Once I had a better understanding of that, I wanted to apply this knowledge into creating different enemy types for the game and working on local and network multiplayer for the game. I used three online courses through Udemy as the main points of learning during this time. They were the following:

Unreal Engine C++ Developer: Learn C++ and Make Video Games by Ben Tristem and Sam Pattuzzi

Unreal Engine 4 Mastery: Create Multiplayer Games with C++ by Tom Looman

Unreal Multiplayer Master: Online Game Development in C++ by Ben Tristem and Sam Pattuzzi

Before jumping into any of those classes, I did some reading to get familiarized with C++ concepts. So I read a bit of Beginning C++17 by Ivor Horton and Peter Van Weert. For a programming book, it's not especially long at about 700 pages, but I found myself retreading a lot of material that I have covered before in reading some of Stephen Prata's C++ Primer Plus. I soon found that reading through the book would be great if time weren't a factor, but I decided that it was probably a better idea to start getting my hands dirty. So after gaining a bit of an understanding of some of the differences in the changes that have come with C++17, I began to go through the tutorials from Unreal Engine C++ Developer: Learn C++ and Make Video Games (Tristem and Pattuzzi, 2019). This course started off going through the process of making a simple console game in C++. This served a great primer for learning how Visual Studio works. How C++ .h and .cpp files work together, how classes are created, need to be declared and all about how namespaces work.

I then went through the second lecture in this course where I began to see how C++ is used within the Unreal Engine paradigm. At this point, things were still quite new and unclear. To supplement this I began doing extensive reading of the Unreal documentation in order to gain a better grasp of the overall framework of how Unreal works. This was where I really began to gain a much better understanding of how things worked and I also began to see why some of the material in the video tutorial stated why certain things were important. By reading the documentation, I gained a good understanding of how things were interconnected and the relationship between C++ classes, Blueprint classes and Blueprint visual scripting in general. I spent quite a bit of time familiarizing myself with as much documentation I could find related to working with Unreal using C++.

Eventually, I began to watch the video Unreal Engine 4 Mastery: Create Multiplayer Games with C++ by Tom Looman. This video for me was where I learned the most about working with Unreal on a practical level. The course instructor is highly experienced and knowledgable about coding in Unreal. His course was directed to a more intermediate audience that the other two, which by this point, I was ready for. Going through the first few sections allowed me to adapt the game I've been working on to incorporate win/loss conditions, leverage the power of C++ classes and Blueprints in a complementary fashion. It also gave me an even deeper understanding of the workflow required. I gained a good understanding of working with Visual Studio as the main IDE for Unreal C++ development. It really demystified a lot of the things I had been unsure about up until that point. I did run into a few major problems as I was adapting the tutorials to the game that I was making which required a good deal of troubleshooting and problem solving to figure out. I was eventually able to work out what had gone wrong which seems to have been a bug in the way the version of Unreal that I was using works with C++ classes and Blueprint implementable events. I was able to fix the problem eventually, but the process of figuring out what went wrong and how to fix it was where I really started to gain confidence in my abilities to code the rest of my game.

Incidentally, I've dabbled with both Unreal and Unity for several years, but generally ran into a block when trying to code something. However, after having gone through this process, I was able to code some basic platform game functionality along with animation state changes depending on what the action the character was doing with relative ease. The major take away was the increased comfort and understanding in one engine and one language carried over to a different engine using a different language. In the case of Unity, C#. This was a welcome surprise, but also confirmation of what I believe which is that if I can learn how to do things in Unreal with C++, then other engines and other languages would be a lot easier. It was nice to see this borne out a little bit in this simple example.

Finally, as for the functionality that I was able to implement in my Unreal game project, I was able to setup the win/lose condition as I stated earlier. I was able to set up local and networked multiplayer functionality which worked for the most part, some things still needed to be tweaked. But the win/loss condition was a replicated from server to client and vice versa. I included simple stealth game enemy AI, using a function that exists in Unreal which allows enemies to sense the player via sound and sight. I had enemies with different AI. Most importantly, I now possess the fundamental understanding required to continue developing in a self-directed manner. I know how to look for functions that already exist in the engine's library to get the functionality I require, and I know how to leverage Visual Studio to track down the includes I need for certain functions along with the overload options, and the types of parameters that need to be passed to a function. I understand inheritance and why certain classes are used for some things and other classes are used for others. For example, an Actor class is used for most game assets and logic, while a Pawn or Character class would be used for a user possess-able avatar. In the case that the avatar is like a vehicle or something non-bipedal, you might use a Pawn class, and in the case of a humanoid character with a skeletal mesh and animations, you'd likely use a Character class. Each type extends from the Actor class but add certain functionality that is commonly required for possess-able avatars. I learned a good deal about working with pointers and references. The way it's handled in Unreal provides a good example of something that previously seemed somewhat abstract and complex. Now it just makes sense while also seeming like a logical option wherever they are used/required. Lastly, I learned the relationship between Blueprint Classes and C++ classes, namely, how to create variables and functions in CPP and expose them in a Blueprint class that extends from the C++ class by using macros within C++ that are understood by the Unreal Engine.

Overall, it has been a wonderful experience and I can't wait to dig into it even further. I just wanted to become competent, but now I'd like to obtain mastery. That will come with time, increased exposure, overcoming obstacles and lots and lots of reps.

Below is a video of the game being played multiplayer.


Post a comment

Next Organizing and making sense of tons of sketches

Gladiotron