Quick question on Visibility

Get help using Construct 2

Post » Wed Mar 01, 2017 8:49 pm

@99Instances2Go Nice test there. Confirmed my thoughts on what was causing some slowdowns. This is crucial for me especially since I'm developing for mobile. A lot of these small little resource hogs adds up to quite a lot in the end.

So I'm gonna go over my events now and make sure I kill unnecessary stuff. All That don't need to run in the backround.

killing lerps as soon as the get close enough, and not even moving things if I don't have to. I use a lot of lerps happening of screen, things fading in and out etc on the map. I Should try kill those kind of things also. Why do i need to smoothly animate stuff not on screen right?
Follow my progress on Twitter
or in this thread Archer Devlog
B
41
S
18
G
19
Posts: 1,055
Reputation: 14,019

Post » Wed Mar 01, 2017 9:29 pm

You should test things for yourself, but I think that unless you have hundreds of instances, checking things like animations will add very little to optimization.
Image ImageImage
B
172
S
50
G
182
Posts: 8,432
Reputation: 115,083

Post » Wed Mar 01, 2017 10:04 pm

I think that 'for each' is a real hog, when having to go trough a lot of objects that need a personal outcome.
So lets do something wild.

https://www.dropbox.com/s/eoxma2kzjj4r4 ... .capx?dl=0

Do you see how i avoid a 'for each' by using a container ?
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Wed Mar 01, 2017 10:19 pm

@newt On PC yes, but on mobile even 20+ instances can have a considerable effect from what I've noticed. Even using a simple particle emitter is huge NONO for mobile.

Some conclusions I've made so far.

Sprite count on screen is directly related to draw calls. Sometimes fewer bigger sprites is better.
Sprite count is directly related to CPU performance, especially when it comes to picking objects. The more objects you have to pick from the heavier it is.

In this case also, less is more.
Follow my progress on Twitter
or in this thread Archer Devlog
B
41
S
18
G
19
Posts: 1,055
Reputation: 14,019

Post » Wed Mar 01, 2017 10:40 pm

99Instances2Go wrote:I think that 'for each' is a real hog, when having to go trough a lot of objects that need a personal outcome.
So lets do something wild.

https://www.dropbox.com/s/eoxma2kzjj4r4 ... .capx?dl=0

Do you see how i avoid a 'for each' by using a container ?


Interesting. That's quite cool actually, I never thought of that. That might come handy in some cases.

For each is a pain, but sometimes picking just by a variable is enough.
Follow my progress on Twitter
or in this thread Archer Devlog
B
41
S
18
G
19
Posts: 1,055
Reputation: 14,019

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests