Behaviour performance question

Discussion and feedback on Construct 2

Post » Sat Aug 02, 2014 6:45 pm

Does it make any difference if i have a bunch of object each with a bullet behaviour on it or have them all in a family with the behaviour on the family?
Image
B
82
S
30
G
12
Posts: 517
Reputation: 12,763

Post » Sat Aug 02, 2014 7:17 pm

thats a good question and i hope anyone reply
B
46
S
16
G
8
Posts: 800
Reputation: 8,347

Post » Sat Aug 02, 2014 7:24 pm

Yes, it does make a difference. It's much easier for you to only manage one behavior and its settings.

But I guess you meant a difference in cpu load. If there is one, it won't be measurable. In both cases each object's spacial data has to be calculated.
Image
B
24
S
8
G
10
Posts: 1,821
Reputation: 8,279

Post » Sat Aug 02, 2014 7:33 pm

Yeah i know that, but what i was wondering is, if there is another overhead processing for using more then one of the same behavior.

Thanks for replying.
Image
B
82
S
30
G
12
Posts: 517
Reputation: 12,763

Post » Sat Aug 02, 2014 7:44 pm

As far as I know, it's identical. Adding a behavior to a family basically adds that behavior to every object that's in that family.
B
33
S
12
G
7
Posts: 227
Reputation: 7,582

Post » Sat Aug 02, 2014 7:46 pm

Great thanks, thats what i needed to hear :)
Image
B
82
S
30
G
12
Posts: 517
Reputation: 12,763

Post » Sun Aug 03, 2014 9:05 am

B
51
S
16
G
9
Posts: 1,098
Reputation: 11,252

Post » Sun Aug 03, 2014 9:24 am

Thanks @spongehammer that's a good read, i don't really have fps issues, i just get some jitters from the bullet behavior especially on the beginning of the layout, so i thought i'll ask just in case.

Here is a different performance question i have on my mind,
If i have a 128x128 sprite object and i stretch it in the layout to 256, does it consume memory as a 256 sprite?
Or in other words, is it the image size or the display size that sets the memory consumption?
Image
B
82
S
30
G
12
Posts: 517
Reputation: 12,763

Post » Sun Aug 03, 2014 9:27 am

@Lof,

sorry not to answer directly but Ashley explains it far better than i could :)

https://www.scirra.com/blog/112/remembe ... our-memory
B
51
S
16
G
9
Posts: 1,098
Reputation: 11,252


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 2 guests