Posts

Showing posts from February, 2024

Setting UserNames

Image
 Author: Najee Jackson Problem The player list only showed their laptop name whenever a player joined the server. This was confusing and made it hard to tell what players were in the game. It also made saving players' user names and data difficult, as the laptop name would change at the start of each session. Players who join have their laptop as the userName Solution To fix this, I researched Unreal's replication functions and how they work. This was a daunting task at first, as there was a lot to take in for multiplayer functionality, but after a day of research, I got an idea of how to do it. I first used Unreal's On Post Login event, which tells the server if a new player has joined. Using this, I could call a series of functions in the Playerstate and Gamemode to check if the player has been registered before and already has a valid username. Once these functions were called, I would get the controllers' PlayerState and check if the player's name was registered...

Hifra (Dragon Boss)

Image
 Author: Josiah Jones     This week while working on Hifra are boss I ran into a problem with her flying animation. Hifra fly's up when ever she loses 25% of her hp and then she shoots fire at the player. Instead what was happening was she would fly up but very glitch like she was changing between different animations and then she wouldn't attack and instead go back to the ground. After she would either sometimes attack and chase or she wouldn't do anything and just stare at you.     So I was not the only one working on this, but first to solve the problem I separated the the landing and fly processes into two different functions. But that didn't solve everything as I had to figure out where and when I wanted to call both functions. So first for the fly we made a delegate to call on when 25% hp was taken and a bool to let us know Hifra was flying. Then for landing I made a bool that let me know when she was done shooting fire and then ma...

Floating Damage

Image
 Author: Jymeer Wilkins Problem:  While working with the floating damage I had a problem with its transformation. I made a widget for the damage number and gave it an animation. In the animation the number's render opacity would go from zero to one back to zero, all while rising and growing. I then made an actor blueprint and gave it a static mesh. Under the static mesh, I added a widget component to hold the damage number widget. I also gave the static mesh a random mesh. I gave the static mesh physics so that I could make it bounce around. In the event graph of the actor, I added an impulse to the static mesh at random x, y, and z values so they wouldn't all show in the same  place.                                                                                   ...

Turret

Image
  Author: Xavier Williams A problem I had this week was making the turret item. The first problem was the model I wanted to use being imported as different pieces. Instead of having different static meshes in an actor, I found and used the modeling mode that is built into Unreal Engine to combine all the models. Next, there was a problem with the targeting. First, it seemed like it wasn't aiming at enemies properly, however, after testing it by having it aim at the player instead, i found that the barrel of the turret's model was not actually the front of the mode. After finding this, I added a -90 degree rotation to every rotation to the gun to make sure the barrel faced the target properly.

Slime Enemy

Image
 Author: Josiah Jones     Problem I had this week wasn't a big one, really just an annoyance that I was having trouble with. While making my slime enemy that splits up into smaller slime the Collider wouldn't move with the attack animation so either it wouldn't actually hit the player or it would cause double the damage to the player. I didn't really understand why because it shouldn't have been able to overlap with the player twice when turned on so I don't know how it did double damage.     The solution I came up with for this problem was I made it so my hit collider blocked the player so whenever I went and attacked one collider would overlap the other would push the player back. This solved my problem for double hitting but caused another for the smaller slimes. When the smaller slimes would hit the player or the player run over the smaller slimes the player was actually able to run on top of the slime, so I just changed the hit...

Power Up Item Descriptions

Image
 Author: Jymeer Wilkins Problem: So, the problem that I ran into was with the descriptions of the power up items. I wanted to make it to where when you pick up an item, a little menu would pop up with the description of the item and an image. I already pass in images and text for the item display menu, so that wasn't the part I struggled with. Whenever I picked up items, the menu would pop up with the description and the picture. There was an animation I made to make the menu fade away after a few seconds, but if I picked up too many items at one time, they would all overlap.                                              The heart description is overlapping causing menu                                              to get darker each time I pick up the item....

Dagger/flamethrower edits

Image
 Author: Parker Boyer   This week was hectic with work and outside events but with what i added the two that threw me off the most was getting the dagger and flamethrower reworked and fixed. First off with the throwing dagger i was able to base it off of my weapons script for easy implementation but couldn't figure out why the "bullet" was constantly a sphere even tho i had it set to the dagger model. As for the flamethrower it kept feeling like a rapid bullet spawning gun then actual flames and i needed to have a more realistic effect on it. First off the dagger problem ended up being a very very simple fix and also needed to add a spin to it but was worked on longer than needed because of bad communication i did not know there were changes to my weapons until a member told me they made a change by adding a new variable to the bullet models. As well as having to fix a socket on a weapon and got rid of blueprints that were hard to read and unnecessarily added to my weapon...

Saving Player Items, weapons, and money between levels

Image
 Author: Najee Jackson Problem The player gains a couple of weapons and powerups at the beginning of the tutorial level, as well as cash to use at the upgrade bench and shop, but once the player goes to the next level, all of their upgrades, money, and weapons disappear. This made it impossible for the player to progress through the game, as they couldn't kill any enemies to get to the next room and progress through the level. This hindered the player's sense of progression as they got stuck in a level without any means to escape.  Player has weapons, 4 items, and 270 coins When the player loaded into the next level they lost their items, coins, and weapons Solution To fix this, I added three functions to the Game Instance to save the player(s) weapons, powerups, and money. The first one to save the player's weapon was the most tedious. I first had to get the players who held weapons, which I did have access to due to a variable in the Game Instance; once I found those, I h...

Item Display Menu

Image
 Author: Jymeer Wilkins Problem: The problem I ran into with the item menu was a index problem with the for loop. I would store all the items that the player picks up into an array, but I didn't want to add each individual item in the display. For every duplicate item in the list, I would increment an integer. So, in the display, there would be the item, and a number showing how many the player had of that item. would loop through the list to get each item in the list, and for loop through the list again to check each item. If the item I was checking was identical to the item I was currently on in the first loop, then I would delete that item from the list so the same items wouldn't get checked twice. Then I would increment the number. The problem I was running into was a problem with the indexes. Since I was deleting items from the list, it would mess up the last index of the loop. It would make the loop end earlier than it needed too. In this picture there should be 5 hearts....

Spawning in Items to the map

Image
 Author: Colyn Reed Problem     For this week I worked on spawning items into the map when the player enters the level. The initial problem I ran into was that because our levels are procedual generated, I couldn't place them in manually. The first item I wanted to spawn in was some torches that are attached to the wall for lighting. The first issue I ran into was getting the correct number I wanted to spawn in and getting them to be attached to the wall. Solution The first thing i had to do was make the torch its own actor so I could call it to spawn on the map. The next thing I had to do was figure out how many I wanted to spawn based on the amount of walls where in each room, and I decided that dividing that number by 3 would give me the perfect amount for the map to look and feel like a dungeon. Next I had to get he trasform of the walls mesh so I could change the location of the torches position on the wall. Once I got the torches spawning, I needed to adjust th...

Animation & Skelton Retargeting

Image
 Author: Josiah Jones         So since I've recently received my models an animations for enemies, my main focus right now is to get them all connected and working as they should. Unfortunately two of my enemies did not come with animations, so I had to find animations for them using Mixamo. When I got all the animations and tried them, none of them worked well with the two enemies as the skeletons were not basic human skeletons.      To fix this problem I simple went and grabbed a model from Mixamo then applied all the animations to that model. After that I made a IK rig for both the Mixamos skeleton and my enemies skeleton and then retargeted the animations from the Mixamo to my skeleton. That solved one enemies issue the other even though when retargeted seemed to work but after exporting the animations they stop working for some reason, this issues still hasn't been solved. IK Rig for my Enemy: Notes: Retarge...

Bullet Ricochet Problems

Image
 Author: Xavier Williams      A large problem I had this sprint was implementing bullet ricochet for an item ability. I tried multiple approaches to find a way to make the bullets bounce off walls properly before finally finding my final solution. The first thing I tried was rotating the bullet when it hit a wall. This did not work because the bullets use the projectile movement component, and with this, the rotation of the bullet does not affect the direction it moves in. Next, I tried using the built in projectile bouncing functionality of the projectile movement component. After changing different settings, I was unable to get this to work, as the bullets would still collide with the wall without bouncing off. After this, I tried using Unreal Engine's physics system to make the bullets bounce off walls, however after trying it, I found that the physics system is not compatible with the projectile movement component that the bullets use. This resulted in bullets st...

Setting Player-Start Location

Image
 Author: Najee Jackson Player starting not in the elevator at level start Player starting in elevator at level start Problem When players load into any randomly generated level, they spawn outside the level walls. Once they spawned in, they fell infinitely. This stopped the player from progressing through the level and reaching the next. Which heavily affected the player's sense of progression and experience. Solution I first researched different ways to change the player start location to solve this issue. I found the RestartPlayerAtPlayerStart function, which changed the original PlayerStart to one with a specific tag. I tested this out by calling this function after I created the spawn elevator, but even though it executed this function and got the right PlayerStart, it didn't change the player spawn to be in the elevator. To fix this, I set the player's actor location to the elevator when it is created in the level for the first time. To do this, I got the elevator posi...

Getting Client Bullets onto the Server

 When working with networking, a whole slew of new problems are introduced to the thought process of programming. Shooting is a great example of this. In a single player game, you can put the implementation anywhere you like and not have to worry about it not functioning correctly. You could put the shooting implementation in the gun or the player. However, when you add networking, you add a whole new headache. The problem was that player bullets were only being created on the individual client's sides. Simple enough. However, the issue lied with who was creating the bullets. The way we have our game set up, the player picks up guns off the ground as they go. These guns were created in the level and are owned by the server. Therefore, any action that would want to be replicated to the server gets shot down due to the issue of ownership. After tinkering with the pickup system for some time, I opted to take the actual shooting functionality and move it to the player, which is guarant...

Melee weapons implementation

Image
 02/16/24 Author: Parker Boyer   This weeks sprint did not want to agree with anything I did for melee weapons when it came down to enabling the collision box in order for the weapon to deal damage. As well as for 2-3 days i struggled with trying to make it work in the player blueprint of the parent class which is a bad habit i have with trying to get any Weapon functioning in one class or script which has caused me to loose potential progress.  For the first problem I ran into being the collision problem after about an hour of debugging i was able to find that the problem is i was completely forgetting to bind the box to allow the Set Collision Enable function to well actual turn collision on or off based on how long the swing rate is   As for my second problem which ended up just being my thought process causing the issues in the end i ultimately had to take a day to stop working and clear my mind. When I came back to it i tried looking at it a different way so ins...

Percentage Shield Bar

Image
 Author: Jymeer Wilkins Problem:  A problem that I ran into was for our percentage shield. Whenever we picked up the shield pickup, shield equivalent to 20% of our max health would be added to our health bar. I already knew that I would probably do the shield part of the bar by having a separate bar behind the original health bar, but actually setting up was a little more difficult than I thought. Getting the shield bars percentage wasn't hard. It would just be the: (current health + shield health) / max health. Setting the health's percentage was my problem. As long as the health was lower than the max, the shield would show on the bar, but if the health was at the max, it completely covered up the shield bar. Solution: So for me to fix this, I had to change the way I set up the health percentage. As long as the health was at the max amount, it would always cover the shield, because I was setting the percentage by dividing the current health. I decided to change the health pe...

Level Switching

Image
Author: Colyn Reed Problem     For this week I worked on having a working elevator that the player starts in when loading the level. When we came up with the idea for our game, the concept of how the player starts each level was a big discussion. We didn't want basic stairs to trancend levels so we came up with the idea for the elevator. The biggest problem this week was getting the doors to only open when the player is in the elevator. The level switch was difficult at first but was easier when I made the elevator its own actor along with being its own level. Solution Getting the doors on the elevator to open was the biggest issue I had. At first they were not staying attached to the elevator so when the player entered the trigger, they would either not open or move to a whole other location on the map.  I fixed this by making the elevator an actor and attaching the doors as child components and just moving the actor around. With the level swiching, the only real is...

Procedural Generation - Room NavMesh Spawning

Image
 Author: Najee Jackson Problem When generating rooms, enemies didn't spawn, so the player just walked around in an empty level. To fix this, I wanted to create a spawner in each room of a certain size, but the spawner only worked in areas with valid nav meshes. My level had none in it since it was procedurally generated, which resulted in the spawner not spawning enemies, and if it did, enemies would not move since they couldn't find a valid NavMesh. Solution To fix this, I wanted to spawn a Navmesh Bounds Volume whenever a room was created, but I soon learned that you couldn't spawn NavMesh Bounds in Unreal Engine 5. After learning this, I searched for ways to spawn a nav mesh in a procedurally generated map. I wanted to avoid creating a giant Nav Mesh encompassing the entire map. Since I feared that the spawner would spawn enemies far away from the player, it also would be a waste of processing power to have an active nav mesh in areas that enemies never use. One way that...