Page 4 of 8
Re: Tutorial requests and ideas
Posted: Mon Feb 25, 2008 11:25 pm
by rude
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.
Re: Tutorial requests and ideas
Posted: Tue Feb 26, 2008 11:37 pm
by mike
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.
Re: Tutorial requests and ideas
Posted: Sat Mar 01, 2008 8:01 pm
by Green_Hell
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.htmlCode: 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?
Re: Tutorial requests and ideas
Posted: Sun Mar 02, 2008 1:59 am
by rude
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.
Re: Tutorial requests and ideas
Posted: Sun Mar 02, 2008 2:01 am
by mike
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.htmlCode: 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.
Re: Tutorial requests and ideas
Posted: Sun Mar 02, 2008 2:04 am
by rude
Hah! 2 minutes. pwntz
Re: Tutorial requests and ideas
Posted: Sun Mar 02, 2008 2:11 am
by mike
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?
Re: Tutorial requests and ideas
Posted: Sun Mar 02, 2008 3:03 am
by rude
I'll fix it some time tomorrow. Or you could go berserk if you feel a great need to fix it before then.
Re: Tutorial requests and ideas
Posted: Sun Mar 02, 2008 12:11 pm
by Green_Hell
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.
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.
Re: Tutorial requests and ideas
Posted: Sun Mar 02, 2008 12:17 pm
by rude
Until we get this:
Code: Select all
love.graphics:disable(love.smooth_lines)
-- Draw stuff.
love.graphics:enable(love.smooth_lines)