Platform behavior non fps independant?

Discussion and feedback on Construct 2

Post » Mon Jan 27, 2014 1:11 pm

Hello all,

I'm doing another thread about that subject because I think it's quite important.(more visible here than in the bug section)

I have issues on my game depending on the FPS. I use the platform behavior that comes with C2 and, depending on the fps, the jump height changes.
I've made a little test here using the platform canvas. Try to jump on the walls on the sides. You can't, unless the fps gets under 20.
So if a computer gets a low fps at a moment, the player can reach an unreachable location = HUGE GAME ISSUE.


TEST CAPX


I'm not the only one to have that problem :

http://www.scirra.com/forum/frame-rate-affecting-player-jump-arc_topic62067.html

So, if I'm not wrong and that problem really exists, the platform behavior should not be used for a "exploration game" like a metroidvania.


(sorry if my english is rough)
B
72
S
21
G
12
Posts: 314
Reputation: 12,111

Post » Mon Jan 27, 2014 1:22 pm

Oh) I reached to that walls.

When I test my small project on mobile as HTML5 - I noticed that character can fall through platform when landed ( fps was near 10 )
B
57
S
19
G
10
Posts: 191
Reputation: 9,626

Post » Mon Jan 27, 2014 3:22 pm

Hmm, yeah this is actually a significant issue.

+1 to having a way to resolve this.
B
57
S
15
G
11
Posts: 912
Reputation: 12,606

Post » Mon Jan 27, 2014 3:38 pm

I have also noticed this with the jump thru behavior. On lower frame rates (slow machines) the player (witch has the platform behavior) falls thru the object that has the jump thru behavior.
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379

Post » Mon Jan 27, 2014 3:53 pm

It's a known issue and there's no clear solution short of disabling framerate independence, which brings its own issues. The best solution is not to make jumps which can only be achieved by a very close margin - give it a short extra distance so even small variations in the jump height don't affect whether the jump can be made or not.
Scirra Founder
B
397
S
236
G
88
Posts: 24,423
Reputation: 194,560

Post » Mon Jan 27, 2014 4:21 pm

Damn :/
B
72
S
21
G
12
Posts: 314
Reputation: 12,111

Post » Mon Jan 27, 2014 4:58 pm

Yeah, low framerates can cause glitches in all kinds of games.

How about you check for the Y-difference from the beginning of the jump and compare it to a maximum jump height value? If it goes above you set the Y vector to 0.
B
23
S
6
G
10
Posts: 1,041
Reputation: 7,553

Post » Mon Jan 27, 2014 6:48 pm

@PixelRebirth Well sadly it's not a solution.
In the example I show here, when the fps is low, the jump height is higher.
But on my game (CoinOp Story), when I try it on my laptop and have a low fps, the jump height is lower. (and my hero use the platform behavior)
So the fps has an influence on the behavior but a random one depending on the game and perhaps the computer I guess.
B
72
S
21
G
12
Posts: 314
Reputation: 12,111

Post » Mon Jan 27, 2014 7:06 pm

That's a game breaker for most platformers...

Just a thought could you not place an invisible barrier to stop the jump short, that is only destroyed when player has required upgrade?...
As long as I can move left, right and fire, I'm Happy...
B
42
S
15
G
11
Posts: 655
Reputation: 12,260

Post » Mon Jan 27, 2014 7:41 pm

I made a quick example using DT to reduce the jump.

It breaks at around 10 FPS.

http://johnnysix.net/games/scirra/jumpdelta.capx

Just created a variable for "initial jump" , and had the platform behaviour updated each tick :

initialJump*( ( 60 - ( dt * 60 ) ) /60 )

[ Edit- if I was better at maths I would have written something simpler.
60 is just arbitrary, I just picked it 'cos it's a nice number!]

JohnnySix2014-01-27 19:46:39
Image
B
27
S
9
G
5
Posts: 488
Reputation: 11,948

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 7 guests