Graphics vs Performance

Get help using Construct 2

Post » Wed Feb 08, 2012 9:15 pm

I understand more and bigger graphics will impact performance significantly. I also assume html is no different in that graphics are preferably certain sizes like 512 is better than 510 even though 510 is less simply cause 512 is a power of 2? And i am also assuming 4 pictures of 512x512 is better than 1 picture of 1024x1024?

So far i am pretty sure i am on the right path but question 1 is..
How much can i actually put on the screen without messing up and are there good examples of complicated html5 games that i could make with C2 that represent how powerfull it is?

Question 2 is actually more important to me though.
Does everything on a layout impact framerate or do certain things become inactive when they are offscreen (when the layout is bigger than screensize). And when i make a game with more than 1 level do the things on layouts 2, 3, 4, etc impact the performance of level 1 (layout 1) in any way?
B
54
S
7
G
8
Posts: 150
Reputation: 5,812

Post » Wed Feb 08, 2012 10:03 pm

Other layouts do not impact performance (much). Only the current one is being processed (unless there are global objects in other layouts).

Off-screen sprites do not affect graphics performance since they will be culled by WebGL. However, C2 is still processing them so there is a CPU cost for each instantiated sprite.
B
12
S
3
G
3
Posts: 73
Reputation: 2,647

Post » Thu Feb 09, 2012 3:14 am

not much? a CPU cost?
B
54
S
7
G
8
Posts: 150
Reputation: 5,812

Post » Thu Feb 09, 2012 3:38 am

Response to first question:


http://www.scirra.com/forum/performance-tips-question_topic48873.html
[QUOTE=R0J0hound] Performance wise non-power-of-two textures are no different than power-of-two textures. It was the same with CC.

The reason for power-of-two textures was purely for memory efficiency.
In CC non-Power-of-two textures were reported by the runtime to take as much video memory as the closest 2^X texture would take. Most graphics cards now can handle any sized texture as well as 2^X textures. Whether the texture is re sized up to a 2^X texture in memory or not is hardware specific.[/QUOTE]
[QUOTE=Ashley] @R0J0hound is right, the texture size affects memory usage and not runtime performance.

The power-of-two thing is annoyingly complicated: on desktop, you can probably forget it completely, almost all desktop computers now can support non-power-of-two textures. However, mobiles and tablets have weaker, simpler hardware and might still internally use power of two, but you can't easily tell, because the graphics card can make the support invisible (it will pretend it's using a non-power-of-two even if behind the scenes it's using power of two). TBH, I'd forget about it, it's a pain - just test your game regularly to make sure it works on mobile and you'll be fine.[/QUOTE] alspal2012-02-09 03:39:11
B
134
S
65
G
16
Posts: 1,766
Reputation: 19,190

Post » Thu Feb 09, 2012 9:39 am

[QUOTE=Cross_]
Off-screen sprites do not affect graphics performance since they will be culled by WebGL. However, C2 is still processing them so there is a CPU cost for each instantiated sprite.[/QUOTE]
And the texture needs to be fetched from memory, so there is that lag too.
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Thu Feb 09, 2012 3:26 pm

See Performance tips:

[quote]Size, angle or opacity of sprites/tiled backgrounds has no effect when hardware acceleration is in use.[/quote]

Generally textures 1024x1024 or smaller should work on all devices.

Forget the power-of-two thing.

Performance depends on the system, you need to test on a range of devices.

Only things which are visible on the screen affect the framerate, unless you have really intense events or complicated behaviors like lots of pathfinding going on.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Thu Feb 09, 2012 4:55 pm

Wow so basicly i have sort off been living under a rock for 10 years :p
Very helpfull everyone..
Many thanks!
B
54
S
7
G
8
Posts: 150
Reputation: 5,812


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 22 guests