Player (Platform behavior) "lags" , why ?

Discussion and feedback on Construct 2

Post » Mon Apr 24, 2017 7:26 pm

Hi. When I was working on my game I came across an issue and I tried to reproduce it in the example capx below.
I added a few platforms that are pinned to other sprites that are moving.
The issue is that the player, when is standing on them, is moving a few pixel up or down, depending on the platform movement. He is not standing still / fixed on the platform.
@Ashley Is this caused because of c2 engine ?

File:
https://www.dropbox.com/s/pkssvd387de5s ... .capx?dl=0
Last edited by anty21ro on Thu Apr 27, 2017 3:24 pm, edited 1 time in total.
B
39
S
10
G
9
Posts: 213
Reputation: 7,032

Post » Tue Apr 25, 2017 3:16 am

are any of the pins pinned to other things that are pinned? if so, this is a known problem when pinning multiple things.. they wiggle. Has to do with the order of events and which pin is done first (they are not ordered).

the work around is to not use Pin, instead do Every Tick > Set Position etc..
B
100
S
33
G
16
Posts: 1,204
Reputation: 16,865

Post » Tue Apr 25, 2017 3:42 pm

@jobel The platform on the left side that goes up and down is pinned to one sprite, not more than one, and it behaves the same.
Also, I used every tick as you said and it's the same thing, no improvements.

Update:
https://www.dropbox.com/s/pkssvd387de5s ... .capx?dl=0
Last edited by anty21ro on Thu Apr 27, 2017 3:24 pm, edited 1 time in total.
B
39
S
10
G
9
Posts: 213
Reputation: 7,032

Post » Tue Apr 25, 2017 4:08 pm

I can observe the player movement on the rotating platforms on the right.. It's very subtle though, I would not have noticed it if you didn't mention it.

The up and down platforms are fine - no player movement that I can see. Do you see it here as well?

Has something to do with the draw call. Maybe moving the solid and having to calculate the player being stopped and circumventing the gravity system? Otherwise the player would be constantly falling.
B
100
S
33
G
16
Posts: 1,204
Reputation: 16,865

Post » Tue Apr 25, 2017 4:19 pm

It doesn't have to do with Pin, it's something to do with the Solid moving right/left and the Platformer on top of it..

I did a test just with 2 Sines and it still slightly wiggles.. (very subtle though - I added timescale 0.1 to help show it)

https://www.dropbox.com/s/4ykkbgc86llxs ... .capx?dl=0
B
100
S
33
G
16
Posts: 1,204
Reputation: 16,865

Post » Tue Apr 25, 2017 7:13 pm

It work fine for me.
The same as the platform from the left side that is not pinned and it has the sine behavior.
I still think that the problem is with the pinning / positioning (every tick or whatever).
But only where the platform that has the solid behavior applied is pinned (or set position every tick) to the sprite that has the sine/rotate behavior applied.

https://www.dropbox.com/s/pkssvd387de5s ... .capx?dl=0
B
39
S
10
G
9
Posts: 213
Reputation: 7,032


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 6 guests