Swingbot is a 2D platformer where the player controls a robot using a laser rope. The players goal is to make their way through the level in the shortest amount of time. At the end of the game you can save your score online. During the project my work started out with the swinging mechanic, once the core was implemented, I moved over to the UI and the score system as another scripter took over the polishing of the swing mechanic.
Unreal Engine 4.13
The project was very short and my first project in the Unreal Engine. Jumping into fast-phased production after having being introduced to the engine so recently taught me a lot about both the engine and working under pressure due to the short deadline. The swing mechanic was the core of the game so most of the scripting time was put towards it by both scripters. This allowed for a great amount of polishing and it taught me a lot about collaborating with another scripter.
The online highscore system was a feature that allowed the players to store their scores online, we wanted to keep track of the best times and it added a very good competitive feeling to the game. I setup a web server along with a MySQL database and began writing the PHP scripts. To retrieve and send the score information I used HTTP Get and Post requests. At the end of each game, you would see a list of all the scores along with the player name. You could then fill in your name and add the score to the database.
In order for the game to know where the players mouse is pointing, we added an invisible wall at the same Z location as the bot itself that we then raycasted to from the cursors position on the screen. We had it trace at a new trace channel to avoid collisions with world objects such as props that were closer to the screen. From there we did a second linetrace from the bot into the direction of the cursors location. Using the second raycast from the bot towards the mouse location, we could make sure that the bot managed to find a target even though the cursor was not directly pointing at it.
Post-mortem & Takeaways
During the Swingbot project, I learned a lot about Game Design and scripting collaboration with another scripter. Over the course of the project, I had close collaboration with the second scripter, discussing blueprints, problems, solutions and mechanics. Close communication and discussing our thought process helped us speed up the development. Because we worked on the same blueprint class, we could also follow each other's progress throughout the project.
As the scripts were implemented, we continuously gathered feedback from group members and other students. This helped us a lot with the tweaking of variables and visual feedback by observing their gameplay.
Implementation of the online score system brought challenges with plugins and their limited amount of support. Since this was something new that we wanted to try out, we could not foresee the time it took to ensure proper implementation. By iterating in small steps, we managed to meet our goal of having the functionality implemented before deadline.