Render cells vs one giant object

Discussion and feedback on Construct 2

Post » Sun Apr 19, 2015 11:40 pm

Hi all. I've got a crude "cave generator" going and I'm exploring ways to generate the terrain graphics, so I was wondering what'd work better performance-wise: having a lot of sprite objects + using render cells, or having one humongous object that covers the entire layout?

Back in CC while working on a similar project I experimented with using the Canvas object to effectively turn all of the scenery into one big object, but this sounds like it'd put more strain on rendering since it's both huge and always on screen, so presumably the entire thing needs to be rendered all the time. I'm not sure a tilemap would work for what I have in mind, so for this scenario I'm only comparing these two. Thanks for any help.
B
54
S
24
G
18
Posts: 295
Reputation: 13,140

Post » Mon Apr 20, 2015 5:06 am

I hear you shouldn't use images larger than 2048x2048. Either way I'd choose sprites + render cells if they're mostly static.
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Mon Apr 20, 2015 8:27 am

I'd go with the same approach ; it's always a safe bet, at least at first before you start profiling a finished level and identify actual bottlenecks.

Also, there's always a trade off between memory and cpu usage, granularity and batching. Usually going with a large texture atlas helps with batching, and using small elements helps with scene management (culling, etc.)
Image
Game Producer & Independent Developer - http://raphaelgervaise.com
B
24
S
9
Posts: 240
Reputation: 2,238

Post » Tue Apr 21, 2015 6:51 pm

Alrighty, I guess we're all on the same page here. Thanks for the help.
B
54
S
24
G
18
Posts: 295
Reputation: 13,140


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 5 guests