Game hanging between layouts

0 favourites
  • 3 posts
From the Asset Store
20 high quality click sounds, ready to improve your game's UI instantly
  • I have run into a problem with the game that we are building hanging for around 3-6 seconds between a specific layout pair.

    When the button to swap layouts is clicked, the game freezes for a few seconds, then loads the new layout.

    Has anyone else run into something like this? If so, did you find what caused it for you?

    The generic list of actions that occur on layout load are:

    1) All of the static objects are loaded (maybe 5-10 objects, 1 very large (2000x1000px) object)

    2) AJAX call with ~100 character response

    3) response is parsed into a rex_rainbow Hash table

    4) Dynamic objects are loaded, based on AJAX data (3-11 objects)

  • Actually, I think I see why now. The problem isn't the layout that it is going to. The problem is the 40,000 objects in the layout that it starts on. The client has to destroy and remake those 40,000 objects each time it goes to and from the layout.

    I think I might try just hiding those objects perhaps, rather than destroying and re-creating them.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Okay, so not forcing it to destroy / re-render all of those objects fixed the hang between layouts. However, this created other problems...

    The primary problem now is that objects that are procedurally generated "shift" in the position of all of the objects by a factor of around 8x to 10x in position in between layouts.

    Thoughts on how to stop it from arbitrarily moving things while not on that layout?

    I found a "Persist" behavior. Would that effect more permanency in my objects?

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