Endless scroller perfomance

Get help using Construct 2

Post » Tue Apr 29, 2014 9:13 am

Hi!
I'm sorry for my english, but i will try to be clear)

I'm making a prototype of... something like a endless runner with top-down view. And i'm aiming to mobile devices. But i had face the problem: even with pretty good fps, like 35-50 gameplay is not feels smooth enough.

The core of game logic:

I have two background big sprites (1280, 720) with bullet behavior. I create them one after another outside of layout and they are flying on bullet behavior to the game window, making the effect of moving. Also I randomly spawn few objects with bullet behavior, which shoud create some variety of backgrounds.

On 60 fps it's working perfectly. But on 30-40 fps it's feels like the background and objects do not moving smooth. I would say it's look like it is moving jerkily.

Is there is a way to make it work more smoothly with 30-40 fps? I don't think i will able to get 60fps on every device. :(
B
4
S
1
Posts: 13
Reputation: 526

Post » Tue Apr 29, 2014 9:24 am

It should have felt smooth with 30+ fps. I think this is happening because background sprites are too big. Could you try to make them much smaller to see if this is the cause? I am not sure but turning them into tiled background object could also help. Make a small i.e 64 x 64 background object and resize it to 1280 x 720.

Hope these help.
B
18
S
4
G
1
Posts: 332
Reputation: 3,149

Post » Tue Apr 29, 2014 10:04 am

I Made a endless scroller for mobile devices myself. So most of what you say sounds familiar to me.
You should definitely use tiled backgrounds whenever you can. This greatly improved my fps. I also suggest you to look at this tutorial: https://www.scirra.com/tutorials/857/fl ... tes/page-1
I learns you how to make the background move without a bullet behavior and let it reset to it's original position, whenever it's out of the layout.
Also when you spawn objects, make sure you make them destroy themselves when they are out of the layout.
B
8
S
4
Posts: 120
Reputation: 1,266

Post » Tue Apr 29, 2014 10:37 am

Thanks for advises!
Yea, i know how to move sprites without bullet behavior, but i'm wasn't sure it will make any differense. And also behaviors should work with delta time so it should be fps independed. That's why i choose to use bullet behavior instead of set X. But now i'll try to use that way too.
And ofc i will rework my background sprite to make it tiled. Hope it's gonna help) Thanks!
B
4
S
1
Posts: 13
Reputation: 526


Return to How do I....?

Who is online

Users browsing this forum: BackendFreak, brunopalermo, busydude and 28 guests