Overview Of This Week
I made it my main priority to complete the last fundamentals tasks as well as clean up a bit of my code. My final fundamentals tasks to complete was:
- Something that counts down an ability cooldown – such as jump frequency
Something that counts down an ability cooldown – such as jump frequency
The cooldown ability chosen was for the switching of the worlds. The new code for how the worlds will be switched will be shown below:



This script is held within the main character script. Essentially, this script heavily relies on a timer that keeps looping the script over a set period of time and when that is finished, the player can switch the world again. The actual bar changing in real time is held within the UI component which will be shown below:

Cleaning Up Code
Looking at my code I saw that a few methods had to be cleaned up. Some of the simple ones were nodes not being used that needed to be deleted and the use of sequences was implemented to make the code more readable. An example will be shown below:

Documentation was also done to guide myself in the future if I want to check specific types of methods to implement. My main goal was to stop using a game instance as a game manager for certain tasks. This is because the game instance serves more of a purpose as an intermediary when switching levels rather than functions in the level. This is when I split up the BP_GameManager into actors named portal_manager and coin_manager. It took a bit of time finding where to implement and optimise the code but I ended up completed.
Extra Things I Have Learnt Or Problems I Have Solved This Week
- Whilst implementing the portal_manager I found a small technical problem within portal blueprint. I found that the Boolean that checked if the player already teleported should really be a responsibility for a game manager. This is where I implemented it to the teleporting player function. This will be shown below:


- It is also worth to note that the Pop Portal Queue was also in the portal blueprint which knowing now shouldn’t really happen as, again, it is the game manager’s responsibility. By putting it in the portal_manager also allows for future compatibility when the developer might not want a portal to be popped out of the queue when the player teleports.
Plans For Next Week
Since my fundamentals are now complete, the next week will involve planning for my indie game project as well as starting my GDD.