local text = ""
local endText = "Hello, world!")
for i = 1, string.len(text) do
text = string.sub(endText, 1, i)
end
And that works fine. But the problem is that it just doesn't look that smooth. So I came up with another idea which is using GLSL shaders to make it more smoother. And you can do that by making a pixel's alpha depending on how far along the x-axis it is from the starting point but I can't code in GLSL so can someone help me out?
Last edited by spynaz on Thu Nov 14, 2013 8:49 pm, edited 1 time in total.
Wait I actually did it myself! There is only one problem; it works fine with shapes, but when you apply it on the text it makes it really blurred. Does anyone know how to fix this? (See attached .love file, click "q" to activate shader when running)
The attachment ShaderText.png is no longer available
Yea that's exactly the problem I'm having. I need help with fixing that.
EDIT: Nvm, I FIXED IT MYSELF! I figured that when printing text on the screen, each pixel has a different alpha (as opposed to a shape where every pixel has the same alpha) so if each pixel's alpha turns out to be 255 at the end, the text just looks like a bunch of boxes. Know what I mean? So I just made it make sure that each pixel's alpha doesn't exceed it's max alpha. (See the attached fixed version)