Page 1 of 1
Love2D Gradients
Posted: Fri Oct 18, 2013 10:14 pm
by DumpOnIt
Hey everyone! I want remake a game I worked on (and got bored of) over a year ago. It was made in Flash and was an adventure game that made heavy use of gradients. Here is what the original Flash version looked like:
That's is a lot of gradient action! Are there any ways to make gradients work quickly like this in love?
Edit: Changed the video to a more recent one.
Re: Love2D Gradients
Posted: Sun Oct 20, 2013 1:30 am
by Azhukar
Re: Love2D Gradients
Posted: Sun Oct 20, 2013 3:27 am
by Helvecta
On a somewhat related note, that video had me
rolling balls, dude
Re: Love2D Gradients
Posted: Sun Oct 20, 2013 9:17 am
by DumpOnIt
I don't know anything about shaders. I don't understand them to the point where they seem like magic! I'll look into that stuff, though. I just need a simple example to build off of, like a red square! The documentation at
http://www.opengl.org/sdk/docs/manglsl/ is a little bit crazy!
There is also a sweet snippet at
http://love2d.org/wiki/Gradients, but I'm still writing the animation part of the gradient maker, so I'm not sure if it will be fast enough yet.
Helvecta wrote:On a somewhat related note, that video had me
rolling balls, dude
Haha, that's rockin'! I switched the video now. (I accidentally put the old first development video)
Re: Love2D Gradients
Posted: Mon Oct 21, 2013 9:01 am
by Automatik
Yeah, the wiki method is way better than shaders here: It's faster and more reliable.
And to do a circular gradient, you can generate an image that look like a "ball" with imagedata:mapPixel(), then draw it where you want.
Re: Love2D Gradients
Posted: Mon Oct 21, 2013 10:32 am
by Azhukar
Automatik wrote:Yeah, the wiki method is way better than shaders here: It's faster
Not for what he wants to do. In his game he used changing gradients.
Automatik wrote:and more reliable.
Both are as reliable as you code them, the only issue may arise from ancient hardware that does not support shaders.