How does CC render objects?

This forum is currently in read-only mode.
From the Asset Store
Welcome! I-Spy (Hidden objects) is an educational puzzle that is more than just seek-and-find activities.
  • I have a question. Guys, how does Construct Classic render objects? Does it load all the objects on layout (like in C2) or it only counts objects which are visible at the moment? Can I have one large layout with thousands of objects, but only for example 100 are visible at the moment, will it drop FPS?

  • As far as I'm aware, it loads the entire layout (there's even an event to do that). The only way to help is to disable events for objects when they're off-screen, but this won't eliminate the load. This is a good thing, though, because you don't want loading pauses every few steps. Also, be sure to have multiple instances of objects instead of a thousand individual. It would just be poor design and inefficient to do otherwise.

  • The objects are loaded from the entire layout yes but only the ones visible in the current screen space are rendered thus manually swapping between visible and invisible isn't going to make a difference (and might even cause an actual additional loading header, but being a binary comparison every tick it's not a real issue).

    There are special cases, though, for example disabling shadow casting Light objects disables the shadow rendering too. This became a crucial optimization to a project where we have hundreds of lights but only a couple visible at the time. All of the lights were technically casting shadows (even though they were out of range to even render!) which totally butchered the rendering speed.

    Sprites in CC are quads just like in C2. Having thousands of large sprites definitely ups the loading time. To keep it within reasonable boundaries you might want to have several medium sized layouts you switch between. For example the project I mentioned has somewhere between 2000 and 3000 objects per 2560x2560 pixel space (which is the used layout size) and it takes around 20 seconds to change layouts.

    Edit: Forgot to answer the actual question: in principle the more objects you have on LAYOUT causes longer loading times. The more objects you have on SCREEN causes lower FPS.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you!

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