NEW and where to start?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
User avatar
BluBillz
Prole
Posts: 46
Joined: Tue Oct 29, 2013 6:02 pm

NEW and where to start?

Post by BluBillz »

Hello I am BluBillz and new to the forums. I have known about love2d for more then two months now and always experimented with it but never completely understood it. My question is...

whats the best way to learn love2d?

and my other question is...

do i HAVE to know full lua before learning love2d?

please some help would be nice on where to get started! I am trying to really get into love2d as I think its a great choice for me to start on my game dev adventure.
User avatar
veethree
Inner party member
Posts: 877
Joined: Sat Dec 10, 2011 7:18 pm

Re: NEW and where to start?

Post by veethree »

There isn't really a best way to learn. I personally learned lua and löve through various methods. There's some tutorials on the wiki. If you're not into reading there's some video tutorials on youtube too. You can also read other peoples code once you have a basic understanding of lua and/or programming in general.

I don't think you need to know full lua before learning löve. I personally hadn't written a single line of code in lua before i dove into löve. But you'll probably want to learn some basic syntax and such before you start worrying about game programming logic and such.

Hope that helps. And welcome to the forums!

EDIT: There's also the community blogs. There hasn't been much activity there for a while now, But the posts that are there can be quite informative.
User avatar
BluBillz
Prole
Posts: 46
Joined: Tue Oct 29, 2013 6:02 pm

Re: NEW and where to start?

Post by BluBillz »

@veethree

This is helpful a bit but I have seen both wiki and Sockmunkee tutorials already. I didnt get how it was helpful honestly. for the wiki tutorial category I couldnt really find anything helpful or useful for me to understand. For Sockmunkee video tutorials, ya it was helpful somewhat but i didnt find it to help me enough to even try writing code myself in love2d. That is one of the problems I am facing here is trying to find a way or some tutorial out there that demonstrates ways for me to fully understand or atleast get a good start on love2d. Am I looking at the wrong direction here? Is there something I am missing? Is there a better way to learn love2d or lua in general for me to understand it? these are the questions I am stuck at
User avatar
veethree
Inner party member
Posts: 877
Joined: Sat Dec 10, 2011 7:18 pm

Re: NEW and where to start?

Post by veethree »

BluBillz wrote:@veethree

This is helpful a bit but I have seen both wiki and Sockmunkee tutorials already. I didnt get how it was helpful honestly. for the wiki tutorial category I couldnt really find anything helpful or useful for me to understand. For Sockmunkee video tutorials, ya it was helpful somewhat but i didnt find it to help me enough to even try writing code myself in love2d. That is one of the problems I am facing here is trying to find a way or some tutorial out there that demonstrates ways for me to fully understand or atleast get a good start on love2d. Am I looking at the wrong direction here? Is there something I am missing? Is there a better way to learn love2d or lua in general for me to understand it? these are the questions I am stuck at
If you don't have any experience with programming at all, Perhaps you should look into the basics of lua first. Perhaps a good place to do that would be here. I'm pretty sure that book can answer any lua related questions you could have.
User avatar
BluBillz
Prole
Posts: 46
Joined: Tue Oct 29, 2013 6:02 pm

Re: NEW and where to start?

Post by BluBillz »

@veethree

I know some lua as I create gamemodes for gmod13 which is done in lua with a different framework. But I am asking strictly for love2d..where to start? where to get good tutorials?
User avatar
veethree
Inner party member
Posts: 877
Joined: Sat Dec 10, 2011 7:18 pm

Re: NEW and where to start?

Post by veethree »

BluBillz wrote:@veethree

I know some lua as I create gamemodes for gmod13 which is done in lua with a different framework. But I am asking strictly for love2d..where to start? where to get good tutorials?
Well the tutorials i've linked you to are generally considered good.

What exactly is it that you don't understand? The tutorials on the wiki should be plenty to get you started.
Wojak
Party member
Posts: 134
Joined: Tue Jan 24, 2012 7:15 pm

Re: NEW and where to start?

Post by Wojak »

My question to You is: How did You leaned gmod?

I can tell You how I started with LÖVE, maybe it will help:
My lua background comes from creating resources in MTA:SA, I've already read PIL before downloading LÖVE (of course I did'nt memorized the book, but I know more or less what each chapter is about, and I often return to it)

Before writing a single line of code for LÖVE I read:
getting started: https://www.love2d.org/wiki/Getting_Started
Callback Functions: https://www.love2d.org/wiki/Tutorial:Callback_Functions
Tutorials: https://www.love2d.org/wiki/Category:Tutorials
Than i started to browsing the API to see more or less what can I do: https://www.love2d.org/wiki/love

After that I started playing around with the Gridlocked Player tutorial which resulted in this: viewtopic.php?f=5&t=7637

There is one important thing which makes LÖVE different from a mod to any game - LÖVE is a framework, so if you start a new project you start with no 'environment' and You need to make one. For example the Player – there are no player related functions in the standard LÖVE API, so how do you create a Player? You make a lua table:

Code: Select all

local player = {
x=200, --the x coordinate in the 'environment'
y=200, --the y coordinate in the 'environment'
speed = 200, --pixels per second 
}
To display the Player on the screen you need love.draw() callback:

Code: Select all

love.draw()
	love.graphics.circle( "fill", player.x, player.y, 50, 100 ) 
end
to make the player move you need love.update() callback and some functions from the love.keyboard API:

Code: Select all

love.update(dt)
	if love.keyboard.isDown("up") then
		player.y=player.y-player.speed*dt
	elseif love.keyboard.isDown("down") then
		player.y=player.y+player.speed*dt
	elseif love.keyboard.isDown("left") then
		player.y=player.x-player.speed*dt
	elseif love.keyboard.isDown("right") then
		player.y=player.x+player.speed*dt
	end
end
than You need to add the other parts of the environment and script the collisions, there are some third party libraries that may help you wit this: https://www.love2d.org/wiki/Category:Libraries
User avatar
shatterblast
Party member
Posts: 136
Joined: Tue Dec 11, 2012 9:47 pm
Location: Dallas, Texas, USA

Re: NEW and where to start?

Post by shatterblast »

BluBillz wrote:whats the best way to learn love2d?
I'm not a full-time developer, but I found the following link to be very useful as a quick reference since I'm experienced with coding.

http://nova-fusion.com/2012/08/27/lua-f ... rs-part-1/
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests