[Request] Global Layers (for HUDs, menus, etc.)

Discussion and feedback on Construct 2

Post » Mon Jan 20, 2014 2:03 pm

I think this one speaks for itself. Remember the 'inherited layers' feature from Classic? There are methods of replicating this sort of thing using global objects, but it requires setting up a whole bunch of layers in a certain order for ALL layouts, which can be a pain, and can be time-consuming for testing. I'd much prefer an in-built feature that lets you set up 'global layers' that are loaded on startup, are kept around when changing layouts, and ordering can be sorted on a layout-by-layout basis.

It would certainly make everyone's lives a whole lot easier, I think.
B
94
S
37
G
11
Posts: 404
Reputation: 11,275

Post » Mon Jan 20, 2014 3:01 pm

While I'd like this kind of thing, you'd still need to specify in your game layouts which layers are to inherit the global layer.

Personally, I don't find the use of global objects for UI elements to be too much of a hassle. The only issue is having to replicate layers in other layouts (or, rather, have the same amount of layers). If global objects were to appear on the same layer by name, rather than layer number, I think it'd make life far easier.
B
57
S
15
G
11
Posts: 912
Reputation: 12,606

Post » Mon Jan 20, 2014 3:56 pm

Well, yeah, inheritance would be kind of a given in order to enable ordering, but it's probably not really a problem.

While having global objects appear on layers by name rather than number would be great, you still have to start another layout to initialize everything when you just want to test stuff, which is annoying. I'd like to at /least/ be able to immediately be able to test stuff and let the engine initialize stuff for me.
B
94
S
37
G
11
Posts: 404
Reputation: 11,275

Post » Mon Jan 20, 2014 4:23 pm

I think that is a great idea!

In Layout properties you can choose your event sheet. And then on event sheets you can include other event sheets. It would be awesome to be able to include other layouts (either on top or below the current layout).

That way if you want a HUD layout, you just include it (at top), but if you have help screens or a shop where you don't want it, you just don't include it on those layouts. That would be easy to implement!
B
97
S
34
G
20
Posts: 438
Reputation: 17,790

Post » Mon Jan 20, 2014 4:26 pm

I'm with you here. When a game has 60+ levels and I want to make a layer change... I have no option other than doing it all manually.
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,689

Post » Mon Jan 20, 2014 4:34 pm

@AllanR

Love the idea. My Current game has 100 levels and layer changes can be a bit of a chore to say the least.
B
48
S
16
G
9
Posts: 1,098
Reputation: 11,197

Post » Mon Jan 20, 2014 5:24 pm

You guys are discussing 2 different things. "Global/Inherited Layers" is not the same as having every layout use the same layers.

Since you can already make objects global, all we really need is an option to make all layouts share the same layers & their properties. This way you can build HUDs & GUIs in one layout AND modify all game layers in a single layout.

Kill 2 birds with 1 stone as they say.
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Mon Jan 20, 2014 5:40 pm

Isn't that basically what I said?
"all we really need is an option to make all layouts share the same layers" is what I meant by having an "Include Layout" in the Layout Properties section, with an option to set the included layout on top or underneath the current layout.

I do realize that is not quite what the OP was asking for, but I thought "Include Layout" would be easier to implement (and less confusing for people).
B
97
S
34
G
20
Posts: 438
Reputation: 17,790

Post » Mon Jan 20, 2014 6:03 pm

It is similar to those 'master pages' you find in rapid website development. You can create a sort of template - including topmenu, header, etc. - and 'apply' it to the pages you want (not necessarily to all the website). Since C2 is strictly related to website creation now with html5, the Browser object ecc., it could be a great improvement.

I don't know if this can help. My solution would be to create gameplay layouts with an 'empty' upper layer (so you don't have to modify it later once per game level), then you create an event sheet (you call it 'UI sheet' for instance) where you create the GUI objects by actions and place them on the empty layer. You can include this event sheet in all the levels sheets, so you just develop once. Not sure about what may happen? Create an unaccessible layout where you play with the user interface objects on the screen so you can get an idea of what you will see (you can track down the object 'desired' positions and then create the GUI objects and place them at the same positions with sheet actions).

Sounds like a workaround, but at least you don't have to make the same change on a hundred levels zorida2014-01-20 18:05:20
B
8
S
3
G
1
Posts: 19
Reputation: 841

Post » Mon Jan 20, 2014 7:08 pm

+1! Being unable to easily recreate layers across multiple layouts causes me to fear making levels and work on just 1 layout until I think I won't need more layers :P
B
51
S
20
G
10
Posts: 571
Reputation: 9,819

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 3 guests