"Sticky" platformer

Discussion and feedback on Construct 2

Post » Thu Feb 16, 2012 6:04 pm

[QUOTE=Ashley] This could be a very complicated feature to add to the platform behavior itself - it's already one of the most complex behaviors, and it currently does not care what it is standing on. For example, you could also stand on a single pixel, so by the same rule you can land on a very steep slope. I'll see if it's straightforward to fix the Platform behavior to drop down in this case, but it might not be, so it would be best to work around this with events or careful level design for the time being.[/QUOTE]

I'm trying to learn fast to use C2 to develop a nice platform tutorial.

So, my workaround for this issue will be something like this:

I'll setup three slave detectors for my player gadget, as I did in the SandBOX (to detect edges and climb them, try it and look how awesome ^^ ).

If the bottom detector is overlapping the ground families, and the top isn't, and the middle detector is overlapping too, so, the player is on a climb, if the bottom is overlapping the ground and every other aren't, so, the player is on ground, if the top detector, the middle, and the bottom are detecting, he is on a wall.

But, this will bug the climbing logic, so, I'll make conditionals using "UP" and "RIGHT/LEFT" to keep him climbing, if not, he will be pushed out the wall or slip down.

So, Ashley, I don't know how you're doing the logic for behaviors, but if you're checking the collision box to make the "triggers" for example, you may can try check how much % of the sprite area is overlapping the wall instead of checking if the collision box is touching a bottom pixel.
ImageImageImageImageImageImage
B
93
S
20
G
12
Posts: 1,212
Reputation: 18,482

Post » Thu Feb 16, 2012 9:12 pm

@TELLES0808

I managed to implement a system that works fairly well, and you can pretty much choose the steepness threshold.

You only need two objects, the left foot and the right foot. They stick into the ground below the player, jutting out any amount you want.
Therefore, if only ONE is overlapping the ground, you know you are on a steep slope, as one will be hanging in midair.

This is the easiest and simplest way I could think of achieving this, and it worked well.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Thu Feb 16, 2012 9:24 pm

but if you walk near edges, to jump far (sometimes a precise jump, like in jumping games), you'll not step back?

I thought about it before, but this was my main issue when using two feets. When the player come near of an edge to jump far, or climbed up a wall, he felt back because of this solution.

Maybe a mix, checking the two feet and the middle right/left, can workaround it =]

Edited: Pewwwwwwww.

My brain is burning =\

At least I finished it and I hope it's working flawless =|

take a look one the SandBOX.TELLES08082012-02-16 23:23:13
ImageImageImageImageImageImage
B
93
S
20
G
12
Posts: 1,212
Reputation: 18,482

Post » Tue Mar 11, 2014 9:15 pm

@sqiddster
I'm sorry i know this is very old post.
But can you please share simple Capx showing how to solve this problem.

I'm stuck on my game because of this issue.

Thank's alot
B
7
S
1
Posts: 65
Reputation: 586

Post » Tue Mar 11, 2014 9:30 pm

To be honest I still haven't solved it very effectively. My old solution didn't work that well.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Tue Mar 11, 2014 10:08 pm

I've got the same problem as squiddster. Sometimes (its very rare, though) the sticky behavior can be observed on perfectly flat wall... I hope Ashley will find solution, I'm not feeling well knowing it might end in describing all conditions via event sheet, just seems too complicated...
B
27
S
8
G
4
Posts: 116
Reputation: 3,651

Post » Tue Mar 11, 2014 10:09 pm

The problem also exists when jumping into platforms angled towards you - anything more than 90 degrees counts as a roof.

I'd definitely like to see a concrete solution to this ;)
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: Colludium and 13 guests