playMaker

Author Topic: How to create a jump time graph?  (Read 1936 times)

rechronicle

  • Full Member
  • ***
  • Posts: 119
  • Mystvaldia
    • Indie RPG Creator
How to create a jump time graph?
« on: October 20, 2019, 08:14:02 AM »
Hello,
I was stumbling upon this video about Celeste by GMTK. https://www.youtube.com/watch?v=yorTG9at90g

And there are these graphs about jumping time length in the air. Is there any way to make something like a graph that can be edited/changed however we want? And it reflects to the time spent in midair.

I mean, if I'm making the character jump by impulse, it's done there, and nothing I can do to tweak the midair time unless by adjusting its weight at a specific time.

I hope it makes sense.
Thank you!

Broken Stylus

  • Beta Group
  • Hero Member
  • *
  • Posts: 773
Re: How to create a jump time graph?
« Reply #1 on: October 22, 2019, 06:31:12 AM »
You may want Monitor Component, by Peter Bruun.
Also pick zz ruler and Distance tool plugins.

Other than that, aside form drawing lines representing the jump trajectory, you're certainly going to need to tweak values manually until you find what you want.

You can avoid the native physics system and hardcode your jumps by using sample curves in Playmaker. This will let you define the "shape" of a jump with bezier curves.

rechronicle

  • Full Member
  • ***
  • Posts: 119
  • Mystvaldia
    • Indie RPG Creator
Re: How to create a jump time graph?
« Reply #2 on: October 22, 2019, 11:32:03 AM »
Hello,
those are some nice free plugins there. But I'm curious to try to make it with PM alone.

You can avoid the native physics system and hardcode your jumps by using sample curves in Playmaker. This will let you define the "shape" of a jump with bezier curves.

I don't really understand how to use the 'Sample Curve' action, care to explain a bit more?

I will try to experiment as well.
Thanks for the answer!

Broken Stylus

  • Beta Group
  • Hero Member
  • *
  • Posts: 773
Re: How to create a jump time graph?
« Reply #3 on: October 25, 2019, 05:52:30 AM »
Curve based actions use curves to return values based on a given input.
Sample curve lets you input a float value for x, will project it onto the curve, to return a y float.
Other actions will even do this automatically based on time.
Vector 3 returns three values at once, for example.

It's either that or you'll have to maintain the character in the air with a secondary and upward "support" impulse beyond the first one you use to make the character jump.
« Last Edit: October 25, 2019, 09:10:07 AM by Broken Stylus »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to create a jump time graph?
« Reply #4 on: October 29, 2019, 03:11:40 AM »
Hi,

 Sample curve needs to be used with the x axis as time and the y axis as the value over time.

 so for your jump, make a curve that represents the jump over 1 second for example, and then as your player jumps, maintain a timer of the jump, and sample the curve until you reach 1 second, the curve will tell you the height of the player.

 make your sample curve y value normalized as well ( 1 being the max jump height).

 so now you have a sample curve spanning over 1 seconds in duration and 1 unit in height. you can then apply some multiplers for the duration ( say you want your jump to last 3 seconds, you divide your sample time by 3 to get the current height), and ou can also define the maximum height ( say 5 units in height, multiply the current sample value for a given time by 5).

 this way you have a very powerful curve sampling strategy.

Bye,

 Jean