More layout... why?

Get help using Construct 2

Post » Mon Oct 20, 2014 6:30 pm

I'm learning to use Construct 2 full version.
When I want to create a game with more maps (or more levels of the game) I just build a layout with many layers, some visible at the time of starting the game and other invisible until certain situations do not occur. Now ... I find the ability to create multiple layouts, and I wonder what is this! If the layout is where "run" the game, why create multiple layouts? What it does do that? What is the use?

Look, courteous response.
(And sorry for mistranslations am working GOOGLE Translator.
B
7
S
2
Posts: 55
Reputation: 692

Post » Mon Oct 20, 2014 6:35 pm

Gastrite wrote:I'm learning to use Construct 2 full version.
When I want to create a game with more maps (or more levels of the game) I just build a layout with many layers, some visible at the time of starting the game and other invisible until certain situations do not occur. Now ... I find the ability to create multiple layouts, and I wonder what is this! If the layout is where "run" the game, why create multiple layouts? What it does do that? What is the use?

Look, courteous response.
(And sorry for mistranslations am working GOOGLE Translator.



Multiple layouts are used to:

Classify easily each part of the game (first potentially a loading layout, then a menu layout, etc..) each one having their own main event sheet, this is useful as you just dont need at all to have a weird deactivation of everything on some layers. Some people actually do one layout per level or level environnement.

Also layouts are used by C2 to clean up the memory between them

The question is more: why not use more than one layout really (anwser: there is no reason to not use at least 2).

Also, the free edition is limited in the number of layers per layout, but not in the total number of layouts.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
52
S
22
G
18
Posts: 2,122
Reputation: 17,093

Post » Mon Oct 20, 2014 7:38 pm

I will add that while you "can" do many levels in a single layout it will soon get pretty cluttered and navigation will become a pain. Say you have 30 levels to your game, you could make a layout for the first easy levels, a layout for the middle ones, and a layout for the end game levels and maybe even a another for the bonus levels. This would make navigation easier.

Layouts just give more flexibility, and the new global layout is no exception.

Plus you can use layouts to simply do things like store objects so they don't clutter up the edges of your main game layout...
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
65
S
17
G
8
Posts: 635
Reputation: 9,331

Post » Tue Oct 21, 2014 11:10 am

Thank you very much. Your explanations have been very helpful to me. Thanks again and see you.
B
7
S
2
Posts: 55
Reputation: 692

Post » Tue Oct 21, 2014 6:37 pm

In the game I'm working on, I have a master layout that the game takes place in, along with some extra layouts for the menu. I also have a bunch of layouts that represent my level layouts, named "1,2,3,etc...".

When I run my game, I have an event sheet that loops thru all these layouts and loads their data (objects, position, time limit, etc) into a dictionary. I then use that data to spawn out my levels onto the master layout.

The main reason I built the game this way was that, up until recently, there were no global layers. So, essentially, if I had 100 layouts for 100 levels, and I wanted to change some of the background FX, layer properties, etc, I would have had a huge amount of work to do, and the possibility of missing a layout, or corrupting some other settings.

That being said, with the system in place, I have some advantages. Memory isn't a problem for me, because I have a minimal set of objects and almost all of my animations are procedural, so that aspect of 'layout per level' is moot.

On the plus side: with this system, I can control object spawning, and break it up over a number of ticks if need be. And, since my levels are being spawned out of a dictionary, I can output as JSON to a text file, and simply update said text file to update my levels. So, instead of having to have people redownload my whole game if I change something in a level layout, I can just update one text file instead.
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,187


Return to How do I....?

Who is online

Users browsing this forum: Cubus32 and 5 guests