How to make character jump.

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
Kevin Tillman
Prole
Posts: 14
Joined: Sun Nov 22, 2009 12:42 am

How to make character jump.

Post 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
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: How to make character jump.

Post 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.
Help us help you: attach a .love.
Kevin Tillman
Prole
Posts: 14
Joined: Sun Nov 22, 2009 12:42 am

Re: How to make character jump.

Post 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 :ultrahappy:
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: How to make character jump.

Post by Robin »

No problem, just rename the .love into a .zip, and unzip it. :)
Help us help you: attach a .love.
Kevin Tillman
Prole
Posts: 14
Joined: Sun Nov 22, 2009 12:42 am

Re: How to make character jump.

Post 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..
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: How to make character jump.

Post 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. ;)
Help us help you: attach a .love.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: How to make character jump.

Post 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 :P (obviously a joke, we aren't that bad)
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests