Changing layouts takes long

Get help using Construct 2

Post » Mon Nov 03, 2014 12:01 pm

Hi, everyone, so I have two layouts in my game now and one of them has quite large, nice pictures (sprites) in it.

When I try to use the System->goto to change layout from the simple one (menu) to the nice one (game), the game freezes for a couple of seconds, can this be helped or prevented?

Thanks for reading.

- thonic
B
2
Posts: 2
Reputation: 154

Post » Mon Nov 03, 2014 1:41 pm

can you post the code?

it might be the images, or some code running on start of layout that is lagging it
B
45
S
19
G
8
Posts: 512
Reputation: 8,619

Post » Mon Nov 03, 2014 2:59 pm

you say nice picture sprite? If it's big pic file then it would do. instead try loading that sprite as tilebackground and see what happens
B
256
S
39
G
15
Posts: 1,982
Reputation: 41,032

Post » Tue Nov 04, 2014 4:08 am

Thanks for suggestions, I will try and make an empty project with just two empty layouts, one with the images and (hopefully) see what causes it.

I read that using the tilebackground for bcgs with large images is less effective than sprites, because it is optimized to repeat the image, but I will give it a shot.

I have the large background image split into small sprites that I arranged one to another, which I found in the documentation to be the suggested way of dealing with it.

I can post the code, but it is really simple, just as I described - but I don't want to post the images, it is a commissioned work of an artist.

In any case, is there a way of making a loading layout that would load the graphics after the application is run? So that you would click in the menu on "game" or something and the graphics would start loading only then.
B
2
Posts: 2
Reputation: 154

Post » Tue Nov 04, 2014 6:14 am

but I don't want to post the images, it is a commissioned work of an artist. It's fine we understand. No need to explain but, as I said try it the way I said. You should be fine.
B
256
S
39
G
15
Posts: 1,982
Reputation: 41,032


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 13 guests