Can the layout size be changed at runtime?

0 favourites
  • 3 posts
From the Asset Store
Plugin Transition Layout C3. Layout opening and closing animation for C3. Quickly set up transitions between lay
  • As I just discovered in another thread: The pathfinding behavior does not work in "areas outside the layout area".

    In my game the level is generated at runtime and the size can vary quite a bit.

    So, is there a way to change the size of the layout at runtime? That way I could set it to be the proper size based on the level that was generated?

    If not, that severely limits the usefulness of the pathfinding behavior (at least in my case).

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • One simple solution is make the layout size big enough to accommodate your largest possible level. There isn't any particular performance related aspect to layout size, only how much you put on it. Note that you have a good chance of running into issues with pathfinding across a large level though.

    Another way would be to move your level around instead of the player, so your player effectively stays in the middle of the layout. This has the advantage of limiting the scope of pathfinding as well.

  • One simple solution is make the layout size big enough to accommodate your largest possible level. There isn't any particular performance related aspect to layout size, only how much you put on it. Note that you have a good chance of running into issues with pathfinding across a large level though.

    This had a occurred to me and would definitely be the easiest route. I'll try it out and stress test the pathfinding to see how it affects performance.

    Another way would be to move your level around instead of the player, so your player effectively stays in the middle of the layout. This has the advantage of limiting the scope of pathfinding as well.

    This is an intriguing idea and might work well with the way I've designed the levels. Thanks for the advice!

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