Tuesday, 9 May 2017

Main Menu, Options

This post will cover the contents and functionality of the Main Menu and Options screen. To see how I implemented controller support, please see the pose titled Menus with Controller Support.

In the main menu, I didn't want to overwhelm the user with too many options, so I limited it to just Starting a new game, setting graphics options and quitting the game.


New Game takes the player to the level select screen.

Options takes the user to the Graphics Options, which looks like this:


As you can see, the user's chosen options will remain pressed, to show which option is selected.

The options are first set by the player, then they will apply when the 'Apply' button is pressed.

This is achieved by having a set of console command functions in text string arrays.

Clicking the buttons set which functions are added to the final array.


 When the Apply button is pressed, a loop will set the commands array running, which will set the player's options.


With this method, I think it's easier to integrate new options and also to re-purpose the code to other functionality, so it can be re-used at a later date.

As the options menu is so large, it was extremely time consuming to add the controller support, but I did do it. Here's what the controller code looks like, 22 buttons integrated.

No comments:

Post a Comment