BGP – TwinShift – Late blog

I’m very late with this blog-post so I honestly I don’t have that good of a grasp on what I actually did during each week. So I’ll do my best to write these two blogs anyway.

Something that I’m sure of is that after I wrote the previous blog-post the camera was mostly done so I started to work on the Main Menu. This menu that I made however isn’t in the GGC version of the game because many people thought it did not fit the style of rest of the game. So when we decided that we were going to rework the menu we remade it from scratch because that seemed like the simplest way to do it due to how this code was structured.

I don’t actually have a screenshot of the menu but I do have a mockup that one of our artist made.

Menu_Mockup

Okay, This was the first time I’d ever used Unitys UI so I had pretty much no Idea what I was doing. As you can see the menu is split in to two different panels. The one to the left dictates what is displayed on the right one, you only have to move the joystick up or down for the right one to change. To transition between the different contents on the right panel I quickly scaled it down its width to zero and switched content only to scale it back to full size again.

The biggest problem I had with creating this main menu was, since I had no idea how the UI in unity works I started to code the button selection by myself, not knowing that unity already takes care of that by making some object such as buttons Selectables by default. This led to some weird interactions when trying to select the corrent UI element. After removing the code I wrote for selecting buttons everything went pretty well.

One really stupid decision I made was to tie what content that should be displayed on the right panel to if the button related to that content was selected or not. For example if I were to select the a button and then I would like to select a Selectable on the right tab, by selecting that object on the right tab the button telling the right tab to be displayed would become unselected and thus everything would break. The reason I did something this stupid was mainly because it was a quick solution and there was a lot of things that still needed to be done and since we already had a layout that everyone agreed on that we were going to use I just implemented the features on that mockup as quickly and dirty as I could because at the time it seemed like the menu wouldn’t be needing any new features.

I also added an idle-state to the menu that made it so that when there weren’t any input for a minute or so, the right panel would dissapear and the TwinShift logo would appear.

Well that is pretty much it for the menu, I’ll write another blog-post tomorrow about some final reflections on TwinShift.

Filed under: Uncategorized Tagged: 5SD037, BPG, TwinShift