How do make multiple levels in one layout

0 favourites
From the Asset Store
Unlock Levels, Worlds & skin plus add coins by watching ads
  • Hello guys I am trying to make a puzzle game with about 100 or more levels. I have make the core concept and i want anyone to help me to complete it.

    Can we make multiple levels in one layout or we need different layout for each level.

  • both options, but for best performance i think is better 100 layouts for 100levels

  • can you tell me how can we make 100 levels in one layout and if i make 100 layout for 100 levels does it make my game slow or not. And I am making the game for mobile.

  • NN81, You are wrong. Performance depends on implementation and not on the number of layouts.

    Of course if you dump thousands of objects from all 100 levels onto one layout, this will be bad for performance. But obviously this is not a very good technique.

    Zion

    It depends on you game.

    I'm making a puzzle game with 200+ levels and I only have one layout for all of them. My layout contains all fixed interface elements like HUD, dialog windows etc. and an empty "Game" layer.

    On start of every level I read parameters for this level from a text file (which I made in Excel), and create required objects on the "Game" layer.

    And all this works really fast

  • dop2000 If I make 100+ levels each on different layout and only use one event sheet will it affect the performance as I am not sure that the mobile can handle it or not and also Thank you for replying

  • dop2000 performance i mean, obviously depends on the game, that in general every level requires something new assets ecc..

    so Zion, unless you want to do 100 similar/equal levels, using more layouts is the wiser choice.

  • Zion

    Again - in terms of performance it doesn't matter how many layouts or event sheets you have.

    Other things are much more important - the size of your images and animations, efficiency of your code etc.

    Large number of layouts will make it harder to manage your project. Imagine you have 100 layouts and decide to make a small change on all of them - this will take an hour! So if you can, you should minimize the number of layouts.

    If your code for 100 levels is basically the same, of course you should not make 100 identical event sheet.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • dop2000 & NN81 if I make 100 layout with 1280x720 window and layout size, only use one event sheet with less events, about max 20-25 sprites on each layout (sprites are also small in size) and only changing the position of the sprites in each layout. Can I make the game for mobile accordingly to this.

  • Sure you can

  • Thank you

  • Zion

    You need to understand that layouts don't make the game bigger or slower.

    Layouts are lightweight and basically just define the position of objects.

    For example, you have 1 layout with 30 images and your game takes 10Mb.

    If you add 99 more layouts with the same 30 images in different positions, your game will not become 100x times bigger. It will likely only increase 1-2% in size.

    So yes, you can have 100 layouts, but you need to organize them well. Keep all interface elements on separate Global layers. Name your layers and layouts properly, so that you don't have to rename them in the future. And try to use the same event sheet for all levels.

  • Thank you

    here (https://www.scirra.com/manual/183/memory-usage) are sayd

    "Construct 2 only loads the images for the current layout. This avoids loading the entire project in memory which would be slow and consume a great deal of memory. When starting a layout, all images for the objects placed in the Layout View are pre-loaded. This includes all frames in all animations of any Sprite objects. (In other words, Sprites are either fully loaded in to memory, or not at all - they are never part-loaded.) When the layout ends, all images that are loaded but not used on the next layout are released from memory."

    in this sense I meant that it might affect performance (sure, unless you want to make 100 empty or equal levels ..), I also think that more layout uses better organize the job, opposite at what dop2000 says

    imagine having one hundred levels on a layout and do not even know where to look for anything, or have them organized with their layout in numerical order.

  • NN81, I never said that having all objects from 100 levels dumped on 1 layout is the right way!

    Read my comment again please.

    On start of each level I create only those objects that I need on this level, using the data from CSV file. It works just as fast and the memory usage is the same as with having separate layouts for each level.

    Also, you can potentially have a million levels with just 1 layout if you do it properly! Can you create a million layouts in C2? I don't think so

  • NN81, I never said that having all objects from 100 levels dumped on 1 layout is the right way!

    Read my comment again please.

    On start of each level I create only those objects that I need on this level, using the data from CSV file. It works fast and the memory usage is the same as with having separate layouts for each level.

    Also, you can potentially have a million levels with just 1 layout if you do it properly! Can you create a million layouts in C2? I don't think so

    the important thing is that we understood. in general, however, at each level it is well suited to its layout. for a thousand valid reasons. statistically speaking the kind of games you refer to is a strong minority.

  • Actually, it's more organized to have an array, json, xml, whatever, to setup the levels and just one layout to read that and build the level. Also, having all loadable objects on a separate layout allows you to only create the ones used on that level specifically, there's no burden whatsoever in this model dop2000 is explaining...

    This is not, or at least shouldn't be, a strong minority. Several games would be better implemented if they used this framework. If the majority doesn't, it's not because it's better, but because the majority is probably not skilled enough to do it properly, I guess.

    Finally, let's suppose you created 100 levels and noticed, later, you must make some change on level structure that would affect every level. With the multiple layout setting you'll have to make this change 100 times. With the other approach you only change once.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)