How do I Make Menus?

Get help using Construct 2

Post » Tue Apr 15, 2014 2:37 am

Quick question: how would I go about making a menu for a game I've created? Or is it even possible?
"It's a lobster fest by the end of the day." - J!NX 2017
B
12
S
3
G
2
Posts: 10
Reputation: 1,997

Post » Tue Apr 15, 2014 3:38 am

Depends how complicated you want the menu to be.

There seems to be a general consensus that using multiple layouts and layers is the way to go, and it seems to work pretty seamlessly.
This in its simplest form is where you have a "main menu" layout with a button, when the button is clicked it goes to the layout "game" and starts from the beginning of your level.
Then you can have multiple buttons for different menus, either on other invisible layers or in different layouts. Keep in mind it's easier to fade in or move a layer than a layout however.

An example would be:
"Start" goes to a layout "level_00"
"Options" moves the screen / increases the opacity of the layer which has your options screen on it.

There's a tutorial for this as well: scirra.com/tutorials/594/building-a-global-user-interface-ui
B
42
S
14
G
3
Posts: 165
Reputation: 5,115

Post » Tue Apr 15, 2014 3:51 am

Well for example you could have un-movable Sprite or Text Plugin Objects that you've placed to act as the GUI elements like buttons, tab panes, right click menus, and the like . The trick is how do you populate the menu screens with dynamic elements like Inventory Items or Stats. Thus for example you'd probably have a json/xml file where Inventory Items or Stats are defined having a name, value, image name, etc.. . Then you'd use the System Condition OnLayoutStart I believe to trigger the loading Event logic you would create to load in those said Inventory Items or Stats. That logic would probably involve the Ajax Plugin to load the file and either the XML or JSON Plugin to parse the file. Then once you have all the data loaded into say Array or Dictionary Plugin Objects then you'd have to have additional Event logic to create instances of Sprite or Text Plugin Object Types. You'd also have to include logic that could determine where these objects need to be placed on screen and on what layer. Then for actual GUI control actions, you'd have to define say the Event logic that would display the information of an item in a pane upon clicking a Sprite Item Object in the Inventory screen. These are just some quick thoughts. I haven't created a menu myself. But I've been thinking it over and have had these ideas regarding how it could be done. You might want to search the forum for 'C2 Plugins and Behaviors List' to see if there are any Plugins/Behaviors that could help you with building a menu. There are many steps to developing a good flexible menu. You could probably start with a simple Main Menu of the game that would be seen on launching the game. In fact there's probably a tutorial that contains instructions/demo project that has a Main Menu defined. Best of luck to you in your Menu Making endeavors.
B
9
S
2
G
1
Posts: 41
Reputation: 708


Return to How do I....?

Who is online

Users browsing this forum: panku, TRMG and 35 guests