GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How to have similar move and jump mechanics as Geometry Dash but with controls(im on Windows)

mypingo7mypingo7 Posts: 22Member
edited August 2018 in Working with GS (PC)

I need a solution desperately as there are no good tutorials for windows pc gamesalad. I have a player as a ball (textured and everything) and I got the mechanics to jump and move left and right. However, when my ball lands on the floor surface, it just keeps sliding the one direction it faces, and it's not just jumping its also when I normally move, it never comes to a stop. My second problem is that when my ball is at a running speed (500) and I want to jump, the speed goes to 0 and jumps at the same time so I never get that momentum jump (like in geometry dash). Its as if my character was standing still the whole time and then jumped. Please help no one makes any good tutorials on this and its getting frustrating figuring this out (I'm on Windows PC)

Comments

  • Twayne2Twayne2 Posts: 388Member, PRO

    Could you post your rules please?

  • mypingo7mypingo7 Posts: 22Member
    edited August 2018

    https://imgur.com/a/hOTWs2P
    In the Right and Left sections for DO, I just put in the direction and speed using Acceleration behavior and for the Jump section I used change velocity and set the direction to 90
    the top thing is cut out but its just the accelerate rule
    and yes this is all I have (nothing else I have done except for this pic)

  • bob loblawbob loblaw Posts: 335Member, PRO

    try looking at jamie cross’s videos on youtube. they helped me understand controlled movement logic a little better when i first started playing around with gamesalad.

    they are for mac but the logic should be transferable to the windows platform, as well as if you ever decide to move to real coding.

    https://m.youtube.com/user/jamiecross01

  • mypingo7mypingo7 Posts: 22Member

    everyone keeps showing me his videos but no its not logical at all because you need to create completely different assets compared to windows

  • Twayne2Twayne2 Posts: 388Member, PRO

    Do you mind opening your rules? Do you have any behaviors in the else section of the jump rule?

  • Twayne2Twayne2 Posts: 388Member, PRO

    Wait, you used accelerates in your move rules?

  • mypingo7mypingo7 Posts: 22Member

    i used accelerate in left and right and change velocity in jump to 90

  • bob loblawbob loblaw Posts: 335Member, PRO
    edited August 2018

    accelerate may be your issue.
    use change velocity x to the speed you want. you’ll need rules for if right is pressed (+ velocity value), left is pressed (-), neither are pressed (0), and both are pressed (0).

    if you want that lag before hitting top speed, i think you could also use interpolate with the actor’s velocity.x, instead of the change behaviour.

    hope i have made sense and that’s useful.

  • jamie_cjamie_c ImagineLabs.rocks Posts: 5,541Member

    I know you've already mentioned that my tutorials are for the Macintosh version and that doesn't seem to help you much but just FYI, one of the game lessons in the Gamesalad book I wrote is a Geometry Dash like clone. If you wanted to check it out you can find more details here: (http://www.imaginelabs.rocks/?product=learn-mobile-game-development-in-one-day-using-gamesalad)

    While there are lots of way to accomplish things in Gamesalad, my lesson does use the Accelerate Behavior to move the actor.

  • Twayne2Twayne2 Posts: 388Member, PRO

    Accelerate to the left and right will involve slowing down and speeding up, which may be your problem. (I don't really know.) I just use, almost all the time, change attribute, then change self.linearvelocity.x to, say, 100, and -100.

  • mypingo7mypingo7 Posts: 22Member
    edited August 2018

    I changed the attribute to linear velocity x -500 and 500 for right and left https://imgur.com/a/Rs9d904
    but used change velocity for jump also(should I use linear velocity y?). but if I try to jump and move left or right at the same time, it just jumps and doesn't let me move but if I jump and then move left and right, it works amazingly, just when I move left or right and then jump, it just jumps straight up and doesn't let me move. I need to find a way to jump sideways

  • Twayne2Twayne2 Posts: 388Member, PRO
    edited August 2018

    If the right key is pressed, change self.linearvelocity.x to 200. Else, change self.linearvelocity.x to 0. This says if you are golding down the right key, move to the right at a speed of 200. Otherwise, stay still, (horizontally.) If left key is pressed, set self. linearvelocity.x to -200. Else, change self.linearvelocity.x to 0. If the up key is pressed, change self.linearvelocity.y to 500. Else, nothing. Try this out.

  • mypingo7mypingo7 Posts: 22Member

    ok ill try it out

  • mypingo7mypingo7 Posts: 22Member
    edited August 2018

    ok thanks that worked really well however I still have a problem, when I change jumping from left to jumping right, my character stops again and I can't move until I let go of all keys and start moving again
    any idea as to why
    also if I collide with a wall, it stops me from moving so i also have to let go of all keys and then start moving again

  • Twayne2Twayne2 Posts: 388Member, PRO

    https://ibb.co/kM9Ov9
    https://ibb.co/inXF8U

    I have one question for you, is the wall also the ground? That could be the problem.

  • Twayne2Twayne2 Posts: 388Member, PRO

    I found out that I was wrong. In a rule, not in the elses, put when a key right and left is up, change attribute x to 0. That's it! :smile:

  • mypingo7mypingo7 Posts: 22Member

    Alright thank you, God bless I'm sorry if I was annoying as I am a noob when it comes to this I just started.
    I have one more question but its nothing urgent and I'm fine if you don't know, but when my character hits my wall which has the same properties as my floor, my character stops moving and I have to "unhold" A or D and start moving again

  • mypingo7mypingo7 Posts: 22Member

    never mind I got it I just had to add an extra acceleration rule to it too, so thank you very much you were a big help! Cya

  • Twayne2Twayne2 Posts: 388Member, PRO

    If you don't mind leaving a like that would be great. :)

Sign In or Register to comment.