Jumping

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
roggie12
Prole
Posts: 13
Joined: Sat May 25, 2013 6:00 pm
Location: The Matrix

Jumping

Post by roggie12 »

How do I make my player jump. I know I need x and y axis but how do I actually make the player go up a certain height and then come back down.
Thanks for your help in advance :awesome:
Last edited by roggie12 on Sat May 25, 2013 8:34 pm, edited 1 time in total.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Jumping

Post by Robin »

There are a million ways to do that, and which ones work best depends on how the rest of your code is structured, and we can give you in the mean time is some vague ideas or examples.

Do you have gravity already? Half of jumping is falling, and it will be easier if your player already can fall of things.

Also, you need to keep track of whether the player is currently jumping, and the time the jump still has left (because jumping usually takes time, otherwise it looked like the player teleported up rather than jumped).
Help us help you: attach a .love.
roggie12
Prole
Posts: 13
Joined: Sat May 25, 2013 6:00 pm
Location: The Matrix

Re: Jumping

Post by roggie12 »

Thank You. I'm new to love2d so im really bad at it.
roggie12
Prole
Posts: 13
Joined: Sat May 25, 2013 6:00 pm
Location: The Matrix

Re: Jumping

Post by roggie12 »

Sorry if anyone is finding this topic annoying. I don't know how to delete posts
User avatar
qaisjp
Party member
Posts: 490
Joined: Tue Sep 04, 2012 10:49 am
Location: United Kingdom
Contact:

Re: Jumping

Post by qaisjp »

Lua is not an acronym.
roggie12
Prole
Posts: 13
Joined: Sat May 25, 2013 6:00 pm
Location: The Matrix

Re: Jumping

Post by roggie12 »

User avatar
qaisjp
Party member
Posts: 490
Joined: Tue Sep 04, 2012 10:49 am
Location: United Kingdom
Contact:

Re: Jumping

Post by qaisjp »

no problem ^_^
Lua is not an acronym.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests