Diving into Unreal Engine
This project for my portfolio class was my first real delve into working in Unreal. Previously, I have done my game dev work almost exclusively in Unity. The last time I tried Unreal, we worked in 2D which we discovered was a mistake but by the time we really realized that it was too late to switch engines, so I wanted to start over and have a better experience learning Unreal and its similarities/differences to Unity as well as capabilities in general.
In the first week of development on this project, I spent most of my time just exploring Unreal’s interface and looking at blueprints. I started with the base 3rd person 3D project template, and messed around with the character movement and gave my player a double jump.
In the second week, I spent most of my time fixing my laptop and replacing a swollen battery so I was able to do work without worrying about my laptop dying. However, when I was able to do work on this project, I looked into detecting user input, and then figured out how to change the size of the player depending on the input (1 = small, 2 = normal, 3 = large).
In week three, I made a lot of really exciting progress. I was looking at the size change of my player, and I wanted to figure out how to make it not happen immediately. Now, if I were using Unity, I know exactly how I would’ve gone about solving this problem using lerp and delta time. However this was Unreal, so I had to do some research and mess around until I figured out the best way to access time. Eventually, I figured out how to make a lerp function that was called OnTick when the player’s size wasn’t equal to the target size. This enabled me to be able to smoothly transition from small to normal, normal to large, and even small to large or vice versa.
This was an exciting week for me because when I started looking at this problem, I had no idea how to go about getting Unreal to do what I wanted it to do, and thought I might have to give up on this specific goal or get around it with something convoluted and annoying. But with a little perseverance and the help of google and trial and error, I was able to get to a solution that both had the desired effect and was *not* an obnoxious amount of work that I had to copy and paste a bunch of times and barely edit.
In the final week of this project, I decided I wanted to focus on how else I could make the changing player size impact gameplay. I knew I wanted the players speed, jump force, gravity, and mass to all be affected, but I didn’t know a way to go about this that wasn’t incredibly tedious and took up an annoying amount of blueprint space. That was about when I found macros, and then was able to put the slightly tedious/repetitive switch statement contained in a structure that allowed me to call it without having an extremely convoluted blueprint. This also led to me figuring out switch statements in blueprints, and how to best set up my macro to be as effective as possible in achieving the result I was hoping for.
Throughout the 4 weeks of working on this, my vision for it changed quite a bit. When I started, I didn’t really know what I wanted out of the project other than to get more familiar with Unreal. By the time I got to week 3 I knew I wanted to mess with player movement, but then ended up focusing more on changing the player size as a mechanic and what else I could do with that. I’m no level designer, and didn’t have the time to implement a level that would show off this mechanic, but I definitely can see use cases where changing the players size, speed, and jump height could be utilized to solve different puzzles or get through/interact with the environment in different ways.
Overall in this project, I learned a lot about Unreal Engine and what it feels like to work in it. I am definitely a lot more comfortable working in it in general, and the thought of diving into other aspects of Unreal such as animation, graphics, and using C++ code in addition to blueprints is significantly less daunting than it was about a month ago. I am definitely looking forward to future projects in Unreal, and my curiosity about what other kinds of projects would be well suited for Unreal, especially as someone interested in graphics programming.