Best Practice for...

Discussion and feedback on Construct 2

Post » Sun Jan 22, 2012 7:30 pm

...RPG level design. I personally make the graphics in Photoshop first, then, import to C2. RPG's have many objects displayed on screen at one time, most of the time. Specially for places like towns or forests. My question is, how good will C2 cope with this? Do copies of an instances count as objects or not? How much do they impact performance? In some cases I know I can use pre-rendered, but others, like trees, NPCs, etc., I cannot.

For example, a big city would have considerable size, this also means many sprites. Although the whole map won't be showed at once. Does C2 still process the non visible part of the map the same as the visible area? Or does C2 kind of ignore non-visible parts for better performance?

This is very important to know for me, because I plan in having an over world map, and this map will use animated water tiles and the size of the map will not be small, but not incredibly big either, since I can make the sprites smaller once in the over world map to give illusion of larger environments.

Thanks!
B
47
S
10
G
6
Posts: 455
Reputation: 8,326

Post » Mon Jan 23, 2012 11:06 am

I know C2 does not try to render objects that aren't visible... however I suppose if you are applying events to them they will still be taking up performance.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Mon Jan 23, 2012 1:02 pm

I believe what sqiddster said is accurate. Consider using the Sprite Bank plugin if it's not. If you want to limit events to on-screen sprites, the "Is on screen" condition is your friend.
B
55
S
12
G
8
Posts: 339
Reputation: 9,314

Post » Mon Jan 23, 2012 3:44 pm

@cow_trix and @sqiddster : Thank you for yer answers.

Could someone from Scirra ( @Ashley or @Tom ) confirm this and answer my other concerns? I'd appreciate it. :)
B
47
S
10
G
6
Posts: 455
Reputation: 8,326

Post » Mon Jan 23, 2012 4:27 pm

I recently tested my system and found that 1000 sprites@ 32 pix is pretty close to the point where you slow fps.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Mon Jan 23, 2012 5:08 pm

@newt: Counting copies? Or different different sprites?
B
47
S
10
G
6
Posts: 455
Reputation: 8,326

Post » Mon Jan 23, 2012 6:19 pm

Well I ain't gonna add 1000 different objects just for a test. :P
So yeah, 1000 instances of the same object.
3 Frames each.
Just remember instances don't add up as far as memory goes. What gets you is the cpu keeping track of all those objects.
Those instances were static, if they were all moving, the frame rate would fall dramatically.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Mon Jan 23, 2012 6:52 pm

@newt: I See. 1000 copies is a lot, though. NPCs are moving most of the time, and are pretty much the only things that will be moving. A big RPG city typically doesn't reach the 50 NPCs really. I doubt it even reaches 30. Plus they aren't showed all at the same time either, since the screen scrolls. I think I will be fine on that end. On static objects, I do not think I will ever reach 200 showing at the same time, either. I guess it will be fine.

Do you know for sure if C2 makes objects not visible in the current display area inactive? Or do I have to use what cow_trix suggested?
B
47
S
10
G
6
Posts: 455
Reputation: 8,326

Post » Mon Jan 23, 2012 7:00 pm

As far as C2 is concerned, if the object exists in the layout, and is not destroyed, it has a reference.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Mon Jan 23, 2012 7:58 pm

@newt: Thanks a lot newt. Based on the information you gave me, I think it will be fine. Thanks again. :)VampyricalCurse2012-01-23 19:58:35
B
47
S
10
G
6
Posts: 455
Reputation: 8,326

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 12 guests