One way platform collision?

About Monkey 2 Forums Monkey 2 Programming Help One way platform collision?

This topic contains 7 replies, has 6 voices, and was last updated by  therevills 1 year, 2 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #13194

    Amon
    Participant

    Can anyone offer some code? I just can’t get it right.

    Basically a one-way jump from beneath the platform on to it. I’m still hacking away at a method. Code below. I’m using tiles 64×64 pixels that I place using an array.

    #13202

    DruggedBunny
    Participant

    Don’t know if any good, but the Monkey1 code at the very bottom of this page seems to work…

    I didn’t understand Nate’s comment about ceilings here (different thread — second post from bottom), but the gist of his method sounds good.

    #13207

    Pakz
    Participant

    I am watching soccer atm so no time to prepare some code. But the way I always look at things like this is by thinking in states.

    When the playing is in his jump and going up I set a new variable called jumpingup=true. Another variable like jumpingdown=true if he is falling down. With variables like this I can see when to check for or not check for collision. (if jumpingup=true and myuptilecollision() then …)

    I will try to remember to look after the match and make some code.

    #13213

    Pakz
    Participant

    I hope this can help a bit. It is not a short piece of code but I did try to add comment.

     

    #13215

    Amon
    Participant

    Thank you. That’s very good of you. 🙂

    #13224

    nerobot
    Participant

    I saw link to example of one side platform on Chipmunk homepage…

    #13230

    cocon
    Participant

    Thanks Pakz for posting it, this will worth the study.

     

    Nerobot, perhaps for full physics capabilities the chipmunk will be better. 🙂 Or perhaps a combination of custom arcade physics and real physics, would produce very interesting results. There is something weird in arcade physics that are very useful and efficient. I had tried many tests in Processing Box2D with hacks and tuning to achieve that arcade feeling, and not even close enough to the result needed.

     

    Also I have seen earlier that Diddy2 framework has a platform example in the works, check it out or ask TheRevils for more information.

    #13245

    therevills
    Participant

    Basically dont check for any collisions when moving upwards should do it…

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

You must be logged in to reply to this topic.