Large images & rendering

Discussion and feedback on Construct 2

Post » Mon Mar 25, 2013 8:38 am

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?

B
22
S
3
Posts: 451
Reputation: 2,135

Post » Mon Mar 25, 2013 2:04 pm

No game engine in the world renders things which is off-screen. Why would it do that? You can't see it anyway!
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Mon Mar 25, 2013 5:55 pm

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.)?
B
22
S
3
Posts: 451
Reputation: 2,135

Post » Mon Mar 25, 2013 9:17 pm

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.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Thu Aug 22, 2013 1:47 pm

[QUOTE=Ashley] No game engine in the world renders things which is off-screen. Why would it do that? You can't see it anyway![/QUOTE]
What do you mean by offscreen? Objects placed out of view port or objects placed out of the margin? Please make it clear.
B
9
S
3
G
3
Posts: 28
Reputation: 2,641

Post » Thu Aug 22, 2013 5:47 pm

@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.
B
22
S
3
Posts: 451
Reputation: 2,135

Post » Thu Aug 22, 2013 7:50 pm

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.
B
15
S
4
G
4
Posts: 294
Reputation: 3,225

Post » Thu Aug 22, 2013 9:37 pm

@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.
B
22
S
3
Posts: 451
Reputation: 2,135

Post » Fri Aug 23, 2013 10:04 am

@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?

Thanks,
Asit
B
9
S
3
G
3
Posts: 28
Reputation: 2,641

Post » Fri Aug 23, 2013 11:56 am

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.alspal2013-08-23 12:08:26
B
134
S
65
G
16
Posts: 1,766
Reputation: 19,190

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 6 guests