Performance drops with scrolling background

Get help using Construct 2

Post » Thu Feb 26, 2015 4:25 pm

Hi,

I've been testing my game and noticed that the scrolling backgrounds on my game are affecting the performance of my game.

I've got 3 layers for my background which scroll at different speeds to create a infinite parallax effect, which i'm doing through families.

If i turn this off and leave it as a static background, the performance of the game on phones improves quite a bit, so are there any methods or advice i could use for my background to create a parallax infinite scroll like what i have now that doesn't take a hit on performance as much? Sorry if this question seems vague.

I've provided a capx, this is just the autorunner template with very stripped out backgrounds from my game with events and family included to show how the background is on my game.
You do not have the required permissions to view the files attached to this post.
B
4
S
2
Posts: 111
Reputation: 830

Post » Sat Feb 28, 2015 12:45 am

I built a game out of the same sample project and did the same thing without issue but, don't put them on separate layers and don't use families. Put them all on the same layer and simply give them each a different speed to create the parallax effect instead of separate layers with different parallax values. Should work fine without any performance issues.
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,273

Post » Sat Feb 28, 2015 11:19 pm

@TheDom Thanks for the advice, i'll try it. I was under the impression that families would be good for performance based on what i've read. From what you've said, would i need to repeat the event that i've used for families on each object for my background and control speed through instance variable?
B
4
S
2
Posts: 111
Reputation: 830

Post » Sun Mar 01, 2015 4:59 pm

Families are a good practice but in this case the system is being strained by the fact that it has to parse each individual layers parallax setting and YES, repeat the event for each tiled background using different bullet speeds for each tiled background to create the parallax effect. Generally parallax settings are for use on tiled backgrounds that are NOT moving with behaviors like "bullet" and are at fixed positions.
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,273


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 10 guests