Player falls trough solid object

Bugs will be moved here once resolved.

Post » Sun Jan 01, 2012 3:20 pm

I have been working on a basic puzzle game where i got to a point that i believe it is a bug.
The player got platformer behavior, a basic doublejump made with velocity and "jumpPower" variable.
The yellow light sprite spawns confetti when player collides.
Heres the problem...
When i try the game in chrome and let the player collide with the light sprite after making a doublejump, it causes the player fall trough the solid object.


http://dl.dropbox.com/u/5214903/GM/water%20challenge.capx
B
43
S
9
G
5
Posts: 231
Reputation: 7,291

Post » Sun Jan 01, 2012 3:55 pm

it seems, that it doesnt happen everytime....
B
42
S
19
G
12
Posts: 723
Reputation: 13,911

Post » Sun Jan 01, 2012 7:08 pm

I believe what is happening is this:

- small objects moving very quickly tend to miss collisions with other small objects since they step over them
- the max fall speed is 1000 pixels per second which means at 30 fps it's stepping (1000/30=) about 33 pixels per tick, which is over twice as big as the object, meaning it risks stepping over the floor. The floor is very narrow as well making it more likely a collision is missed.
- spawning lots of objects is probably pretty CPU intensive, causing dt to increase for that tick, which worsens the problem since the object will step further that tick when it's right by the floor.

So I don't think this is a bug - you should avoid fast moving small objects. Reduce the max fall speed and make your platforms thicker.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests