CSGO Workshop 1 – Unreal Engine Print Messages
Completed the first workshop task for Coding and Scripting for Games (CSGO) for university. It was a very basic task in which you had to play around with variables, arrays and printing debug messages to the screen. You only had to do this task using Unreal Engines Blueprints but as I am wanting to be a games programmer and have worked with Blueprints before I decided to code this in C++.
This was my first time working with C++ but I feel I picked it up pretty quickly. To get the basics of how to working with C++ in Unreal Engine I watched this video which went through the very basics of how to create scripts, variables and how to compile your scripts with Unreal Engine. This gave me a jumping off point to start working through the tasks required in the workshop. It was quite difficult to actually convert what they wanted you to do in Blueprints into C++ as they work slightly differently and somethings just don’t exist in C++, such as the Sequence Blueprint. The code to print a string to the screen was pretty easy to understand and work with the thing I struggled more with was converting between data types.
Most of my programming work has been with VB where if I need to convert something into a string I add “.ToString” to the end. But in C++/Unreal converting from integer, float and boolean to string all had different methods which confused me and took a bit to get used to. One thing that I found particularly strange was that I couldn’t create a string variable I could only create a FString variable which is Unreal Engine own version of a string.
The final challenge task was the one I found the hardest. You had to allow the user to input single digits and add them to an array. I decided to make this a little more difficult by also printing this array to the screen when an item was added. What I initially struggled with was I first worked with C++’s array which is fixed which meant there was a lot more work to do when adding an technically infinite number of items to it. What I need to do was make it a circular array so the player could keep adding items and it would just replace the oldest item if it ran out of space. But instead I replaced the C++ array with an Unreal Engine array which is not fixed and made working with it a lot easier. In retrospect I probably should have continued to work with the C++ array as it would have been more of a challenge.
Overall I am happy with my first bit of Unreal Engine C++ coding. I picked it up quite quickly thanks to my previous experience with both coding and Unreal Engine. What I would have done differently would be to use the C++ array to challenge myself more.
Bibliography
Gorka Games. (2022, December 26). How to Use C++ in Unreal Engine 5 – Beginner Tutorial. www.youtube.com. https://www.youtube.com/watch?v=HNfpKFER2hI

