Game hanging between layouts

Get help using Construct 2

Post » Mon Nov 17, 2014 5:09 pm

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)
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857

Post » Mon Nov 17, 2014 9:13 pm

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.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857

Post » Mon Dec 01, 2014 7:35 pm

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?
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests