Platform Behavior question

For questions about using Classic.

Post » Wed Dec 16, 2009 4:15 pm

I have only one problem so far with the Platform Behavior and that is the jumping.
What i want to achieve is moving the sprite in an arch while jumping, starting with the start of the jump til landing (while moving horizontally). It seems the platform behavior doesn't work like this but rather moves the sprite in a triangular shape (with a smooth top).
is there a combination of values that do what i want or will i need to make a custom movement?

I also noticed something a bit unnerving which might be a bug. i tried several times jumping in the exact same position and each time reached different heights, though with very small variations. is there a simple way to fix this like setting the Y velocity to 0 when landing?
B
5
S
1
G
3
Posts: 24
Reputation: 1,123

Post » Wed Dec 16, 2009 4:38 pm

[quote="gugugu":2ip2r4yn]It seems the platform behavior doesn't work like this but rather moves the sprite in a triangular shape (with a smooth top).[/quote:2ip2r4yn]
Are you using jump sustain? Does it still do that with no jump sustain?

[quote:2ip2r4yn]I also noticed something a bit unnerving which might be a bug. i tried several times jumping in the exact same position and each time reached different heights, though with very small variations. is there a simple way to fix this like setting the Y velocity to 0 when landing?[/quote:2ip2r4yn]
The platform behavior is framerate independent (lookup TimeDelta on the wiki), which is important to make your game run at the same speed no matter what someone's refresh rate is. This means there are small random variations in the movement, but it shouldn't be significant. How big is your sprite? It should only be noticable with small sprites.

If it's really that important to you (although I feel a game should not be designed so specifically as to have a tiny variation crucial to the gameplay) then you can go framerate-dependent and have a fixed timedelta. That comes with all the pitfalls of framerate-dependent games though, basically for it to be fair you're going to have to turn off V-sync and have a tearing display.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Wed Dec 16, 2009 5:51 pm

[quote="gugugu":3p155saz]i want to achieve is moving the sprite in an arch while jumping, starting with the start of the jump til landing (while moving horizontally). It seems the platform behavior doesn't work like this but rather moves the sprite in a triangular shape (with a smooth top).[/quote:3p155saz]

You should be able to get a more rounded jump by fiddling with the settings.

Here:
http://dl.dropbox.com/u/529356/jumpsettings.cap



You can see that the green box has a much more rounded jump than the red box even though they jump the same height and move at the same speed. And you don't really need to use Jump Sustain to do it, just change the gravity and jump strength settings to your liking.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Wed Dec 16, 2009 9:29 pm

lower gravity and lower jump force will achieve "floatier", rounder jump curves.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests