The Daily Click ::. Forums ::. Klik Coding Help ::. Top Down Jumping
 

Post Reply  Post Oekaki 
 

Posted By Message

Logiq



Registered
  09/04/2007
Points
  120
22nd July, 2008 at 06:45:00 -

So I am making a Top Down Zelda Clone (what's new??) using custom movement. I have my collisions working just fine, but now I wanted to add a jumping ability for the player. does anyone know of a method that would easily accomplish this. All the help will be greatly appreciated.

 
Hello guys! I'm New! -- I've been new for a year now...haha

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
22nd July, 2008 at 06:57:26 -

If you're using a sensor to show his position on the ground, then you can make it so that the sprites always dispositioned from that sensor, and adding to a number that shows how high he's jumping.

So if you have:
Player Position = Sensor Position + Jump Height

And for the most part the jump height is always 0, then he'll always be walking on the ground.
Then when you jump, you can have it subtract from the Jump Height and then add back to it.

Bare minimum idea here, I'm sure once you get it working, you'll find that the basic idea is much more flexible. Using multiple values and such to get more fluid jumping or more control over your sprites.

PS: You can also just as easily add a shadow to always position itself to said sensor, so that when you jump, you go up but the shadow stays on the ground. You can even go as far as to make the sprite get bigger (or smaller based on your style) and less transparent as you jump. All of this adds small detail to the game that no one notices off hand, but once you add a bunch of these small details, you get a rather impressive presentation.

Image Edited by the Author.

 
http://www.facebook.com/truediamondgame

Logiq



Registered
  09/04/2007
Points
  120
22nd July, 2008 at 06:59:54 -

I'll definitely try that one. It sounds simple enough. Thanks again.

 
Hello guys! I'm New! -- I've been new for a year now...haha
   

Post Reply



 



Advertisement

Worth A Click