Specialization

For my specialization, I've opted to create an FPS Aim Trainer with a unique twist—it incorporates elements of a rhythm game. Picture this: you're immersed in music while honing your shooting skills, whether it's hitting static targets or tracking objects to the beat (think OSU!). This FPS Aim Trainer isn't just about leveling up your aim; it's about turning practice into an exhilarating experience. Say goodbye to dull routines; here, you'll seamlessly blend music, precision, and skill to become the ultimate sniper across all games. At the sametime I will try to recreate a tool so that user can make a map on their own.

Since I have never work in Unreal before I first dive head first into reading some documentation and get used to how the editor in the engine works. And there are a lot of learning curves while I try to make the game and tool purely in C++. There are a lot of good practice and standard that I learned while reading the documentation like using TObjectPtr and predefine classes that gonna be use in my own class header so the compile time can be reduce.

Right of the bat I got into problem trying to figure how to spawn my default character into the scene. And as I read about how to adjust project settings I realize that it is also good to combine both C++ and Unreal Engine Blueprint scripting system. So after some hours of playing around in the editor and reading I finally figure out a way to spawn my character into a level and set default parameter for the gamemode.

Next step I try to figure out how to spawn a character class that can move around in the world and look around. There are some old sources talked about to use the old input system from UE4 but it seems like it had been deprecated since release of UE5. Then I start to look into how to use the new Input Action and Input Mapping Context of UE5 and got it to work with looking around and moving with WASD.

The tricky part that I was trying to do here was to figure how to not let the camera see the character mesh but at the sametime can see mesh shadow on the ground. I tried to tinker with all the setting in character mesh both in editor and in my character class. Finally I got the setting that solve the problem and produce the result that I wanted. I then had to render out a crosshair in the middle of the screen. This part was not as tricky, I just need to create my own HUD crosshair and calculate the middle of the screen and finally add in the crosshair texture to the HUD.

Moving to the next part of creating an FPS game is to spawn projectiles from your gun position or in this case I want it to shoot from the middle of camera pos. Learning how to use TObjectPtr from Unreal was a game changing for me. So after I can see the usage of TObjectPtr I swap out all the raw pointer in all my classes. This gives me an edge in debugging while I try to figure out how to spawn projectiles with material and texture.


While creating BP from my base class and then link the BP class to my Character class. Was the most frustrating part for me while learning UnrealEngine. I keep failing to compile the code and working with BP and C++ at the sametime sometime can create a lot of crashes since I not used to it.


After lots of retry and reading through all the usage of TObjectPtr I tried to hunt down all bugs that prevent me from having my gun shooting projectiles. You can see here I finally got it and it was great! I feel that I really getting into this and actually putting my knowdlege into working in Unreal.

Then I make a script to spawn 5 to 6 spheres in a random position but clamp there spawning position only in front of player when player spawn in. They have different colour because my initial thoughts is they gonna have different point. Red means you will get no point when shot, yellow means 50 points and green means 300 points. Also you can build up combo but I havent implement it yet. I did make a core gameplay mechanic that when you shoot the ball it will disappear.

After this step I was working on a tool that can take in a music file like ogg or wav and then can show a bar of how long the song is. On the bar you can press on the timeline that you like so that during that timeline it will spawn a sphere in a random position just like before. Then the sphere gonna change color from red to yellow and then to green in a window of 5 seconds. After that when it turns green it will stay still for another 1.5 secs so you can do micro adjustment. Then I tried to make a tool and working on it HUD, but when I tried to reparent the tool class to my tool C++ class it gives me a lot of error and then just crash the project totally. When I tried to reopen the project it keep crashing at startup and asked me to build it from scratch I have no luck in doing that. My heart and motivation just sank afterward since all my hard work in a week just dissappear like that. Lucky enough I still have the old version of the project before I implement the tool. So atleast I still have a little bit of progress.



I will try to reimplement the tool and will improve it from the last time I did it. I'm thinking of create a map editor tool just like Osu! so user can create their own map and let their creativity run wild! I will keep working on this project because I really like the idea that I have here. There will be a lot of challenges when making the editor tool but I will work on it slowly. This will allow me to give all the users and players the tool to help them improve their aim and creativity.


Overall I was very pleased to be able to create everything from scratch and incoperate both C++ and Blueprint together. This project (although failed half way through) I still working on during my spare time. What is important for me during this project is how the journey has been for me. From knowing nothing in C++ and no knowledge about Unreal game engine before I would say I have come really far. Reading through all the documentation and being up to date to any new standard or tool that any engine provides was a hugh learning curve for me. Although it would seem very easy when you looking at it now, for me it was a huge step to be able to use all the knowdlege that I have and understand the tool and what it can offer will help me a lot on my path to making this project come true.