Difference between revisions of "Creating the Main Menu"

From The Official Visionaire Studio: Adventure Game Engine Wiki
Line 4: Line 4:
  
 
I will try to cover as much of the menu creation as possible in this page, but please bear in mind that there are multiple ways to go about creating your menu & well pretty much everything else in Visionaire Studio can be approached in this fashion. Also I would like to point out that this is a guide for creating a menu of commercial caliber & should you want something a little simpler, then you should check out Glenfx's menu tutorial, [http://www2.visionaire2d.net/glenfx/ here].
 
I will try to cover as much of the menu creation as possible in this page, but please bear in mind that there are multiple ways to go about creating your menu & well pretty much everything else in Visionaire Studio can be approached in this fashion. Also I would like to point out that this is a guide for creating a menu of commercial caliber & should you want something a little simpler, then you should check out Glenfx's menu tutorial, [http://www2.visionaire2d.net/glenfx/ here].
 +
 +
 +
Here's a quick list of buttons/options you should consider including in your game menu:
 +
* continue/resume
 +
* new game
 +
* options
 +
** game (miscellaneous game options that don't fit into ''video'', ''audio'' or ''controls'')
 +
*** language etc...
 +
** video/display
 +
*** gamma, subtitles, resolution, fullscreen/window mode etc...
 +
** audio
 +
*** global/music/sound/video/speech volume, sound modes etc...
 +
** controls
 +
*** control/preset options & control diagrams
 +
* save/load game (this could be done on a single menu scene or on separate menu scenes.
  
  

Revision as of 20:30, 5 February 2014

Introduction

Menu creation can be one of the most difficult & time consuming parts of developing your game, depending on exactly what you have in mind for it. Do you plan on creating a professional menu that remembers all of the players previous configuration choices each time the game is closed/opened? do you plan on adding a true new/resume game button? do you plan on adding an achievement/bonus content system? or maybe even a fully functional save, load & delete game system?


I will try to cover as much of the menu creation as possible in this page, but please bear in mind that there are multiple ways to go about creating your menu & well pretty much everything else in Visionaire Studio can be approached in this fashion. Also I would like to point out that this is a guide for creating a menu of commercial caliber & should you want something a little simpler, then you should check out Glenfx's menu tutorial, here.


Here's a quick list of buttons/options you should consider including in your game menu:

  • continue/resume
  • new game
  • options
    • game (miscellaneous game options that don't fit into video, audio or controls)
      • language etc...
    • video/display
      • gamma, subtitles, resolution, fullscreen/window mode etc...
    • audio
      • global/music/sound/video/speech volume, sound modes etc...
    • controls
      • control/preset options & control diagrams
  • save/load game (this could be done on a single menu scene or on separate menu scenes.


Initial Setup

First things first: you want to click on the scene tab & then create a new scene menu, which we will use to add our option buttons to. Next you want to click on the new menu scene, rename it to something that makes sense to you & then you want to click on it's properties tab & add a background image to it; remember that the background image will define the width & height of the menu, so as a general rule it should be the same height & width as your default game resolution - unless, of course, you are planning on making a scrollable menu scene. You also want to select the mouse cursor to be used for the menu & the background music, if you plan on adding some.

Additional Information

It is possible to create your menu on a single menu scene or you can break it down into multiple menu scenes. It is common practice to add the save game menu to it's own menu scene.


New Game/Resume Game Buttons

Both the new game & the resume game buttons require the use of if queries & the quicksave system to check if the game should be resumed from the scene of the current character or by loading a previously saved game. I will quickly explain how to setup both of these buttons.


You need to decide which quicksave slot you want to use for your new game option & which you want to use for your resume game option; in general I would recommend using quicksave slot #0 for the new game option & quicksave slot #1 for the resume game option.* What you want to do is create an at begin of scene action on your first playable scene & add an if query inside of this: condition, if, value > if savegame/autosave exists...

if autosave #0 exists
else
 execute autosave #0
end if

This query will create an autosave on the first time you launch a new game; providing the autosave doesn't already exist. This means we can now run an if query inside of the new game button. Inside of the new game buttons actions tab you want to create a left click action in which we will add an if query...

if autosave #0 exists
 load autosave #0
else
 change to scene of character 'current character'
end if

This checks if autosave #0 exists & if it does then it will load from autosave #0 & if it doesn't exist then it will change to the scene of the current character; current character being the currently assigned playable character.


Creating the autosave system for your resume game option is a little more time consuming as you need to add an action inside of an at begin of scene & at end of scene action for every playable scene; playable scene being scenes that your character can interact with. You also want to create a condition (in_session) that determines that the game is currently in session.

execute autosave #1
change condition 'in_session' to true

This will automatically save the game every time a playable scene is opened, closed or you open a menu scene which means that the players current progress will always be saved. You could alternatively have it save after important actions, dialog choices or every x amount of time passed. Back to the tutorial. Next you want to create the if query for the resume game button in exactly the same method, you used for the new game button.

if condition 'in_session' is true
 change to scene of character 'current character'
else
 if autosave #1 exists
  load autosave #1
 end if
end if

Here we are checking if a game is currently in session (by default it will be set as false on game launch) & if so we change to scene of the currently playable character & if not then we load from autosave #1; providing it exists.

Additional Information

* Coincidentally, this slot will/can also be used for the autosave system.