What is the best Platformer Template?

ozboybrianozboybrian PRO Posts: 2,102
edited December 2011 in Working with GS (Mac)
I would like to play around with a plat former game.

I already have a Market, at least 100 people I don't even know would buy it, so it's bound to make some cash!

Thanks all.

Comments

  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    Dude... Do it from scratch, I'm banning you from templates (although I hear Darren's it pretty good :P)

    Ace
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    Ya from scratch is cool, tailored to your needs, i have Darren's and its good, have taken a couple of bits from it but always best to think of your idea and build your own around it.
  • ozboybrianozboybrian PRO Posts: 2,102
    lol Ace :P

    Yeah from Scratch is the idea :D but I just like Templates for learning purposes to : )
  • ozboybrianozboybrian PRO Posts: 2,102
    Should I use Gravity in Platformers or nah?
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    Nope, use accelerate on the characters you need gravity.

    Ace
  • ozboybrianozboybrian PRO Posts: 2,102
    I hate you :P
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    edited December 2011
    I won't help you then :P

    I made a quick demo for a dude who wanted to know about double jumping an hour or so ago, here's the link (it uses accelerate as gravity):

    http://mynameisace.com/files/GSDoubleJump.zip

    Ace
  • ozboybrianozboybrian PRO Posts: 2,102
    Thanks man! I've got the left/right movement, animation and gravity working well.

    But having a little trouble with jumping so i'll check it out : )
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    If you only want him to just once do this:

    If game.Jump (or whatever you are doing to trigger the jump) is true
    AND
    self.linear velocity.y = 0

    Change attribute self.linear velocity.y to 700 (change this number to taste).

    He will only jump when he is touching the floor now, not do loads of mid-air jumps.

    Ace
  • ozboybrianozboybrian PRO Posts: 2,102
    edited December 2011
    Issues:

    When using Self linear Velocity to move left/right... It comes to a stop, like holding the key doesn't keep it going.
    So I use move instead but then when I jump forward it gets stuck moving forward mid air.

    :S

    Edit: just saw what you said. That will help! Single jumps are good to.
  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    edited December 2011
    Try using a rule that says when Linear Velocity on the actor is less that what you want…Constrain Attribute (so you don't have to keep checking with a timer) to the speed you do want. That's what I did in my Slay Bells game to keep the main actor moving forward no matter what.
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    Don't use move... For anything... Ever. Lol.

    Yeah, you can do it that way, or just when right key is down constrain attribute instead of when it gets lower than a certain amount, it depends how you want your game to feel as to which method you would use.

    Ace
  • ozboybrianozboybrian PRO Posts: 2,102
    lol But I don't want it to keep moving. Just stop and go when pressed. Which it's doing pretty well.

    But Jumping forwards is a pain.
  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    edited December 2011
    Then use constrain attribute on the linear velocity when button is pressed instead of move or accelerate. My game, the character was always moving forward with a constrain attribute for linear velocity, no matter what you did, but ran into obstacles when he would hit a ramp. He would keep moving, but even with constrain, the speed was slower after he hit the ramp, so I used a rule to check for linear velocity constantly, and used another behavior to constrain the speed, just in case. Worked out perfectly.
Sign In or Register to comment.