Pin behavior question

Discussion and feedback on Construct 2

Post » Sun Dec 11, 2016 11:25 pm

I was wondering does pin behavior still use the same amount of resources even when the object it's pinned to is not moving? In other words, if I have object A pinned to object B, and I stop moving object B for a while, should I also unpin object A temporarily or does it matter at all performance-wise (I have lots of different pinned objects in my project)?

I want to improve the framerate on my game so I'm trying to optimize whatever I can, so any input on this is greatly appreciated!
B
50
S
20
G
16
Posts: 167
Reputation: 11,972

Post » Mon Dec 12, 2016 5:44 am

As far as I know leaving non-moving objects pinned should not make an impact on your performance. I thing you are better off optimizing your game in other ways. These are worth a read:

https://www.scirra.com/manual/134/performance-tips
https://www.scirra.com/blog/83/optimisa ... -your-time
B
141
S
34
G
17
Posts: 1,561
Reputation: 21,065

Post » Tue Dec 13, 2016 3:28 pm

@glerikud thank you, that's what I also suspect is the case but just wanted to make sure, as I have quite a few pinned objects in my project. Maybe @Ashley can shed some light in this.

I'm already familiar with the links posted but I will read through them again to see if I've missed anything. I've managed to get my game running a bit smoother now but few extra FPS couldn't hurt :)
B
50
S
20
G
16
Posts: 167
Reputation: 11,972

Post » Tue Dec 13, 2016 6:30 pm

It's probably slower to pick and unpin objects that aren't moving instead of just leaving them pinned.
B
100
S
38
G
134
Posts: 5,555
Reputation: 85,323

Post » Wed Dec 14, 2016 11:33 am

Answer your own performance questions with measurements

In this case I doubt you will be able to measure any difference, so it's probably just a waste of time.
Scirra Founder
B
414
S
245
G
92
Posts: 25,201
Reputation: 200,343


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 4 guests