Ashley's Recent Forum Activity

  • Would It be possible to have an option in export for C2/C3 to manually set a target sprite map size? That way we could have a little bit more control and reducing number of sprite maps, and swapping/draws?

    It already uses the biggest widely supported maximum texture size at 2048x2048 (therefore minimising draw calls), with the exception to use smaller sheets where it would save memory (also a big concern). Any option to change this would only be able to set a smaller limit, increasing the draw calls as it has to swap textures more frequently.

    [quote:35t4rkq0]So would you recommend me trying to bundle most/all of my artwork into the same sprite in C2 for now, or sprite maps as that seems to be the only thing I could do so far to control it somewhat?

    I would recommend you ignore the problem because most of the time it doesn't matter.

  • The build service currently only supports C3 projects. We're going to think about adding a different way to support C2 projects in future.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Did you try with C3? It has a better spritesheeting engine. Again though, there's still no evidence this is actively causing any performance issues. Each individual draw call as a tiny overhead.

    Avoiding texture swaps is really hard and makes potentially worse tradeoffs. For example the ultimate way to avoid texture changes is to place absolutely everything on to one single giant spritesheet, so there is only one texture which never needs to be changed. However that reverses the benefits of layout-by-layout loading and guarantees that your game will use the maximum amount of memory at all times, which is wasteful and can cause many games to crash on some devices. Then there's the maximum texture size, so sometimes you have to spill over to another texture.

    So there is no evidence this is actually too slow, and "fixing" it could easily make things a lot worse.

  • Should be fixed in r29.2, out now!

  • I've already explained this, and you're just going over the same thing again. This is unique to C2 preview mode only. There's also still no evidence this actually impacts performance in a meaningful way.

  • Maybe try localhost:80 in the URL? The Content Security Policy specifies localhost:* which I don't think matches just localhost.

  • It's there in the documentation, maybe reload the page?

  • Yes, our original announcement covered our intent to support this.

  • As of r29, there's support for third-party behavior addons. Developers can now start porting their C2 behaviors to C3.

    The SDK documentation is updated with the new information about behaviors, but for the most part they're very similar to plugins.

  • I'm assuming Ori and the Blind forest developers are cheating somehow...

    Their lead gameplay programmer David Clark used to work with me on Construct Classic, and I still sometimes chat with him. He hasn't mentioned cheating so far

    Anyways, as ever if you give me a .capx I can actually look at something, otherwise I'll just shrug and say it's probably the fill rate. Construct 2 makes it really easy to hit the fillrate hard. Well-designed games go to extraordinary lengths to optimise this kind of thing.

  • Are you testing in C2 preview mode? That will have lots of texture swapping. It shouldn't happen so much in C3, and less after exporting in C2 (but still not as good as C3, which has a much better spritesheeting engine and combines more images on to sheets).

    GPU fillrate is usually a far bigger problem than draw calls. Spritesheeting doesn't affect it, it's to do with the number of pixels drawn to on the screen. To reduce that you have to use fewer, smaller sprites, avoid heavy overdraw (i.e. stacking lots of sprites on top of each other), and in particular avoid force-own-texture layers (which also includes layers with effects, blend modes, or opacity other than 100%)... or find a device with more fillrate

  • So that particular case touches on a pretty obscure part of the engine. Another piece of WebGL performance advice is not to submit huge buffers in one go, but to actually submit them in chunks. This also helps keep the memory usage down and reduce latency to issuing work to the GPU. So the engine issues chunks of several thousand quads at a time. In the quadissue case, it reaches extreme levels of sprite batching so you are seeing lots of chunks.

    There is nothing to gain by improving this. It looks like it's submitting about 2500 sprites at a time, which means the draw call overhead is about 0.04% of the naive case of one call per sprite. If we increased this to say 5000, it would make such a tiny difference it is totally irrelevant (0.02%), while increasing memory usage and latency. So like most engineering tasks there's a tradeoff here, and we've aimed at a good sweet spot.

    So you are in fact looking at the batching engine working in ideal circumstances, and accusing it of bad performance. You should not jump to conclusions about parts of the engine you don't understand.

    GPU fillrate is the bottleneck that most people run in to, so that is probably the limit in your game too.

Ashley's avatar

Ashley

Online Now
Early Adopter

Member since 21 May, 2007
Last online 15 Jul, 2026

Twitter
Ashley has 1,775,669 followers

Connect with Ashley

Trophy Case

  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • Forum Mega Brain Made 20,000 posts in the forums
  • x126
    Coach One of your tutorials has over 1,000 readers
  • x74
    Educator One of your tutorials has over 10,000 readers
  • x5
    Teacher One of your tutorials has over 100,000 readers
  • Sensei One of your tutorials has over 1,000,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • x42
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

32/44
How to earn trophies

Blogs