The 'player' with a cylinder to identify its front face As part of this teaching blocks assignment for my Coding & Scripting for Games module (nicknamed CSGO...we don't talk about the O) I have to make a simple game or game system inside Unreal Engine 5. This is a solo project that everyone has to do individually but as the focus is on the code, things such as appearance and presentation are not important, lightening the workload. My idea for this project is simple: I intend to make a 3D platformer wherein the player has a dash and double jump ability which can be stringed together for impressive world traversal. At first, you may think that's too easy, UE5 already has most of that built-in...until I say that I intend to program it all myself. Why am I doing that? Because of how the built-in versions work. Jumping, for instance, uses the advanced physics engine which makes it momentum based. You need to run/sprint before you jump or else you will go nowhere. Not onl...
Logo by Ephraim Mananga Invincibility Frames A common design choice in games is to subtly give the player an unfair advantage over the enemy. This is because the goal is for the player to succeed, and it's important that a good balance is struck between the challenge of the encounter and the ability to succeed. One common design feature is invincibility frames, wherein the player enters a temporary state after taking damage where they cannot take any more. This gives the player time to react accordingly without losing lots of health. In many platformers, this is represented by the player model flickering, and so that is the approach that I took. Blueprints of the Invincibility Frames When the player takes damage, a boolean called Invincibility is set to true. This triggers the Invincibility Frames Controller which calls the Invincibility Event and sets a Delay. The boolean timer_control is used to stop the code being rerun as it is directly connected to Event Tick and witho...