Side Scroller C++ Project DevBlog
I’m Long Nguyen and at the time of writing this, I’m on my third and last year of studying Games Design. For my last game project before I graduate, I wanted to study and use a new programming language to gain more experience with video game programming. After researching the most used programming languages in the video game industry, I chose C++ as my language since this is one of the commonly used programming languages that is also used in Unreal Engine which is one of the commonly used game engines (GameDeveloper, 2019) (GeeksForGeeks, 2025).
Clip of finished project
Entry 1
This week I began on the C++ project, but before I start on anything, I read up on the basics of C++ on Unreal Engine. The programming language looks a lot harder than the other languages that I know but it has a lot of similarities to C#, so I think I’ll be able to learn this quick. However, there are a lot of differences such as the .cpp and .h file which is a completely new thing to me. From what I’ve read the .h file is called a header file allows you to declare all the variables, classes and functions which will then be added functionality in the .cpp file.
I figured out the way to do this in Blueprinting would be to add a variable in the components of a blueprint then changing the variable in the details tab. Converting my Blueprinting knowledge into C++ helped a lot in understanding how everything works together in C++ on Unreal. C++ also has a feature where you have to include files in the C++ class files to be able to use specific commands.

Adding the variable like in the Header file
Giving functionality to the variable like in the .cpp file
Other than having two separate files for one class, C++ has a lot of similarities with C#, so I was able to work out most of the coding and was able to start on my game project. I wanted to create a beginner friendly game on Unreal Engine but not too easy so I can learn and do things on my own with C++. After researching, I found a great tutorial for a side scrolling runner game by AwesomeTuts. They also provided a small beginner C++ Unreal course before starting the project which helped tremendously in me understanding C++.
​
Entry 2
This week, I finished following the tutorial and learnt an incredible amount thanks to AwesomeTuts and his explanation on why he added specific things and how they work. However, I have encountered problems such as launching the project through Epic Games launcher doesn’t seem to sync with the C++ files on launch. The only fix I could find was to launch Visual Studios and open the Unreal project through Visual Studios.
​
So far, I find C++ still extremely difficult to learn and having a hard time doing basic things such as making a widget or creating an actor that disappears when you touch it. All of these difficult things on C++ I could easily do on Blueprinting.

GIF of game project after the tutorial
Entry 3
This week I focused on brainstorming ideas on what to implement into my game. The only side scrolling endless runner games I’ve played are Gravity Man and Jetpack Joyride. In both these games, score is calculated by how far you have gone and there are powerups that allow you to be invincible to obstacles and speed boost the player to gain more score points.
I tried to simplify those mechanics and decided to make the score increase by collecting coins instead of how far you go. To make the game more difficult, I plan to add enemies that move by patrolling point to point to delay the player but not too much to lose momentum. As for the end​ goal, I would like to have it so that there is an end and the player wins a level by going far enough.

Trello board of what I plan to do
Entry 4
After a 4-week break, I had to refresh on C++ and refresh my mind on everything I did in this project. This week I plan to add the score item and the HUD that shows the player the score counts and a timer that ends the level when it reaches 0. For the HUD coding area, I had to follow another tutorial since I didn’t understand anything about adding widgets using C++.
After coding for a couple hours, I encountered a major problem I couldn’t figure out that should be simple to do. The problem I encountered was trying to get a variable from another header file into a separate .cpp file. I’m not sure if my approach is wrong but I can’t figure it out.
​
After trying for a couple of hours on how to add a timer widget, I couldn’t figure it out so I decided to scrap the idea of having levels and a timer and to create the game into an endless runner where the goal is to survive as long as you can and get as many coins as you can. Although there were a lot of setbacks, I did get the scoring to work and have an actor that disappears upon collision to add to the score counter.

GIF of the widgets and score item added
Entry 5
Opening the Unreal Project still persists to be an annoying task as every time I open through the folder, some C++ files don’t sync with the blueprints in the project which leads the blueprints to be bugged. After trying to find a fix for hours, I realized that I needed to compile and build the code into the game.
​
Another very small mistake that costed me a lot of time was trying to figure out how to do the patrol points of the enemies. The error was that I couldn’t get a reference to the enemy actor. After a very long time trying to problem solve this error, I consulted a friend that was more proficient in C++ than me and asked for his help. It turned out that I was trying to give functionality to the reference inside the header file without realizing.
​
After moving the code line inside the .cpp, it finally worked, and I was able to progress with the game project. This taught me to be extra careful on where I’m entering every line of code and whether if it’s in the right files and to understand what every line does. The last thing I really disliked is the slow compiling speed every time I make a change in the code. Even if its one singular line that I change, it takes a while to compile and load. I couldn’t find a way to speed up the compiling speed, so I left it and just had to be patient.
​
I found the game too boring after a while, so I decided to make the wall gradually gain speed every 15 seconds to make the game slowly get harder. This was achieved using the FTimerHandle function in Unreal. To balance it and not die once it exceeds the player’s speed, I’ve made it so collecting 5 coins makes the player move faster.

GIF of the score counter going up whenever the score item is picked up
Afterwards, I went on to make more levels that will randomly spawn to make the game more enjoyable and not always the same run each time. When making the levels, I kept in mind how I want the player to move and tried to make the levels not slow you down too much where it will make the game unsatisfying. The enemies and coins are placed on specific spots on each level. Enemies have patrol points that make them move back and forth. The enemies are a subclass of the spike obstacles, so I didn’t have to do any extra coding for when the player collides with the enemies. The movement of the enemies are made by using a float curve timeline to allow the enemy to lerp back and forth in a fluid motion. I also changed the colour of the coins to make it slightly more vibrant and easier to notice.

All 10 levels that randomly spawn in game
Once the game had a loop, I wanted to add a game over screen to allow the players to see what their final score was. This was a lot easier now that I know how widgets work in C++.

GIF of the Game Over screen and enemies moving
Reflection
Throughout this whole development journey, I learnt a lot of C++ in Unreal. I found this project to be really valuable to me since I got to expand my knowledge of a completely new language I’ve never touched and was able to problem solve many new problems I’ve never faced with Unity or Blueprinting in Unreal. The process of making a side scrolling game was also a new experience for me since this was the first time I touched this type of genre of video games. Understanding how to make this type of game enjoyable and as fast paced as I can make it was a valuable insight.
​
I’ve also learnt I can be careless with very minimal things which take up a lot of time and upon realizing my mistake, it demotivates me a lot as the solution was very easy to find and the mistake, I made was incredibly careless. Hopefully, after this experience I’ll be able to gather information and understand a lot better than now.
I encountered a lot more challenges than successes in this project, but they were all an enjoyable experience even if some of them didn’t work out. I consider all these encounters a great learning experience to my skills as a game developer and helped my understanding of game design.
Conclusion
This concludes my DevBlog of my first C++ game project. There were a lot of downs but there were ups that made the whole process enjoyable. I’ve learnt many things like not to be careless and carefully understand and know where I’m writing the code. This project helped me to not only just C++ but also a wider variety of skills like problem solving unique problems in C++ and understanding how important management of multiple code files and code lines is in C++. Having these sets of skills develop helped me grow as a game designer and will help me a lot in the future.
​
If you would like to play the game, I will leave a link/button that you can download from and play it yourself. If you would like to see my other works on both Unity and Unreal Engine, check out Perfect Pink and Bonehead in my portfolio tab! Thank you for reading.
References
GameDeveloper - Most used game engine: https://www.gamedeveloper.com/production/which-are-the-most-commonly-used-game-engines-
GeeksForGeeks - Most used programming language: https://www.geeksforgeeks.org/programming-languages-for-game-development/
AwesomeTuts C++ Tutorial: https://awesometuts.com/blog/cpp-unreal-engine
Jolly Monster AHUD Tutorial: https://www.youtube.com/watch?v=lYfXkxlInVI