Posts

Showing posts from October, 2023

Revamping the player's attacks

 I have begun looking into adding the multi attack feature for our game. We originally had it set where the attacks were all placed in an animation slot to play them while they were in an array. This unfortunately does not work too well with attack animations due to the attacks constantly cancelling out. This has forced me into finding new and better ways to implement a multi attack in order to fluently and properly function within the game.  In order to fix this, I plan on revamping the entirety of the attack animations including the functions I  currently have set up for the attack to hopefully get the outcome I am aiming for. Within this, I want to  start with a bool that is checking whether the player is already attacking. Once this bool is false, it will  begin the incrementing of the attacks. I then will add an if statement checking if the combo has reached  the maximum amount of attacks within the combo, in which I will have a function to reset the c...

Where are the packets going?

Image
 This week I worked on updating the item system for our project and accidently found myself with a pretty game breaking bug. After our player picked up a number of in-game packets the game would crash due to the item factory losing its information about the items to be created. After many hours of debugging and research a solution was found. I ended up splitting the original TMap,  used to hold all of the items, into two different TMaps. I did this because the original TMap consisted of two different types of data structures. By splitting up the lists I reduced the possibility of the wrong item being used elsewhere in the script. The ultimate issue was most likely due to casting to many times or incorrectly.   Author: Zachary Giffin Posted: 10/27/2023

Fixing The Issue Of Players Saved Information Not Loading Between Levels Anymore

 A bug arose where the players saved information of the bean counts was no longer loading  when traveling between levels. This is an issue as a major part of the game play loop is being able to gather different types of beans to unlock more levels and boss rooms. This is also inconvenient to the player as it may make them feel like their efforts to collect are pointless. BEANS AND PACKETS SAVING BETWEEN LEVELS While debugging ,  I came to the conclusion that the issue was because the Game Mode of the active level was calling its begin play before the player. This was causing the error because the function in the player that took in the saved information called upon a widget that was not yet created. Since the solution to the problem would require changes to the player. The team got together to discuss the necessary changes we needed to make. It led to us also deciding to adjust how we were doing the items for the player to make other aspects of the project smoother as wel...

Tackling the Ability Shop Conundrum: A Game to Balance

Image
    Once the ability shop was up and running, everything seemed to be working smoothly. However, a glitch emerged when the save system and the ability shop started interacting. This unexpected interaction caused the shop's cost values to plummet to zero. Consequently, players could exploit this flaw to easily amass upgrades, effectively negating any challenge in the game.   Determined to address this issue, I delved deeper into the intricacies of the save system and its communication with the ability shop. Upon investigation, I discovered that a save file was immediately generated when starting a new game and was used to load the introduction scene. This presented a problem because the cost variables were initially assigned values specific to an actor that didn't exist in the main menu, resulting in the costs being stored as zero.   To rectify this, I implemented a solution within the save system. I added a check to identify the first initial save and, on t...

Blueprint VS. Script

Image
 While working with Unreal Engine 5 there is a constant ebb and flow with using blueprints. Learning when to utilize the power of blueprints is a true skill. Learning how to use blueprints and script at the same time is an even greater skill. I had a problem this week dealing with the use of a Widget on an actor in the world. The actor was meant to be an NPC the player can interact with and upon being a certain distance from the NPC the player will see the widget show up above the NPC's head. I ended up getting the widget working in blueprint and then set out to convert some of the visual scripting to c++. Things were going well until I started having uses with the widget displaying detached from the NPC. Nothing I did would change the location of the widget. The solution ended up being quite interesting. The solution to this issue ended up being related to the type of widget I was using in script compared to the one I had tested in blueprint. The one I used in blueprint was a widg...

Fixed Save and Load Menu Delete Buttons Not Clearing unwanted UI

Image
The Save and load menus had issues where the delete buttons were not deleting their corresponding UI when their associated save file was deleted. This is a problem since communicates false information to the player. To fix this I removed the widgets from their parents instead of just clearing the vertical box. Before Delete  After Delete  Author: Krishnie Katie Naidoo Posted on 10/19/2023

Mastering Collision Channels: Reshaping the Challenge in the Charge Boss Battle

Image
The Charge Boss AI encountered an issue where it mistakenly identified the player's weapon as a collision with the environment, rendering it incapable of attacking the player during active gameplay. This unintentionally made the boss fight a cakewalk, with the player effectively becoming invincible. To remedy this, I embarked on a quest to find a way to have the boss focus solely on environmental, and player collisions while ignoring the player's weapon.   My exploration led me to the documentation, where I stumbled upon the concept of creating custom collision channels. Taking inspiration from this discovery, I proceeded to craft a distinct collision channel for the boss and another for the player's weapon. Subsequently, I configured these channels to disregard each other, which had a transformative effect on the gameplay. Thanks to this adjustment, the player regained the ability to damage the boss using the appropriate methods, and the boss was finally able to challe...

Resolving Collision issues with Player's Animation

     While adding the animations to the players, I ran into an issue with the player's attack animation. The collision would not turn off when it was called to deactivate. This caused problems because the player would damage and kill enemies without even swinging their sword. Originally I thought within the animation, I would just have to set a player start attack which would activate the collider and then an end attack which should have turned it off. These calls in the AnimGraph did not help the case though as the collider had not turned off.     As I looked further into the base of the problems, it only took the call from the sword's actor to be called into the Base Character to shut off the collider. The start attack and end attack in the AnimGraph did not even matter. I had added more unnecessary functions to the program that were breaking the start and stop of the colliders. Once I called the Sword's Actor in the base Player's Attack call, it had properly ...

Resolving the Flying AI Bug: Boundary Fix in Level One Environment

Image
  While the initial testing of AI units showed promise, an unexpected issue surfaced when we integrated the flying AI into the official level one environment. An unusual bug emerged, where the upper bounds of the flying AI were being disregarded when placed in an elevated location within the terrain of level one. This, in turn, hindered the unit from carrying out its essential functions and completely disrupted player interactions.   Through a series of thorough AI tests, we pinpointed the root of the problem to be the assignment of the lower bounds, which was inadvertently causing the upper bounds of the AI to extend far beyond their intended limits. This anomaly led to the flying unit soaring high above the level, out of the player's reach.   To address this issue, we made a strategic adjustment by assigning the lower bounds before implementing the Z Offset and setting it to the initial position of the AI's mesh, firmly grounded on the level's floor. This modifica...

Fixed Button Sizes In Menus

Image
UI menu buttons would size to their content but I needed them in some instances to be the same size since it made weird gaps appear in some menus vertical boxes  (Debug Menu as an example) or made a menu look awkward (Pause Menu as an Example) because of the  variety of sizes.  DEBUG MENU (Before) PAUSE MENU (Before) Because sub widgets do not have certain parameters exposed I could not just change the size to content variable in the buttons in the different menus. To solve this I just made   two blueprints derived from the same C++ class. This also let me add more customization to the look but use the normal functionality. PAUSE MENU (After) DEBUG MENU (After) Author: Krishnie Katie Naidoo Posted on 10/13/2023

Recursive Delegate Calls

Image
 This week I worked on a number of different systems, but on problem stands out among the rest. I decided to use the OnClicked event of a button for one of our widgets. Upon initial use, I misunderstood how to use the event call and placed too many throughout the script. The result of using the OnClicked event for the same thing in two different scripts was the program would be thrown into a recursive loop and eventually crash.  To solve the problem I first debugged as normal. Then after staying up way to late, I turned to the rubber ducky method and spoke to a fellow software engineer about the issue. While explaining the issue, it was found that the OnClicked event automatically broadcasts to all of the other OnClicked events throughout the script. After removing the excess events the script ran as intended. An added benefit is the script was a lot less crammed.  Author: Zachary Giffin Posted: 10/13/2023

Read Access Violation

Image
 During this sprint I was faced with an error that posed a problem while implementing UI elements. Occasionally during runtime the software would crash and the error getting reported was a "Read Access Violation". This kind of an error being released would make the build unstable and potentially unplayable for our users.      In response, I did extensive research into the error. My research involved reading online forums, asking other developers of their experiences with this error, and brute forcing my way through the error. I ended up coming to the conclusion one of my widgets was not getting saved properly through the Unreal Engine 5 editor. This was due to a widget missing a UPROPERTY macro. The UPROPERTY macro is used to expose variable to the unreal engine editor and to include the property in the engine's memory management system. After adding the appropriate macro to the widgets variable the error ceased to exist.  Author: Zachary Giffin

Animating the Character Smoothly

       This week consisted of me figuring out animations and how to implement them in the character correctly. My main issue at first was that we did not have all the necessary animations for me to complete everything, Perforce also changes all the player model's files to UAssets. This created an issue because I cannot personally go into Mixamo to add different animations to the character. The only one with access to the file was the person who originally uploaded it.     In addition, the attack animations were too high to hit some enemies. Our attack system is based on the sword's movement and the collider is on the sword. Our attack animations were upward motions and with the enemies we have so far, most of them are a little lower to the ground. This made the enemies impossible to hit. To fix these issues, I made sure to communicate what animation files are necessary for the project so they  can be properly retrieved. As for the issue with the collid...

Unwanted UI Showing In Main Menu

Image
During playtesting a bug was noticed that    the players UI for their  bean counts was displaying in the main menu when it should not. This is a problem since  the game has not started yet which can cause confusion for the player. When looking into it the bug I thought maybe I had accidently added the Bean counts widget to the main menu widget but this was not it. Even though I was sure I had removed the player from the main menu game mode I decided to check in case at some point a push had happened that changed it. Once I confirmed the issue it was a simple fix of setting the  Default Pawn to None.  Author: Krishnie Katie Naidoo Posted on 10/06/2023

Resolving Axis Alignment Issues for Imported Assets

Image
  When assets originally designed for use in the Unity Engine are imported into Unreal Engine, they can sometimes exhibit misalignment along the axis. This misalignment stems from a fundamental difference between the two engines, particularly in how they handle the Y and Z axes. As a result, the root bones of these assets are oriented along the Y-axis within Unreal Engine, which can detract from the immersive quality of the model and its animations.   While I may not possess modeling or animation skills, I approached this challenge with the expertise I do have. After conducting research, I discovered a solution: it is possible to adjust the orientation of these root bones within Unreal Engine itself.   Within the animation blueprint, I leveraged a set of nodes labeled 'local to component' and 'Transform (Modify) Bone.' Through the utilization of these nodes, I successfully rotated the animations to the correct orientation, enabling us to proceed with the desired...