Creating the Main Menu

From The Official Visionaire Studio: Adventure Game Engine Wiki
Revision as of 18:24, 5 February 2014 by AFRLme (talk)

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 configuration choices each time the game is 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.


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

Additional Information

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