Large images & rendering

0 favourites
  • 13 posts
From the Asset Store
500 monsters and creatures images for card games - Set 1
  • Does Construct 2 only render what is on the screen, or is it rendering everything off-screen, as well?

    The reason I ask is I'm working on an rpg/adventure game that we're preparing art for, and I really want to stay away from tileset art and have more "varied" and less square-like environments.

    If it does render everything, what is the best way to do this?

  • No game engine in the world renders things which is off-screen. Why would it do that? You can't see it anyway!

  • Thanks, Ashley! So it would be okay if I chopped the environment images up into little pieces and used other sprites for environment objects (ie trees, rocks, etc.)?

  • It is strongly recommended to compose your levels out of lots of smaller objects, for memory use reasons. Lots of large images can use up all the RAM on mobile devices pretty quickly.

  • No game engine in the world renders things which is off-screen. Why would it do that? You can't see it anyway!

    What do you mean by offscreen? Objects placed out of view port or objects placed out of the margin? Please make it clear.

  • Asit - off-screen as in out of view, but within the canvas.

    However, contrary to popular belief, having tons of objects (even the same objects) off-screen will still affect performance even though they're not being rendered.

  • But that's mostly due to object/logic tracking with those objects and collision checks, which collision checks already cull objects obviously too far away according to a previous post by Ashley.

  • Thndr - true, but even adding conditions such as "on mouse click" or "variable = x" before utilizing a collision check which should nullify the logic tracking doesn't seem to do anything with the framerate. I've even implemented a debug button that deactivates every line of code, and then fps still barely changed.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ome6a1717: Thanks for your reply.

    But please make it a little bit more clear in terms of Construct2 engine.

    Suppose my Layout Size in Properties Explorer is 640,960 and Margin is 500,500. Then what should be considered as offscreen? Objects out of view port (640,960) only or objects out of Margin?



  • Margin and layout size don't mean anything for performance (it doesn't matter what their values are at all). Offscreen is meant by anything outside of the game's window (you can't see it while playing basically).

    Offscreen may not be rendered by the GPU but they'll still have events run for them (by the CPU). Ashley hasn't done any optimization for the collision checking so doing lots of collision checks on far away objects is a bad idea.

  • Asit - Anything outside of the "Window Size" is considered off-screen (found in project properties). You can see a dotted line (you will only see it if your layout size is larger than your window size)

    - this could be huge if there were a way to optimize collision checking for objects on screen. Frame rates in some cases could increase exponentially.

  • ome6a1717


    I do wish what said comes true! I have a lot of solid objects off-screen that really kill my frame rates alot! That's why some of my projects aren't completed because of this problem...

  • oh wait! I found a solution! Just set "objects" family when (invert)on-screen, object remove collision detection. Then, another event of set "objects" family when on-screen, object enable collision detection! It works perfectly!! I guess it was the lack of my knowledge on C2 :3

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