top of page

The C++ Journey

While most of my programming experience has been done in C#, I recognize the importance of being able to develop in multiple languages. The following projects were part of a tutorial series on udemy.com titled "Unreal Engine 5 C++ Developer: Learn C++ & Make Video Games", which was designed in collaboration with Epic Games. These are some of the takeaways I received with each project and how they compare to my prior experience with C#.

ObstacleAssault.png

Obstacle Assault only features one C++ script, but already the differences between C++ and C# are made apparent. The distinction between header and cpp files is the first big departure from the consolidated single file found in C#. I found the setup of the header files followed by the implementation in the cpp file to be very similar to how interfaces worked in C#. 

CryptRaider.png

Crypt Raider is where include statements were introduced, a feature that is paralleled by the using statements found in C#. I appreciate the modular approach that includes offer, and helps to mentally map out the dependencies each feature relies on. This project was also when I encountered an issue with the C++ components disappearing between sessions, but this is a known problem with Unreal Engine and was fixable by refreshing the binary files.

ToonTanks.png

Toon Tanks was my favorite project of the bunch. The constructor for the tank and turrets is derived from a parent pawn class, which highlights the versatility of having slots from the constructor available to populate with your other game assets. My favorite takeaway from this project was the idea of forward declarations. By adding "class" before the variables that would require an include statement you claim that this is a thing that will be included by the time it is implemented. This allows for the compilation to be more efficient by keeping includes within the cpp file.

SimpleShooter.png

Simple Shooter had me navigate Unreal's method for AI controllers and behavior trees. Having previous experience with Unity's State Machine Behaviours meant most of the concepts introduced here were familiar. I was introduced to an alternative method of blending the basic locomotion animation, by using angle and speed instead of forward speed and strafing speed. Unreal Engine has a feature called "sockets" which allows for mounting points that other objects can latch onto, with the most common usage being a socket on a character's hand to be able hold weapons. 

bottom of page