Question about doing a whole game on only one layout

0 favourites
  • 10 posts
From the Asset Store
Footsteps SFX One contains 400 sounds of steps and jumps on different surfaces.
  • Hi everyone,

    I'm currently working on a project that uses only one layout (except for loading and title screen). I was just wondering if this was possible or if I need to make transitions via another layout with maps or such things, to keep everything running smoothly.

    To give you an idea the project is around 6000 events and will have about 100 levels, so it's not a small game. There are sort of world maps (not animated) between each level that I create on a foreground layer, then delete them when going back to the game (which is still running in the background).

    My question is to know whether or not this has technical downside. Will the game start to slow down after a while because I use always the same layout?

    Thanks !

  • 6000 events?

    It would takes hours just to scroll that.

    Anyway, if you keep the memory use to a reasonable level, and reuse all the same graphics, then yes one layout is doable.

  • All of my game/project will only have one layout

    and they have many levels too

    you should let your game levels to Script

    and read them from somewhere

  • How long have you been working to reach that 6000 events? Must be a really big game... MMO?

  • Hi !

    Thanks for your replies. I'll definitely keep the whole game in only one layout.

    To answer your question I started the game about 2 month ago, and it's not an MMO or anything like that. I suppose an experienced construct 2 user would do the same game with much less events. Still, I have many characters/enemies and most of them need a good bunch of events to describe their behavior.

  • I had the same question!!

    I am creating an Isometric game where the Level scrolls downwards, I create tiles at the top of the screen and destroy them when the exit the screen below. is

    I have written all my game logic in a single Layout - Platform and background(environment) Scrolling , Collision detection, Enemy logic and other standard game events.

    Now my question is, when the player reaches the End I want to load a new set of Tiles and Environment image (eg: from Desert -> Snow -> Jungle). What is the most efficient way to do this?

    I read that C2 loads required images/objects only when the Layout is loaded. So how to I group my Tile images?

    Can I create a common Platform Sprite and have each Level images grouped under various Animations?

    Will C2 still load all the level images into Memory even if I am not calling the animation?

    Or Do I have to create separate Sprite objects for each Level?

  • [quote:3ko3zuxj]I read that C2 loads required images/objects only when the Layout is loaded.

    I guess this means that C2 doesn't load every image in the whole project but, just images from current layout.

    You can load images at runtime using load image from URL which might be a bit misleading when actually you can load images from your project files using "DesertGroundTile.png" for example but, it seems you cannot specify the path. If you are using NodeWebkit and want to load textures from files externally you can use "NodeWebkit.AppFolder&"Textures/Desert/GroundTile.png". And of course you can also load them from URL.

    Just note that if you are using Sprite object you cannot create frames at runtime (at least not at the moment) but, something I've been using is to make tiny 2x2 frames where those images can be loaded. If you have predefined amount of different tile types you should't have to do this.

    [quote:3ko3zuxj]Can I create a common Platform Sprite and have each Level images grouped under various Animations?

    Will C2 still load all the level images into Memory even if I am not calling the animation?

    Don't put all your tiles into animations they are all loaded no matter if you use the animation or not.

    About the actual levels. If you want to keep everything inside the project one way to do this is if you have another project just for level building. Then you run the map layout just that it exports to JSON or Array or some format and store those map files inside your actual project to "Files/Maps" for example. Or if you use Node-Webkit then to their own file. To load new level, handle the loading process in the beginning and when loading a new level just restart the layout and point with global variable or something that which level will be loaded.

    Also one option is to make your own editor. The plus on this would be that you can ship that with the game of course this would be much more work if you want to make it user friendly. I personally like this approach on large projects. It can also make some things a bit easier.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey Katala

    Thanks for the detailed explanation. Really Appreciate it

    My game is like an endless Runner. The map is very random and I do not wish to pre-generate the map information. Using set of tiles and Environment objects (Grass, Trees, Barrel, stones,rocks) I am creating Random scrolling maps.

    The only thing that I like to change is the Base Platform tiles (eg: if current level City, next should be Forest). The environment images will probably be used across all levels.

    [quote:3gfseyhd]Don't put all your tiles into animations they are all loaded no matter if you use the animation or not.

    I think this is the most important thing I wanted to know! Looks like I will separate each level under its own Sprite Object and use a common Transparent "Spawn" sprite to spawn object over it (Just an idea right now).

    Do you think that will be possible?

    Can do this (not actual C2 code)?:

    PlatformSpawnSprite.SpawnAnotherObject ( "Level" & CurrentLevel).Frame(0)

  • SamRock

    Well it all depends how many images and how large they are. If you don't have that much I think it should be ok to have them all in one Sprite animations. Just keep an eye on your image memory usage and if it starts to get high make some more sophisticated systems.

  • Thank again Katala

    I been looking for the "best practices" in Construct2 or organizing images, but cant seem to find one

    With just 1 level , my image memory usage is already about 32MB! I think I will have to scale down the images and work on the resolution.

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