Chipmunk 'speed'

About Monkey 2 Forums Monkey 2 Programming Help Chipmunk 'speed'

This topic contains 3 replies, has 3 voices, and was last updated by  Hezkore 1 year, 5 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #11538

    Hezkore
    Participant

    Is there any way to make Chipmunk do its physics faster without making the outcome different?

    What I’m trying to do is record the button presses a player makes, then play that recording back using proper physics (no positions stored) but at a faster or slower speed.

    I’ve tried playing with space.StepTime a bit.
    With StepTime set to ‘1.0/60.0’ my little cube does a small bounce when it lands
    With StepTime set to ‘1.0/30.0’ things are faster but the cube no longer bounces and instead hits the ground hard, even going through the ground a bit.

    So is there any other way to speed things up in Chipmunk, without making the physics act differently?

    #11543

    Mark Sibly
    Keymaster

    No idea –  perhaps try asking on the chipmunk forums?

    https://chipmunk-physics.net/forum/viewforum.php?f=1

    #11550

    abakobo
    Participant

    Just step several times before rendering.
    For example set steptime to 1/240.0 then step chipmunk 4 times before rendering. Then when you want to slow it down or accelerate it just change the number of step calcalations before render.
    This way it will always act the same way. You’re just modifying the play speed.

    #11564

    Hezkore
    Participant

    Of course abakobo! 🙂

    That worked amazingly well.
    I can easily play back the recording 1000 times faster now with it behaving exactly the same, even down to the correct MS.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.