Performance drops with scrolling background

0 favourites
  • 4 posts
From the Asset Store
All popular touch mechanics - scrolling, zooming, swiping
  • 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.

  • 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.

  • 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?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

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