Page 1 of 1
How to make character jump.
Posted: Mon Nov 30, 2009 3:24 am
by Kevin Tillman
Hi all, im new to Love2D and I was wondering if someone could help me out in making my character "jump"...
Is it best to just code it from scratch or utilize the physics functions to assist me. I have been studying Lua for 2 weeks now..
Im mainly an artist, I want to learn Lua to make my own game in Leadwerks. But I am using Love2D to help me better understand programming since its simple to understand.
www.TillmansArt.com
Re: How to make character jump.
Posted: Mon Nov 30, 2009 7:01 am
by Robin
I have made a small platformer that might serve as "inspiration" for tackling certain problems:
Jump Game. It uses a self-made physics/gravity system, and it has features for jumping, double jumping, little smilies floating around your head and more.
Re: How to make character jump.
Posted: Mon Nov 30, 2009 4:09 pm
by Kevin Tillman
very nice bro, thanks for the file, is there a way to look at the source code for this file you have given me, can I open it up in LuaEdit or something? Im still kinda newbish to Love so bare with me
Re: How to make character jump.
Posted: Mon Nov 30, 2009 4:33 pm
by Robin
No problem, just rename the .love into a .zip, and unzip it.
Re: How to make character jump.
Posted: Tue Dec 01, 2009 2:49 am
by Kevin Tillman
Dude that looks hard, I am actually wrapping my head around using tables and for loops as of now.
I notice you said "self-made" physics and gravity system....can I achieve the same effects using the functions within love2d's physics module? Or do I have to code something similiar to this in order to achieve the same effects?
Thanks for all your help btw bro..
Re: How to make character jump.
Posted: Tue Dec 01, 2009 5:15 pm
by Robin
Kevin Tillman wrote:Dude that looks hard, I am actually wrapping my head around using tables and for loops as of now.
I notice you said "self-made" physics and gravity system....can I achieve the same effects using the functions within love2d's physics module? Or do I have to code something similiar to this in order to achieve the same effects?
The love.physics module (which basically is
Box2D, a popular physics engine) is very advanced, but I'd say rather difficult to use. Writing your own simple physics engine is going to be much easier (especially at this stage). To write a simple physics engine, you need nothing more than high school level knowledge of Math and Physics. I think the biggest obstacle at this time for you will be understanding how code works... you need to form a mental model of how it all fits together, much like you need to have the art you are drawing/composing/etc in your head.
Without such a model, you can do lots of neat stuff with coding, but you won't be able to solve problems. And you need to solve problems to make a game. Lots of them. But I think you are getting there already. Lua is a great way to learn programming, IMHO.
Kevin Tillman wrote:Thanks for all your help btw bro..
Glad to help.
Re: How to make character jump.
Posted: Tue Dec 01, 2009 6:57 pm
by bartbes
Kevin Tillman wrote:Thanks for all your help btw bro..
Ah, you messed it up, never say thanks until AFTER you're done, now he won't have anything to help you for
(obviously a joke, we aren't that bad)