Page 1 of 1

i'll LOVE it if someone helps....

Posted: Sun Nov 22, 2009 5:32 am
by abhilash2863
i've just downloaded LOVE engine i must say i'm LOVing it(sorry... can't resist using this word:) although i was able to make the first game that was given in the getting started section in wiki but there no further guidance on wat to do next....mostly examples are there but is there some sort of tutorial for beginners.....can some one suggest sites where there are tutorials for love...

Re: i'll LOVE it if someone helps....

Posted: Sun Nov 22, 2009 10:38 am
by Robin
Maybe you've seen it already, but the Wiki does include quite a lot of tutorials. (For a nice collection, see: http://love2d.org/wiki/index.php?title=Tutorials)

Otherwise, just try things, keep the documentation at hand, and if you don't know what to do, ask the community, either on the forum or on IRC, about one specific problem you have at a time.

Re: i'll LOVE it if someone helps....

Posted: Sun Nov 22, 2009 12:32 pm
by abhilash2863
thanx for it.....i'll give it a more careful reading.....since i'm new to LOVE and lua it will take some more time for me to get hang of it becoz originally i'm a ActionScript programmer, by the way you said you can help.... i was trying to draw shape in love but i couldn't, since there was no example code for it in the docs(i was successful in loading a image :ultrahappy: )

one last thing............... i'll "OBEY" rude and change my avatar :megagrin: as soon as possible

Re: i'll LOVE it if someone helps....

Posted: Sun Nov 22, 2009 2:54 pm
by napco
Well, in 0.5.0 you can look in the "graphics" section of the documentation to draw a shape. An example is:

Code: Select all

function draw()
    love.graphics.setColor(255, 255, 255)
    love.graphics.rectangle(love.draw_fill, x, y, width, height)
end
You can change love.draw_fill with love.draw_line to draw only the borders. In 0.6.0 (it's a beta version of the next LOVE release) love.draw_fill and line have been replaced qith string constants, i think, and the draw callback is now called love.draw.

Re: i'll LOVE it if someone helps....

Posted: Sun Nov 22, 2009 3:17 pm
by Robin
napco wrote:In 0.6.0 (it's a beta version of the next LOVE release) love.draw_fill and line have been replaced qith string constants, i think, and the draw callback is now called love.draw.
Yes, in 0.6.0 the equivalent code will be:

Code: Select all

function love.draw()
    love.graphics.setColor(255, 255, 255)
    love.graphics.rectangle("fill", x, y, width, height)
end
Or even better:

Code: Select all

function love.draw()
    love.graphics.rectangle("fill", x, y, width, height)
end
Since in both 0.5.0 and 0.6.0 white is already the default, this is better performance-wise. ;)