Author Topic: how do you code jumping?  (Read 4768 times)

0 Members and 1 Guest are viewing this topic.

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
how do you code jumping?
« on: November 06, 2011, 08:00:12 pm »
In a project I'm writing, I need to have my sprite appear to be jumping. I'd like it to be using getkey(4),UP, but I'm not sure how I can code that so It looks clean. Also I'd like to be able to jump forward, as well as backwards. Any suggestions on how this could be accomplished?
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: how do you code jumping?
« Reply #1 on: November 06, 2011, 08:02:21 pm »
By "clean," I think you mean with gravity, as in acceleration, right? There are some tutorials on that around here...

Jumping forward and backwards is easy -- you don't have to worry about it at all, since it's basically just pressing the arrow keys at the same time you're pressing the jump button, and arrow keys should already be taken care of as moving left and right anyway.




Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: how do you code jumping?
« Reply #2 on: November 06, 2011, 08:03:28 pm »
Can you direct me to a proper tutorial?
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: how do you code jumping?
« Reply #3 on: November 06, 2011, 08:04:32 pm »




Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: how do you code jumping?
« Reply #4 on: November 06, 2011, 08:10:21 pm »
Thanks!


but how do I code that in axe?
« Last Edit: November 07, 2011, 03:11:01 pm by saintrunner »
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: how do you code jumping?
« Reply #5 on: November 13, 2011, 11:04:16 pm »
still need help? I can help you if you do.
Completed Projects:
   >> Spacky Emprise   >> Spacky 2 - Beta   >> Fantastic Sam
   >> An Exercise In Futility   >> GeoCore

My Current Projects:

Projects in Development:
In Medias Res - Contest Entry

Talk to me if you need help with Axe coding.


Spoiler For Bragging Rights:
Not much yet, hopefully this section will grow soon with time (and more contests)



Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: how do you code jumping?
« Reply #6 on: November 13, 2011, 11:06:39 pm »
I will maybe once I begin making a game with jumping :P
Unless I get lazy and do linear gravity :P
« Last Edit: November 13, 2011, 11:07:33 pm by epic7 »