0 Favourites

Best way to handle multiple levels

This forum is currently in read-only mode.
  • What is the best way to think about multiple levels in construct? Should each level be in a different layout or should events be used to load things to get another level?

    How are behaviors of objects updated if there are multiple levels? Must changes be done individually on every level?

    Can an object have a static variable? IE: player sprite has a static health variable that does not change from layout to layout.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • What is the best way to think about multiple levels in construct? Should each level be in a different layout or should events be used to load things to get another level?

    Generally speaking the 2nd method you mention would be preferable. However, if you have a little game with say 3 levels it might be more of a hassle and not really worth the effort to develop such a system/level editor.

    How are behaviors of objects updated if there are multiple levels? Must changes be done individually on every level?

    This question somewhat confuses me. If you have instances of an object with a certain behavior on multiple layouts, it will naturally work on all of them.

    Can an object have a static variable? IE: player sprite has a static health variable that does not change from layout to layout.

    That's what global variables are meant for. So instead of using a private variable which is directly connected to the object, you use a global variable, which will stay the same throughout layouts. Also look into global objects. But beware this will mean that the object keeps existing on every layout unless you destroy it.

    And welcome to the forums.

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