Introduction
This blog post contains some simple examples of prototypes I worked on during IMT&S. A more detailed description of every prototype can be found in the weekly blogs.
I have created a lot more smaller prototypes throughout the project, but only the noteworthy are mentioned here.
-------------------------------------------------------------------------------------------------------------------------------
Level Loading
- A C++ class with two different loading mechanics were created, each one having a different
   loading method.
- It is fully network synced, and both methods can be debugged through debug prints and event
   delegates.
- This was my first time creating a C++ class in Unreal Engine 5. It was difficult at first, but I got
   many extra features, such as dynamic multicasting (with automatic opening), loading
   percentages, debug prints, and better network syncing.
At first, compiling the C++ class gave an issue. When I would recompile the C++ code within the editor, it would recompile the whole project. This was not needed, since only one class had been changed. This would result in compile times of 30 minutes. After rebuilding the Visual Studio solution, the bug was fixed and only took 25 seconds to recompile the one class.

Figures
You can find the cpp file in Figure 1 and the h file in Figure 2.
Figure 3 shows the 'OnAsyncLevelLoaded' event located in the BP_VRCharacter blueprint. This automatically opens the level when asynchronized loading is finished.
Figure 4 shows the 'OnStreamingLevelLoaded' event in the BP_Warp2 blueprint. The event is called when the level streaming is loaded and the new level is being opened.
-------------------------------------------------------------------------------------------------------------------------------
Enemy AI
The enemy AI was the most complicated structure I have made during this project. The 'Enemies' folder already consist out of 12 folders and 56 files!
- The different enemy types all inherit from the same base class, AI controller and interface.
   Allowing for a dynamic and re-usable blueprint structure.
- They all inherit from the same base behavior tree, but have custom trees for their own enemy
   type.
- It is fully network synced, and all features can be debugged through debug prints.
- This was my first time creating such a comprehensive system in Unreal. It was difficult at first, but I
   got in many extra features, such as seeking, patrolling, and defense attacks when the player would
   get too close.
- The ranged enemy would keep walking around the player, trying to maintain its distance. This
   would however confuse the player, since they were mainly walking instead of throwing their
   projectiles. This is adjusted to make them attack more frequently and walk shorter distances.

Figures
The base inheritance structure through the files can be found in Figure 5.
Figure 6 showcases the structure of the behavior trees with its inheritance and subtrees.
Figure 7 shows the organization of the enemy behavior with the decorators, enums, EQ systems, services, and tasks.
-------------------------------------------------------------------------------------------------------------------------------
Menu Widgets & Save Data
Creating a main & pause menu widget and save data took up a lot of my time at the start of the project.
- An adaptable widget was created to support multiple dimensions of the screen.
- All buttons were linked to their respective behavior, and switching screens was made error proof.
- The settings menu took the most time, since this needed to be linked to saving and loading data.
   Loading the save data sometimes stil bugs out, but only in specific scenarios. If it happens, there is
   a function that sets all the settings to the default values we indicated.

Figures
The Event Graph of the main menu widget blueprint can be found in Figure 8. It showcases the core overview and structure of the main menu widget.
Figure 9 showcases the Event Graph of the pause menu widget blueprint. In here, the core structure of the pause menu blueprint and all button press functions can be found.
In figure 10, the Save Settings function of the pause menu widget blueprint can be found. It showcases how the save data is checked and stored.
Figure 11 showcases the Load Graphics Settings function in the main menu widget blueprints. In here, the structure that handles loading the data from a save game and applies it, can be found.
-------------------------------------------------------------------------------------------------------------------------------
Slicing (Procedural Mesh)
- A katana was made with a blade that can slice through pre-selected objects (in our case, only a
   square box).
- The katana can slice through pieces that were sliced before until a certain size, and can slice
   through multiple objects at once (it makes a list of all colliders and works through that list).
- When slicing multiple meshes at once, some fly away with a very high velocity. I have not being
   able to encounter this bug, since it is very specific, and we chose to not include it in the game in
   the end.
The katana has sadly not been used in the current game concept. It did receive positive reactions, but it doesn't fit with the current game idea.

Figures
Figure 12 show the Even Graph of the katana blueprint. In here, you can see the On Component End Overlap function that handles the slicing of the object with the help of Procedural Mesh Components.
-------------------------------------------------------------------------------------------------------------------------------
Figures​​​​​​​

Figure 3 - On Async Level Loaded (located in the BP_VRCharacter)

Figure 4 - On Streaming Level Loaded (located in the blueprint that started the level load)

Figure 5 - Blueprint Base Class inheritance of the enemies

Figure 6 - Behavior Tree inheritance of the enemies

Figure 7 - Folder structure of the AI part of the enemies

Other projects