Odd behaviour - Player can run over gaps.

Discussion and feedback on Construct 2

Post » Mon Dec 31, 2012 9:37 pm

Hi all

I found an odd behaviour today that I was able to recreate in the sample platformer in C2.

Basically what happens is that, given a small enough gap, a player running over the gap without jumping hits the opposite edge and travels downwards - but then pops back up and continues on the floor.

Sample Capx
To see this in action, just run right. The player should bounce back up and continue on, despite the bottom edge of the box actually catching. One quick fix is to crank the gravity up for the player, but that also affects his jump arcs.

Has anyone ever noticed this before? Is this an issue with Construct or something more fundamental to programming?
B
24
S
4
G
1
Posts: 244
Reputation: 3,462

Post » Tue Jan 01, 2013 12:21 am

Construct's platform behavior has always had a weird way of rounding off corners. I've tried forcing the player down a few pixels when running over gaps (using collision offsets) but nothing has worked very well and if it does it looks bad.Tokinsom2013-01-01 00:22:16
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Tue Jan 01, 2013 12:39 pm

It's not that surprising. The gap is very small because the player doesn't fall until they're completely off the platform. This is when the player starts to fall (when moving slowly, moving faster it would go even further off the edge before it starts to fall):

So the gap to cross is less than 32 pixels.

Depending on the movement speed and value of gravity, you can make it across the gap before you fall down.
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,000

Post » Tue Jan 01, 2013 6:57 pm

Interesting, I hadn't thought of that.

Based on this, I wondered if this a problem with any platformer. I loaded up some flash platformers and was able to replicate this problem. I also wondered perhaps this could be replicated in old Nintendo games? Especially games with quite floaty characters like Super Metroid.

I went and watched some videos of a few SNES games and it's funny how rare they have two platforms of the same height next to each other. They always seem to be 32 pixels up or down. Sneaky

I came to the same conclusion you did by setting the gravity higher, but I found it also changes the jump arc quite a bit. I'll play with the settings a bit more and see how it goes but I think I'll also update my level design a bit to try and avoid small gaps like this.

Thanks for the responses. Discovering little design issues like this, even in old games, I always find fascinating.
B
24
S
4
G
1
Posts: 244
Reputation: 3,462


Return to Construct 2 General

Who is online

Users browsing this forum: bilgekaan, digitalsoapbox, shinichild, TRMG and 10 guests