How do I organize my layouts?

0 favourites
  • 7 posts
  • When you make a game, what is a layout to you? A level? I'm working on my first larger project, and I'm unsure if I'm doing it in a way that will just get too complicated to handle later one.

    Allow me to explain:

    I'm working on a dialogue-heavy adventure game.

    The core loop is:

    Enter a scene -> Click on objects on the scene -> Read description/Take action -> Speak with Characters -> Leave for the next scene.

    Now, the game flow right now is:

    Cutscene & Splash Screen -> Intro section with a sequence of 3 scenes, dialogues and Click -> The actual game, with the player transitioning per scene as he sees fit to investigate the plot.

    Here is a mockup of the game

    A scene with Dialogue

    Followed by a point 'n click adventure-like interaction.

    Now, my question is, how should I organize this mess?

    Right now I have:

    * The Cutscene + Splashscreen as a Layout + Event Sheet

    * The intro section as a Layout + Event Sheet

    * The rest of the game as a Layout + Event Sheet

    But things are getting complicated as each scene has its own objects to click on + dialogues.

    * Is having one Layout per scene cost-effective? In that case, should I have an Event Sheet with the basic game controls, then a specific one per scene?

    * Is there some sort of limitation to the number of events a Sheet can handle? I'm getting the feeling that some things started not working for no apparent reason.

    Any help here is most valuable.

    Thank you!

  • Yes and No. A layout can and often is a layout but, sometimes you can still have all of your levels on a single layout. Aside from levels, a typical example of one my games project folder for layouts might look like and in this order run like the following:

    Loading Layout ( My custom loading layout)

    Start Layout ( The Splash Screen where a player has the option to Start Game or go to Instructions )

    Instructions Layout ( Optional Choice this may also be a Story Board )

    Level Layout ( Where the current achieved is displayed and selected )

    Story Layout ( There may or may not be here and if so, it consist of 2 or more additional layouts )

    Main Game Level(s) ( Where the main game play takes place. This could be 1 to 20 physical levels )

    High Score Layout ( High Score / Leaderboard )

    End Game Layout ( Where the user gets to Restart or Exit the game )

    At least his is my approach. Pretty straight forward.

  • So - I'm just tossing out a largely uninformed opinion here - I am just learning my way around the engine still - but couldn't you group several scenes into a single layout and toggle visibility on for all the objects needed for that scene with a single event?

    That way you could organize them in sort of a "chapter" format, maybe? And then for "whole game" or navigation or global events, you'd have a separate sheet that you do an "include" on for every layout?

    regards,

    Rowan

  • Rowan That was what I was considering, but there is one problem. Since each scene/background is a real painting each interactible object is actually an instance of the same object (a transparent rectangle). Turning specific instances on and off per scene seems not to work. For some reason I can't get them to appear on the correct position (actually they seem to ignore my commands through UID or IID).

    Visibility also doesn't work, as the mouse click and mouse over actions still "see" them.

    If each scene is a layout with its own distributed objects already in place, I same myself a headache trying to figure out what is wrong

    I just wasn't sure if having multiple layouts (as TheDom puts it) was the "right way" to do it.

    I'll test that out during the weekend and see how it goes.

    Thanks!

  • Ah - ok. Alright - I'm going to venture out on another uninformed limb here - can you place the different paintings in the scene as sprites and toggle vis on the sprites?

    Looking at a couple of the example games, there are some fairly large images handled as sprites. Probably not super-efficient, but then if you're doing dialog / adventure action and don't need to run simulations or a lot of heavy updating, it might still work for what you're trying to do...maybe?

    regards,

    Rowan

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok, so, how I'm handling it now.

    There is a sprite in which each frame is a scene that covers the whole screen (like the garden on the mockup image above). I change sprite frame depending on what location the player is at at the moment.

    Places where the player can click are placed above specific areas of a painting. using the example above, the two women talking besides the pool would have one such transparent object on top of them (and another instance for the flamingos, and another for the people on the back, as per the highlight on the second img).

    It works for the first scene, but, when i got to the next one, when I need to remove these current transparent squares and replace them with those regarding that new scene, it doesn't work.

    I was thinking here that maybe I could have the 'transparent square' have a variable 'scene', then add a check on the mouse click/over action. I'll see if it works tomorrow.

  • Ok. Do what you feel comfortable with. And yes you can compile a lot more into a single layout. As my example states, sometimes it all in one, and others, spread out across multiple layers. Believe me, the more you pile on a single layout to accomplish visually, especially with large changes including backgrounds, it's going to become more confusing. And of coarse using touch creates more problems as you stated but only because don't know how to resolve those issues. You should also being TiledBackground object and not large sprites for backgrounds.

    For another example; You could group all code into groups by layer and disable and the enable groups while scenes change with the use of making layers visible and invisible. And you'll definitely be using more memory.

    Aside from that, I'm only pointing how much work it is to think through. There's going to plenty of cases where you can do it and others when it's really best to break down into more layouts. You'll save a ton of time and the game will run better. You have to use your judgment. I do it a little different every time. I have 2 games that have 20 levels take place on a single layout and others that every level is a separate layout. In the end as you make game after game you'll learn to try it different ways. But if want to develop faster, I strongly suggest you break it down into layouts when it's appropriate. You'll have more room to make modifications and better control over things like banner ad placement and transitions. This is the way I do it. It's not the only way. In the end, you have to learn how do things that well with your thought processes and how you visualize things creatively and technically during the development process.

    Good Luck

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