Where do i place out all objects for load?

0 favourites
  • 8 posts
From the Asset Store
Spooky Places game assets for 2D endless runner action adventure game.
  • Hehe hey there! ^_^

    So we know that all objects must be placed out already for C2 to load them (On create).

    But is this once upon a save or is it for every time the player launches the game?

    (Ie, should all objects be placed out on the main title screen for every launch, or every loading screen, or is it enough once like the first starting area? Since rest of the game isnt affected by it?

    Thanks for the help! ^_^

    - All the best!

  • Are you referring to C2? as this section is for c3

    If you are referring to c2 the Object must exist in some Layout, so you have two options:

    1-Place the objects that the current Layout is gone be using during that Level

    or

    2-You can Put all the Objects on a different Layout you can Name it "Bank Objects" then you will be able to create the objects on RunTime

  • I know that. But is it enough it exist in a layout once per save? Or must it be once per launch? Everytime the player launches the game, must that layer be played once atleast or it doesnt since u have a saved game?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I know that. But is it enough it exist in a layout once per save? Or must it be once per launch? Everytime the player launches the game, must that layer be played once atleast or it doesnt since u have a saved game?

    I'm sorry mate I found quite difficult to follow what you trying to say especially this >>>(once per save?)

    it looks like there is a confusion here or I didn't understand your question properly I will leave it to someone else to see if they can give you better help than me. As you asking for Loading the Game and Objects but at the same Time you talking about saves and Layers it doesn't make sense as everything its done before you export the Game so is no sense to talk about the save Games.

    After the Game is exported and installed:

    1-C2 Loads the whole assets before the Game starts into the Memory

    2-C2 loads after that Layout by Layout meaning if you go directly to Level 1 it will load only the objects from Level 1 once you finish playing that Level and if you change layouts all the objects that are not used on the Next layout will be destroyed it only keeps the one that will be used on the next layout

    3-You just need to make sure what you already know which is to place the objects on their respective layouts before you export the Game and if you do this properly you shouldn't worry about the saves that happen after Exports as that is C2 responsibility after the Export so it will take care of that as long you done everything properly

    If this is not what you looking for please give them more Explanation to understand more and I'm sure someone else will help you out I hope it helps.

  • > I know that. But is it enough it exist in a layout once per save? Or must it be once per launch? Everytime the player launches the game, must that layer be played once atleast or it doesnt since u have a saved game?

    I'm sorry mate I found quite difficult to follow what you trying to say especially this >>>(once per save?)

    it looks like there is a confusion here or I didn't understand your question properly I will leave it to someone else to see if they can give you better help than me. As you asking for Loading the Game and Objects but at the same Time you talking about saves and Layers it doesn't make sense as everything its done before you export the Game so is no sense to talk about the save Games.

    After the Game is exported and installed:

    1-C2 Loads the whole assets before the Game starts into the Memory

    2-C2 loads after that Layout by Layout meaning if you go directly to Level 1 it will load only the objects from Level 1 once you finish playing that Level and if you change layouts all the objects that are not used on the Next layout will be destroyed it only keeps the one that will be used on the next layout

    3-You just need to make sure what you already know which is to place the objects on their respective layouts before you export the Game and if you do this properly you shouldn't worry about the saves that happen after Exports as that is C2 responsibility after the Export so it will take care of that as long you done everything properly

    If this is not what you looking for please give them more Explanation to understand more and I'm sure someone else will help you out I hope it helps.

    No, this has nothing to do with my question. Let me explain it in a way.. That you will understand, hopefully.

    So CS2 can not laod objects unless they are on a layer that has been visited right? Ie, if u play on Layout 2, the system cant create objects that only exist on Layout 1 into Layout 2. BUUUT! If the player has been to Layout 1 before, THEN the system can create objects in Layout 2 that exist on Layout 1.

    So my question is; LETS say u visit Layout 1 then Layout 2. Now you close the game. The next day u launch the game again. And u load the game in Layout 2. Now CAN the system create object that exist on Layout 1 and not Layout 2, since the player did not visit Layout 1 this launch.

    Get it now? Or MUST the player again visit layout 1? In this case its better to load all objects on a loading screen or title main screen so it can load these objects every launch.

    Understand?

  • Your statement is wrong.

    A player does not need to visit the layout with the objects at all. but the layout must exist in the project. like tarek said, you can use a hidden bank layout will all things, which the player never need to see. this is for c2 runtime.

    with c3 runtime you do not even need this layout at all.

    (so for your question: yes the game can load the objects directly in layout2, without visiting layout1)

  • So CS2 can not laod objects unless they are on a layer that has been visited right?

    You see, now with that we got to the Root of the Problem, this is the one that it didn't let you understand what I was explaining to you as you had the wrong understanding somehow so it was causing miscommunication and I knew from your first Replay that it will be very difficult to make you understand this concept that's why I decide to let someone else see if they can make you understand better without making you more frustrating. Luckily fredriksthlm came to rescue and made the Answer more simple to understand probably I talk to much :)

    Thanks, fredriksthlm

    To add more to what fredriksthlm explained:

    To make it more obvious here is the visual representation maybe will help you to see the things more clear.

    I need a Game that has Menu and Two Levels:

    -For Menu: I just need a Button

    -For Level 1: I just need the Enemy1

    -For Level 2: I just need the Enemy2

    1-Place the objects that the current Layout is gone be using during that Level

    https://www.dropbox.com/s/rnq1038jy49ldti/1-Layout%20By%20Layout.capx?dl=0

    or

    2-You can Put all the Objects on a different Layout you can Name it "Bank Objects" then you will be able to create the objects on RunTime, this is for developers that like to keep the Levels or layouts clean just with the Decorations

    https://www.dropbox.com/s/y1db18k3cp4oags/2-Layout%20By%20Layout.capx?dl=0

    As you can see you can start from any Layout and travel to any other layout without any problems and this is without Ever visiting any Layout that holds all the objects that the project use. Also, you can save and you can load without any problem.

    Things you got Wrong:

    1-First you need to understand the concept of why c2 tells you that any object that you gonna use it must exist inside the project before you can refer to it or create it.

    This is by design to avoid Exactly this Problem:

    here's an example if you try to go to "Level 2" you gonna get an Error Log because on the start of the Layout we have an Event that needs to create the "BadGuy" object but the BadGuy is nowhere in the project, so this is not about Visiting a "Layer" or "Layout" its about having the Objects inside the Project in some Layout.

    https://www.dropbox.com/s/ehv9clasccno9uw/3-Layout%20By%20Layout.capx?dl=0

    2-There is the second thing you need to understand that comes together in a Pack, C2 loads 1 Layout at the Time when you finish one it loads the next one so basically, its Layout by layout and this is to win Performance and to avoid doing the things that you where doing putting all the objects in one Layout and load that layout First on the start of the Game because if you think you load all the objects but you need to use just maybe 10% so you would have wasted 90% extra Memory Plus slows Downs loading your Game etc.... That's why it was designed the Layout by layout to avoid this, where you can just go to "Menu Layout" and load just the Objects that you need Example (Buttons, Txt, Icons) etc....and the other Levels the same just Load the things you need by request.

    I hope this clears up your doubts

  • Yes! Thanks alot for the answer & more! ^_^

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