Tips for optimization and efficiency?

Get help using Construct 2

Post » Wed Jan 25, 2012 4:42 am

So, my primary concern with making games in Construct 2 is optimization and efficiency. It's because I want as many people as possible to play my games without sacrificing any quality in nay form, like with detail, sound quality, etc...

Any tips or shortcuts of what I can do, especially event wise?
Zelda Gamekit (my project)

Example capxs I have made:
Zelda-Style Inventory
Zelda Hearts System

The unwritten "How do I" capx etiquette! Nearly always provide a capx of the problem you have, and try to isolate the problem and/or no capx above 10 MB. :)
B
38
S
19
G
26
Posts: 438
Reputation: 16,581

Post » Wed Jan 25, 2012 11:04 am

http://www.scirra.com/manual/34/best-practices
http://www.scirra.com/manual/134/performance-tips

Read up on these, specifically the second link. Let us know if you need any more help.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Wed Feb 08, 2012 5:34 pm

I have a couple, may I? :)

About too many objects - would setting visibility to invisible for objects outside layout speed up the game? something like two events for every object that CAN be placed outside the layout:
[code]is outside layout? set invisible
=/= is outside layout? set visible[/code]

BTW, typo in the Performance tips: "Always used Tiled Backgrounds instead of repeating Sprites wherever possible."

Would fullscreen mode set to crop and manually scaling all your sprites on their creation be faster than fullscreen set to scale?

I have a call javascript plugin that in
[code]every 0.1 second -> run javascript function
                  set global variable to read return function[/code]
is this inefficient? I'm using it for accelerometer in appmobi as the touch plugin accelerometer is buggy

huge thank you in advance to someone that can provide answers to these. cheers!ranma2012-02-08 17:38:47
B
81
S
50
G
10
Posts: 555
Reputation: 13,009

Post » Sun Feb 12, 2012 10:47 pm

wow, almost forgot about this one :)

one more, will setting the animation speed to 0 for one frame only objects make a difference?

also does setting a minimal triangle collision mask has an impact if the sprite DOESN'T collide with anything?ranma2012-02-12 23:27:10
B
81
S
50
G
10
Posts: 555
Reputation: 13,009

Post » Mon Feb 13, 2012 1:35 am

[QUOTE=ranma] would setting visibility to invisible for objects outside layout speed up the game?[/QUOTE]
Nope, this will have no effect.

[quote]BTW, typo in the Performance tips[/quote]
Thanks, fixed!

[quote]Would fullscreen mode set to crop and manually scaling all your sprites on their creation be faster than fullscreen set to scale?[/quote]
Probably not - if it's hardware accelerated it will probably have no effect either way, but even if software rendered, scaling sprites is probably as much processing as scaling the whole display.

[quote]I have a call javascript plugin that in
[code]every 0.1 second -> run javascript function
                  set global variable to read return function[/code][/quote]
Generally it's not possible to answer "Is X efficient?" questions, especially when involving third party plugins which isn't our code, but I would guess if you're only doing it 10 times a second it will be perfectly fine. (FYI I've built-in the AppMobi accelerator to the Touch object for the next build)

[quote]will setting the animation speed to 0 for one frame only objects make a difference?[/quote]
Nope, none.

Everything important has been mentioned in the Performance Tips manual entry - anything not mentioned there is probably not likely to have any significant effect. Any important little tweaks you can make to improve performance are already written in the article.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Mon Feb 13, 2012 1:40 am

great, thank you very much for a detailed answer.ranma2012-02-13 01:41:10
B
81
S
50
G
10
Posts: 555
Reputation: 13,009


Return to How do I....?

Who is online

Users browsing this forum: adi pratama and 25 guests