Graphics vs Performance

0 favourites
  • 7 posts
From the Asset Store
Firebase: Analytics, Dynamic Links, Remote Config, Performance, Crashlytics on Android, iOS & Web Browser
  • 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?

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • not much? a CPU cost?

  • Response to first question:

    scirra.com/forum/performance-tips-question_topic48873.html

    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.

    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.

  • 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.

    And the texture needs to be fetched from memory, so there is that lag too.

  • See Performance tips:

    ize, angle or opacity of sprites/tiled backgrounds has no effect when hardware acceleration is in use.

    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.

  • Wow so basicly i have sort off been living under a rock for 10 years :p

    Very helpfull everyone..

    Many thanks!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)