Game optimisation - rotate static sprites

Get help using Construct 2

Post » Tue Jan 20, 2015 4:55 pm

Hello

I am not sure, how expensive for fps is placing rotated sprites. Means, not in game animated rotation, but where I am placing some sprite in editor and rotate it 45, 123 etc degrees. In game it not moving/animating.

I know, I can prepare different sprites (same but rotated) but for my design this is not needed and need much more time of course.

Another question, just for sure. Do sprites outside view are visible state (for engine) or should I disable any outside layout sprite visibility?

Thank for your help
B
10
S
1
Posts: 30
Reputation: 594

Post » Wed Jan 21, 2015 12:28 am

You are on the right track, You can disable anything not required by using "Is on Screen" and invert it.

For example you could disable collisions on all objects not required of screen by putting them into families.

This will increase performance. Depends on your game, but everything helps.
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,273

Post » Wed Jan 21, 2015 1:16 am

Thank you. Here few reasons, why it's not auto disabled I think :) But for example, state like a "disable/hide all objects not on sceen where distance is > than..." would be handy.
B
10
S
1
Posts: 30
Reputation: 594

Post » Wed Jan 21, 2015 3:49 am

Having the rotated images wont make any difference so go ahead and use them.

As for disabling off screen stuff, that will work for collision checks, movements, line of sight checks, stuff like that, however making the sprites hidden/invisible will have no effect on performance.
B
60
S
20
G
56
Posts: 1,077
Reputation: 35,941

Post » Wed Jan 21, 2015 11:31 am

Unless you can measure a performance difference, it's irrelevant. See Optimisation: don't waste your time
Scirra Founder
B
387
S
230
G
88
Posts: 24,249
Reputation: 192,450


Return to How do I....?

Who is online

Users browsing this forum: ezgaming420, marcinkowski and 4 guests