Page 1 of 1

Line drawing capabilities of Love2D

Posted: Sat Aug 16, 2014 9:19 am
by MrBiscuits
Hello,

I'm looking to make a retro vector based game like Asteroids, but with some added graphical effects on the lines and possibly other shapes like glow etc.

Is that possible at all in Love2D?

Also would it handle drawing a load of lines on screen smoothly?

Any help would be greatly appreciated.

Re: Line drawing capabilities of Love2D

Posted: Sat Aug 16, 2014 9:52 am
by veethree
Yes. Glow can be achieved with shades. How many lines you can draw smoothly depends mostly on how you implement it.

Re: Line drawing capabilities of Love2D

Posted: Sat Aug 16, 2014 10:23 am
by MrBiscuits
veethree wrote:Yes. Glow can be achieved with shades. How many lines you can draw smoothly depends mostly on how you implement it.
Ah nice one thanks. Are there any tutorials on shaders and how to implement them knocking about?

Re: Line drawing capabilities of Love2D

Posted: Sat Aug 16, 2014 1:00 pm
by veethree
There's a beginners guide written by a community member. There's also the share a shader thread where you an find tons of examples.

Re: Line drawing capabilities of Love2D

Posted: Sun Aug 17, 2014 2:47 am
by Jasoco
That Shader guide is super helpful. I've been using xXxMoNkEyMaNxXx's "perspective" library shader to do my 3D texturing for a while but had been struggling to understand how it worked so I could try changing things I need. Thanks to that guide I understand a lot better.

Re: Line drawing capabilities of Love2D

Posted: Sun Aug 17, 2014 11:23 pm
by parallax7d
Speaking of drawing lines, how good do Love lines look? Anti aliased? What are the based on, OpenGL?

Re: Line drawing capabilities of Love2D

Posted: Sun Aug 17, 2014 11:35 pm
by slime
'smooth' lines (the default line style) are antialiased, whereas 'rough' lines aren't, unless you have FSAA enabled for the window.

Like everything else in love.graphics they're drawn using OpenGL - they don't use OpenGL's default line rendering though, because it has some nasty issues and isn't very nice-looking.