Menu Screens
There are quite a few menu screens within Gears of Discovery. The main menu, settings menu, level select menu, credits, how to play, and the in game pause menu. Each menu within Gears of Discovery serves it’s own purpose but all of them follow the same art style. With the menu screens I wanted the player to be able to quickly and easily understand what they were looking at and be able to traverse the menu with ease. On top of this each menu should be satisfying to the player, through visual and audio.
Main Menu
The main menu was the first menu that needed to be worked on, since it would be the menu the player first sees when booting up the game. Within this menu there are a few things I wanted. The menu screen needed to be interesting and keep the eyes busy, but not too busy to where the player did not know what to focus on. I opted to create a moving background that was blurred a bit as to not have the player focus too much on what was going on there. This background is just a short clip of gears turning with one another. This kept it interesting but not too busy.
The main logo for Gears of Discovery needed to be somewhere on the main menu, otherwise people who loaded up the game would have no idea what game they were playing. For the placement of this I decided to have it at the top left corner of the screen, big enough to show off the logo but not too big to draw attention away from the menu buttons.
Main Menu Code
The code within the main menu is very simple. As a player clicks on one of the menu buttons it will emit a click sound to allow the player to hear that they did in fact click the button, and then hide the main menu buttons and create the widget for the sub menu. This allows for a seamless transition from the main menu to the sub menus. Within the menu screen themselves I also have a line of code that emits a ticking sound whenever a player hovers over a button. This is just something that I personally enjoy within menu screens. Very satisfying to the player to quickly hover over many buttons and hear that sound.
Menu Click Sound Code
Sub Menu Transition Code
Settings Menu
The settings menu was a very fun menu to work on. This was a new experience for me when creating this menu and I got to experiment with quite a lot. I learned how to allow the player to set up their display preference (Fullscreen, Windowed Fullscreen, and Windowed) as well as set their desired resolution while in fullscreen. Within the settings menu as well the player is able to adjust the main volume settings. This slider controls all sounds within the game.
Screen Mode Code
The screen mode is controlled by using unreal engine 5’s switcher from the game user settings. This pulls all available screen mode types from the players unit and allows the player to switch in between them. When the player clicks the left or right button next to the currently applied screen type it will activate the switcher, changing the players screen type and updating the text that is show in between each button.
Resolution Code
The resolution code works very differently from the screen mode code. This code uses an integer to determine what resolution the player has currently selected. As the code initializes an array is created that stores all available resolution types. The beginning integer 0 is set and is the players current resolution. When the player clicks the side buttons the code does a check to see if that current integer is the last in the index. If it is the player will not be able to continue clicking in that direction to avoid confusion. Once a button is pressed it will change to the next index, either up 1 or down 1 and update the display text based on what integer is currently selected. Once the player is satisfied with the selected integer (Resolution Type) they can press apply changes and it will updated their current resolution.
Volume Code
The volume is controlled mainly by a save game function. When the menu initializes it checks to see if this save game file has already been created. If not it creates the save game file as well as a reference to this save game. When the slider is changed it takes the master volume float value within the save game file and adjusts it. This value is initially set at 1 (Max Volume). Whenever the player moves the slider it communicates with the save game file and changes the float value to the value of the slider. This value is then pushed through the sound mix modifier and changes the in game sound. After this value has been pushed the save game file is saved and that value will remain obtainable throughout any level. This also allows the volume to be saved when the player exits the game, so that the player will not have to adjust the value each time they load up the game.