Strange behaviour of the platform... behaviour!

Discussion and feedback on Construct 2

Post » Wed May 23, 2012 11:50 am

Hi everyone! =)
I recently made a micrometroidvania for MiniLD #34 (you can find it here: http://www.ludumdare.com/compo/minild-34/?action=preview&uid=12918 ) and everything went quite smoothly, apart from a strange glitch I only noticed yesterday.
To put it brief, the main sprite sometimes gets stuck midair on the side of a platform. It can still be moved away without any problem, but this thing is really strange. It's something like this:

            ----
----------| |
            | |
            | |
----------| |
            ----

where the big rectangle on the left is the platform and the smaller one on the right is the player.
Now, the platforms are 24x24 blocks with the Solid behaviour. The player is made out of two parts: an invisible 24x48 block with the Platform behaviour and the collision mask slightly shaved off on the upper part, and a player sprite with no behaviours at all that gets moved to the invisible rectangle's position on every tick.
Anybody's got an idea about this strange behaviour? I'd like to avoid it in the future, since I'd like to write a proper and bigger metroidvania with Construct 2. =)Shrapnel2012-05-23 11:51:30
B
65
S
17
G
8
Posts: 23
Reputation: 7,171

Post » Wed May 23, 2012 12:40 pm

This is probably caused by ever-so-slightly sloped collision masks. If you have rotated objects or non-bounding-box collision masks, a very slightly off-vertical line can count as a very steep slope, and in some circumstances the platform behavior can land on very steep slopes. So I'd double check your collision masks, and if that doesn't help, post a .capx example showing what's going on.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Wed May 23, 2012 7:37 pm

Yeah, Ashley is right. I had a similar problem and couldn't figure out what was up. The problem was my collision polygon, it was slightly slanted, and this caused some rather embarrassing issues.
B
47
S
10
G
6
Posts: 455
Reputation: 8,326

Post » Thu May 24, 2012 12:17 pm

We discussed this issue a while ago and came up with a few alternatives to fix it.

Hope this helps you out!

B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Sat May 26, 2012 11:49 am

[QUOTE=Ashley] This is probably caused by ever-so-slightly sloped collision masks. If you have rotated objects or non-bounding-box collision masks, a very slightly off-vertical line can count as a very steep slope, and in some circumstances the platform behavior can land on very steep slopes. So I'd double check your collision masks, and if that doesn't help, post a .capx example showing what's going on.[/QUOTE]

I checked the collision mask and it's actually vertically skewed by one pixel on the right side, but I don't think that's the origin of my problem since the sprite gets stuck on platforms on the left side as well. =|
B
65
S
17
G
8
Posts: 23
Reputation: 7,171

Post » Sat May 26, 2012 11:50 am

[QUOTE=sqiddster] We discussed this issue a while ago and came up with a few alternatives to fix it.

Hope this helps you out![/QUOTE]

Thanks for pointing that out!
It doesn't exactly apply to my problem, but it's very instructive nonetheless. And quite scary, since I really hoped the Platform behaviour was going to work flawlessly out of the box. =P
B
65
S
17
G
8
Posts: 23
Reputation: 7,171

Post » Sat May 26, 2012 12:06 pm

Well, technically, it is working flawlessly. It just so happens that many people's situations don't require being able to hold onto steep slopes! If you think about this, any way Ashley could have implemented sliding down slopes would be unsatisfactory to some people, so it was a good move to avoid this extremely complex situation (even more so because the platformer has to put up with rotated gravity!)
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Sat May 26, 2012 2:15 pm

[QUOTE=sqiddster] [...] It just so happens that many people's situations don't require being able to hold onto steep slopes! If you think about this, any way Ashley could have implemented sliding down slopes would be unsatisfactory to some people [...] [/QUOTE]

That's right, I know. It's just that seeing my player get stuck on normal, square platforms is kinda strange. =P
B
65
S
17
G
8
Posts: 23
Reputation: 7,171

Post » Wed Nov 23, 2016 5:36 pm

the link to the discussed topic is broken :(
I just wanna make the player fall/slide off the rotating platform instead of just awkwardly staying in the same spot while the platform rotates underneath.
B
8
S
1
Posts: 6
Reputation: 414

Post » Thu Nov 24, 2016 10:09 am

lastsliceofpie wrote:the link to the discussed topic is broken :(
I just wanna make the player fall/slide off the rotating platform instead of just awkwardly staying in the same spot while the platform rotates underneath.


@lastsliceofpie

This thread is 4 years old in a the C2 General Discussion section. Not really appropriate for your post.

It looks like you require specific help, so it would be best if you created a new topic in the 'How Do I' section with as much detail as you can, preferably with an exported .capx for us to look at.

Thanks
If your vision so exceeds your ability, then look to something closer.
Moderator
B
120
S
28
G
68
Posts: 4,840
Reputation: 48,281

Next

Return to Construct 2 General

Who is online

Users browsing this forum: NetOne, saiyadjin and 2 guests