Posts

Showing posts from August, 2023

Learning Navmeshes too late

Image
 Learning Navmeshes too late      While on the last week of the project I was trying to polish the movement of the AIs. I thought I didn't have enough time to just keep creating nodes for each AI so I tried to use a NavMesh. It was complicated at first because I haven't gotten far the last time I touched Navmeshes so I had to relearn some stuff. There would be problems like the kart not moving to the next node or remembering that a package is needed for the navmesh to work. Then there was trying to get the AI work in code which also took research.     Inch by inch I almost got it to work. There was a problem with the kart stopping after reaching node but other than that It was almost done. Until I fell asleep, attended the student loan exit interview, then fell asleep again. I was so out of it I ended up scrapping it from the project and turned it in as it was before but with some minor tweaks. I still have the code and remember how to add the components on...

Troubleshooting Unity GameManager Input Handling

Navigating Unity's complex ecosystem of scripts, input handling, and camera management can be challenging. This guide sheds light on the issues faced while implementing input actions in a Unity GameManager script and demonstrates a concise solution. Issue 1: Unresponsive Input Actions At first, the GameManager script wasn't responding to the LocalMultiplayerStart input action. The issue was traced to incorrect syntax usage. By replacing inputActions.Player.LocalMultiplayerStart.actionMap.enabled with inputActions.Player.LocalMultiplayerStart.triggered, the input action was correctly detected and acted upon. Issue 2: Inactive Update Calls Another roadblock was the GameManager's Update method not being called. This led to confusion and halted gameplay mechanics. The issue was mitigated by ensuring that the GameManager script was properly attached to an active GameObject within the scene. Furthermore, script execution order settings were adjusted to ensure proper function call...

Only one line of code

Image
 Only one line of code      For a while I was having trouble with a part of the drifting where the kart would completely stop at the drift zone. I made sure the trigger for the box collider was on so I was confused on why it would completely stop. I checked and messed with the drifting part of the code that maybe it was a way I made it but it still didn't work. I was working on it so much I reworked the drifting 3 times and even added a second boolean and I had no clue. Then after looking at how I'm calling the Drift method I thought about maybe moving it out of it's own if statement and it worked.     I didn't realize that it stopped moving rather than getting stuck. It was picking one over the other and after changing that it finally worked. I'm not sure if my previous code would have worked but now I'm making it so that the kart would drift after turning into a certain angle. I still can't believe that I overlooked the fixedupdate again.

Bringing (some) Life to Our Levels!

Image
Bringing (some) Life to Our Levels! By: Pedro J Colon As this is our gold month, we have to make sure that our current tracks are presentable, or at least have some sort of life to it. Typically, this is done with 3D artists who have modeled some assets to allow the designers to populate the level. However, we have no artists BUT we do have the assets. So uh, we have that problem solved! But now the question is, how should we populate the level? What should we add to it? The answer was quite simple actually: Whichever assets worked and worked with the level name. The level I took was City Dash. As the name implies, it gives an image of dashing through the city. With this, I found the assets that best associated, which was buildings, and cars. I populate the level with number of buildings in certain places to really give a feel of going through a city environment. And while I can't say it is the best example of it, I can at least say, that I am proud of what I was able to make. Here...

Polishing The Need To Boost

 Polishing The Need To Boost! By: Pedro J Colon The Issue As we reached further into the Gold month, we will have to start updating our current assets to be more polished and fun to look at. One of the things I did to make the game look prettier was by adding in particle effects to the Boost Pad. The Solution Adding in particle effects to the Boost Pad was not so hard. Mainly because we already had worked with particles before so now it was just getting a refresher and making sure it all came together well. The hardest part was making the particle effect. However, once the particle effect was made, all we had to do was add in two pieces of code to fix it up and just like that, it was working as it should! Now whenever the player collides with the boost pad, it will shoot up particle effects!

Getting Controller Support Working (The Awesome Benefits of Unity new Input Manager)

 Getting Controller Support Working (The Awesome Benefits of Unity new Input Manager) Pedro J Colon The Problem: HOW?! We are finally at gold month. At long last, the journey is almost done. I can smell the fresh grass of victory close by. However, there is a few issues that still needs to be solved, one of these being controller support. This is important as we do want to add in local-multiplayer and one way we can add it is by trying out with controller support for split-screen play. Only question is this: HOW?! The Solution and Its Aftermath: What I did first was search throughout the web on how I could set it up. Thankfully, the setting up process was pretty much already done, as I had set up input actions for keyboard controls so now it was setting up the code to get it working with the redone player kart. After adding in some new key-bindings, the next thing I had to do was add in the functions for it to be used within the new KartPlayer script. Once that was done, I made a q...

Diving into the Exciting Challenges of Adding Local Multiplayer to Your Unity Game

Embarking on the journey of game development is an exhilarating endeavor, and for college students delving into the realm of Unity, integrating local multiplayer functionality can be both thrilling and daunting. While you might not be an expert yet, facing the challenges of local multiplayer head-on can provide valuable lessons and insights. 1.  Networking Adventures: Don't let the term "networking" intimidate you. It simply means making sure your game runs smoothly for all players. In local multiplayer, you'll need to figure out how to sync everyone's actions on the screen. Start with Unity's tutorials on networking, and gradually build your skills. 2.  Controller Confusion: Understanding how different controllers work and making them play nicely together is like solving a puzzle. Start small by integrating support for a couple of popular controllers, like Xbox or PlayStation ones. Unity's Input System can be your friend here, simplifying the process. 3....