This semester has been a fantastic learning opportunity for me. In the beginning I knew for a fact that I wanted to create a game. However that required me to learn a new coding language. In the beginning, I watched a lot of tutorials for unity in C# and followed step by step how to do certain things. But life was not always that easy during this project. When you choose to make your own project and do your own thing, you run into a lot of problems and have to troubleshoot. I learned that coding takes a lot of dedicated time and effort as well as a lot of patience. Without patience I would have lost my mind already. If I were to do this project all over again I would do almost everything differently. I would 1. get more sleep 2. not watch as many tutorials as I did 3. google search a lot more for random issues that come up 4. learn how to do UI a lot sooner in the project and 5. pay attention when going down a rabbit hole of code (doing a lot of needless coding when I could have done the same thing in 8 lines of code). Overall this project has done a lot of things for my life and has only motivated me to work harder each time I sit down. It has been a great semester and I hope you enjoy my product.
It has been a while since I last posted, however I have been working intensively to produce the best possible outcome for what I imagine for this game/tool. Since the last time I posted, I watched an in depth tutorial on how inventories worked with UI. I thought that it would be a good idea but in reality it ended up just being a waste of my time. I learned a lot from it, but the solution to what I was trying to accomplish was actually very simple. I wanted the user to be able to drag and drop prefabs with the touch of a button on their keyboard, but what I ended up spending so much time on was thinking I could only do this using an inventory system. This was not the case at all. What I had to do was set up a mouse spawner. I accomplished this by using unity’s built in mousePosition command and referencing the game object that I wanted to spawn at that location in particular. To differentiate between which game object I was referencing, I created a string in which only the numbers 1-4 would interact with each game object and anything else pressed on the keyboard would do nothing. Below is the code that I have and have not used. all of the commented out code are my desperate efforts at creating an inventory system and falling on my face.
The first three slides show my absolute failure at trying to get the inventory system working. However, the last few slides is the combined, simpler, easier to manage way of accomplishing what I wanted. The next thing to do on my agenda is to have rotation for the platforms that the user puts into place. I plan on doing this by having the user place a platform and then use the arrow keys to rotate the platform any way in which they choose. I also plan on allowing the user to have customizable spawners so they do not have to place the balls where they want to every time.
This week has mainly been focusing on the fundamentals of making the entire project sound somewhat decent and not a convoluted mess of sounds. After messing around with my code for the platform sound script I came across an issue of the sounds not playing when I try to make the sounds play all the way through instead of overlapping. After playing around with that for a while I deleted one of the spawners, added a heavy bass sound, and re-arranged the platforms.
Garage band is how I am editing the sounds as well as drawing inspiration from pre made sounds. For this upcoming week my goal is to produce a song using a few new sounds as well as doing something completely different with the camera such as expanding the view and making a longer platform for the balls to bounce on.
For the past two weeks I have been working on improving the sound quality of my project as well as rearranging the format of my platforms for testing purposes. A major issue that I have come across recently is that when the sounds are overlapping, everything sounds like a convoluted mess. To fix this issue I have been tweaking the different mp3 files that I have been using as well as enabling/disabling overlapping sounds when the ball touches a platform with sound attached to it.
As you can see, I have also created a gameManager to monitor that the ball object is doing exactly what I want it to do. You can also see that I struggled quite a bit with integrating the ball spawner into the cannon spawner which I plan on trying to fix by referencing the normal ball spawner when a ball touches its collider to spawn a ball at a new location. For the future, I plan on making the sounds smoother as well as creating buttons for the entire project to be more user friendly.
Throughout the course of last week I came across the issue of having my CannonSpawner creating infinite amounts of balls which in turn crashed my computer more times than I would like to admit. The reason behind why the trigger was doing this is because as soon as the original ball interacted with the trigger, another would spawn right after in the trigger zone, in turn creating an infinite amount of balls spawning. Here are a few pictures of what happened
The code that is below the original code for the CannonSpawner were my attempts at fixing the issue however those did not work so I resorted to watching videos on how to fix this issue.
This week, despite having lots of things due, I have somehow done more than what I had expected to accomplish. However, I did struggle with many things such as infinite amounts of balls pouring out of the cannon that I built (crashing my computer). Which is something that I am still trying to figure out. I worked on my flight to Phoenix AZ to try and fix the problems I had created but I could not figure out what I was doing wrong. Here are a few screenshots from this week.
As you can see, as soon as a ball interacts with the trigger, the balls clone themselves until you stop the program. I must put this problem to rest for now and enjoy my Spring Break!
This week was mostly revolved around watching many different tutorials which all eventually led to me wasting time due to most video’s being for Unity 3d and trying to piece together certain aspects. I am glad that I have made this mistake early in the semester though. By the end of the week however, I am very close to having a working spawner for the ball. I am trying to have the ball only spawn once it is off the screen, or interacts with my trigger and have the user be able to control these options. I definitely have a lot more work to do but for now I remain very optimistic. Below are a few pictures of what I did this week.
Also, while working on the project this week, a vital component that I completely forgot about were prefabs, which would have made my life a lot easier in trying to do different interactions. For next week I plan on having a working spawner, as well as different items with different interactions for the ball.