Tutorial requests and ideas

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
rude
Administrator
Posts: 1051
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Tutorial requests and ideas

Post by rude » Mon Feb 25, 2008 11:25 pm

Yeah ... when we eventually get Chipmunk in da house, that is. I wasn't going to work on LÖVE this semester at all, due to the university killing me, but bah ... Looks like I'm ending up working more on it than ever. ^^

User avatar
mike
Administrator
Posts: 364
Joined: Mon Feb 04, 2008 5:24 pm

Re: Tutorial requests and ideas

Post by mike » Tue Feb 26, 2008 11:37 pm

Made my shitty "pika's ugly adventure" demo into a useless but good for some people tutorial:
http://love.sourceforge.net/?page=tutorial&id=7
I think I may have been a little cryptic (using the word "center" a lot, like: the center of the centermost center) or retarded, so let me know if it's confusing.

Next, I'll be showing you how to create a 3 dimensional grid of isometric cubes. Yes.
Now posting IN STEREO (where available)

Green_Hell
Citizen
Posts: 94
Joined: Thu Feb 21, 2008 1:11 am

Re: Tutorial requests and ideas

Post by Green_Hell » Sat Mar 01, 2008 8:01 pm

I would appreciate Drawing Tutorial.

I can't even draw f***** rectangle.

I tried this example see http://love.sourceforge.net/docs/love_g ... lQuad.html

Code: Select all

love.graphics:fillQuad(100, 100, -50, 50, -50, -50, 50, -50, 50, 50);
and it doesn't work. It's also used in sinescroller demo where it works fine (not with this arguments). The funniest thing is that it works when I replace fillQuad by drawQuad. :(

That's how I understand love.graphics:fillQuad( xpos, ypos, x1, y1, x2, y2, x3, y3, x4, y4 );

Code: Select all

B(x2,y2)       C(x3,y3)
 +------------+
 |            |
 |            |
 +------------+
A(x1,y1)       D(x4,y4)
And why is >>> ; <<< everywhere in documentation after each line?

And why is drawQuad drown by transparent color and so ugly?
Image
>>I love LÖVE.<<

User avatar
rude
Administrator
Posts: 1051
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Tutorial requests and ideas

Post by rude » Sun Mar 02, 2008 1:59 am

Gawd ... you're right. The code in the documentation will not work; the points are specified in clockwise order. That will have to be fixed.

Try this:

Code: Select all

love.graphics:fillQuad(400, 300, -50, -50, -50, 50, 50, 50, 50, -50)
The lines are "ugly", because the line-smooth feature of OpenGL is enabled. I agree that they do look transparent with axis-aligned lines with a width of 1px. Line smoothing is enabled because it looks much better with non-axis-aligned lines.

You could use a different line width:

Code: Select all

love.graphics:drawQuad(600, 300, -50, -50, -50, 50, 50, 50, 50, -50, 2)
Or we could add some way of disabling/enabling smooth lines.

User avatar
mike
Administrator
Posts: 364
Joined: Mon Feb 04, 2008 5:24 pm

Re: Tutorial requests and ideas

Post by mike » Sun Mar 02, 2008 2:01 am

Green_Hell wrote:I would appreciate Drawing Tutorial.
Noted
Green_Hell wrote:I can't even draw f***** rectangle.
I sense certain anger from you...
Green_Hell wrote:I tried this example see http://love.sourceforge.net/docs/love_g ... lQuad.html

Code: Select all

love.graphics:fillQuad(100, 100, -50, 50, -50, -50, 50, -50, 50, 50);
and it doesn't work. It's also used in sinescroller demo where it works fine (not with this arguments). The funniest thing is that it works when I replace fillQuad by drawQuad. :(
Yes, well that would be my bad (as I wrote those shitty doc pages). What needs to be noted is that the coordinates need to be entered in counter-clockwise order as it is a requirement of opengl.. something that I CLEARLY forgot when I wrote that thing (and didn't test it). The real code should be:

Code: Select all

love.graphics:fillQuad(100, 100, -50, 50, 50, 50, 50, -50, -50, -50)
(this has been tested)
Green_Hell wrote:And why is >>> ; <<< everywhere in documentation after each line?
Again, my fault. It took me a while before I realized that Lua doesn't need the ; character after every line. I think that I updated it, but I guess I didn't catch all my mistakes (or it was in a new version).
Green_Hell wrote:And why is drawQuad drown by transparent color and so ugly?
Because any diagonal lines would look like shit (literally) if we don't and we could choose between having all diagonal lines looking like crap or 1px straight lines looking like shit and we chose to go for the most popular choice.

*runs off to fix the documentation*

edit: Damnit, rude.. I was writing a reply when you submitted yours.
Now posting IN STEREO (where available)

User avatar
rude
Administrator
Posts: 1051
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Tutorial requests and ideas

Post by rude » Sun Mar 02, 2008 2:04 am

Hah! 2 minutes. pwntz

User avatar
mike
Administrator
Posts: 364
Joined: Mon Feb 04, 2008 5:24 pm

Re: Tutorial requests and ideas

Post by mike » Sun Mar 02, 2008 2:11 am

I gave a longer answer, so I feel that my efforts are in some way well spent.

PS: You going to fix the documentation, or am I?
Now posting IN STEREO (where available)

User avatar
rude
Administrator
Posts: 1051
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Tutorial requests and ideas

Post by rude » Sun Mar 02, 2008 3:03 am

I'll fix it some time tomorrow. Or you could go berserk if you feel a great need to fix it before then.

Green_Hell
Citizen
Posts: 94
Joined: Thu Feb 21, 2008 1:11 am

Re: Tutorial requests and ideas

Post by Green_Hell » Sun Mar 02, 2008 12:11 pm

Me wrote:I can't even draw f***** rectangle.
It wasn't anger. I was fed up. It's not your fault. I'm fed up with it not with you guys. It's my problem that I don't have time. :roll:
rude wrote:The lines are "ugly", because the line-smooth feature of OpenGL is enabled. I agree that they do look transparent with axis-aligned lines with a width of 1px. Line smoothing is enabled because it looks much better with non-axis-aligned lines.
mike wrote:Because any diagonal lines would look like shit (literally) if we don't and we could choose between having all diagonal lines looking like crap or 1px straight lines looking like shit and we chose to go for the most popular choice.
OK then. I'll use fillQuad instead.
>>I love LÖVE.<<

User avatar
rude
Administrator
Posts: 1051
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Tutorial requests and ideas

Post by rude » Sun Mar 02, 2008 12:17 pm

Until we get this:

Code: Select all

love.graphics:disable(love.smooth_lines)
-- Draw stuff.
love.graphics:enable(love.smooth_lines)

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests