My brother and I spent another day on our Nay50 Unity project. This time we only made one mini-game, but it was a lot more involved than the previous ones were. It was "created by" Hannah and Elfno.
This one's called Outlaw Bar Bowling, where you have to bowl for bottles of different drinks, and whichever ones you hit, you get to take with you into a drink mixing menu. When you mix drinks, you get different types of power-up balls with different abilities. We were very ambitious with this one, so we didn't actually finish all of these plans that we were hoping to. But we made quite a bit in the ~12 hours that we worked on it.
I started with the Unity project on the drink mixing menu. I created a drink script that first checks for the name of the object and checks which drink number it is based on that, so it can show or hide the drink, depending on if you got it or not. I really wanted to focus on optimizing here so this could be reused for all 5 drinks.
From there, I made something happen if you clicked the specific drink. I learned a bit about the new Unity input system for mouse clicks with this. Because this involves mixing 2 drinks, I checked if less than 2 drinks were selected, then you could continue to select them and it would show text under it to indicate which drink number it was. Otherwise, it brings up text that instructs you to mix them.
I also realized I needed some kind of Game Manager to make sure it could communicate between scenes and different objects. So I started with a manager for the scene, but then I ended up splitting it into 2 files in the end. The first is one that controls what happens when you click the mix button and which drink is shown. I had to make 10 different combinations of drinks and show results based on that.
At this point, the art was pretty rough and just shapes, but I was laying everything out on a canvas and where it would go.
Then I ended up splitting up my GameManager, like I mentioned. I needed a simple one that just tracks what the status of all of the booleans are. That way, it could move between scenes and save that data. I also had to dive into learning about persistence of game objects between scenes.
So with that, the whole drink mixing mechanics worked mechanically! I mainly had the art left for this scene.
I also made a simple script for transferring between scenes so we could reuse it later. I made a new 3D scene and used simple buttons to give you two of the drinks, then switch to the next scene. So this was able to work and all set up for the bowling part to be started!
During this time, my brother was working on 3D modeling the bowling scene. This included the lane, the "pins" (bottles), and the ball. So I gave the project to him for starting on programming the bowling part.
And in that time, I started to work on the labels for the drinks that he made, in Photoshop. I stayed pretty simple and just wrote the names of the drinks, added some colors/effects, and used some art I already had of all of the characters they were centered around. I haven't done a lot of work with drawing materials for 3D models, so it was fun to try it out.
I ended up making a few extra elements like adding Hannah to the drink mixing screen and Elfno to the bowling screen. My brother was working on the throwing mechanic, and it turned out to be a lot more complicated than we thought. So I started to help out and we were troubleshooting together. The main issue ended up being the transition to the new Unity input system and how little resources were out there to help with it. We finally got it to be thrown in 1 direction and not at a crazy high speed, but it still has a lot of work to do.
So after that, I started to import the final art assets I had been working on. This included the labels for all of the bottles and a skybox for the background.
I also added Elfno to the canvas for the bowling scene. I was thinking we could use that area for adding points of some kind down the line also. I made it a bit off-centered so it would give us more space to add parts to the UI.
Then I took screenshots of all of the bottles and erased their backgrounds so they could be used in the drink mixing menu. I also added my drawing of Hannah and background. Through this scene, I learned a lot about scaling for canvases, which is still a bit confusing at times.
So with that, that's as far as we got in the day of working on it! We realized this was a much bigger project so that we should probably scope down, especially on the 3D projects, because they involve a lot more physics and mechanics in the coding side of things. So I decided to revisit it the next day and look into some fixes. I did a lot of research to essentially redo the whole throwing mechanic. I also added a lot of features like adding points, making bottles disappear when you hit them (and turn the booleans on), and remove the ball when it reaches the end.
Originally my button to the next scene only worked once as well. I ended up completely redoing how it was set up because it seems like the Unity events may not be as reliable as hard coding the button presses. So I updated how they worked and it overall fixed the issue I was having. I'm still not a fan of using strings instead of objects for it, but I couldn't really find a better solution without using external packages for it. So that's how it'll be for the time being.So overall, I spent about 4 more hours on this project after our original day to just fix it up and do some polish. I really wanted to fully make use of that drink mixing scene that I made, so I was determined to get this all working and turned into an actual game. So definitely our most ambitious game for this project so far, but I'm happy with how it turned out!