Author: Cameron Taylor I was tasked to make a settings menu to allow the player to change their settings as easily as possible. The biggest issue I had was not with the buttons, but rather renderer not wanting to cooperate and show the correct assets on the screen. Those said assets also didn't like centering correctly since the entire pipeline was made on a custom engine. There was no support to allow auto-aligning or special effects for certain objects/text. To fix this I needed to make different game states so that the renderer knew which textures to draw on the screen and update accordingly. I also needed to do a lot more math than I would've liked to in order to fix the centering on each object. I added checks to make sure that I centered objects correctly with different offsets rather than having an engine do all the math for me.
Author: Daniel Jackson Our game requires the player character look towards the mouse in order to shoot in the game world correctly. This is done by using a raycast from the mouse position down into the world and rotating the player to face that position in the world. This appeared to work fine on startup but if the window was resized at any time in any way the raycast was skewed and would constantly be separated from the mouse position. This has been a recurring issue unrelated to the actual raycast code. The code itself is set to base the raycast's position relative to the size of the window. The raycast itself works fine however, when it grabs the size of the window, its only saving one size. To fix the issue I changed a separate function to get the current size of the window when the function is called instead of getting the size of the window on startup. I've done this fix before however at some point during integ...
Author: Cameron Taylor Although a single tab in the skill tree worked, I needed to make every tab work. An issue I ran into right away was that every asset was layered on top of each other. I also had to split up the buttons into their own chunks of code so that overlapping buttons that were in the same space wouldn't be clicked unless they were enabled through code. I also had an issue with displaying the correct currently displayed weapon and ammo count since the current pipeline would display any text given at it. To fix the layering assets I needed to attach and ID to each asset so that the render pipeline would only display them if I told that renderer that we want to display that ID. I then added switch and if checks into the update code that runs every frame so that only specific text will be added to the pipeline if a certain weapon was equipped. This is a sneaky way to fix it instead of keeping all code on the GPU at all times, but it works fine and runs very fast still.
Comments
Post a Comment