I was just experimenting with the few functions that I've learned today. I was trying to make a sequence of numbers that go down across the screen and change color. Initially I wanted it to change throughout the ROYGBIV spectrum, but I'm not sure how to do that, so I just made it change from a blueish color to red.
Anyway, I wanted to extend the size of the window because not all of the numbers could fit on screen. I thought that love.conf would do the trick, but for some reason it wouldn't work for me. I have love 0.8.0 right now, and here's my entire code
Code: Select all
function love.conf(t)
t.screen.width = 900
end
function love.load()
local f = love.graphics.newFont("BAUHS93.TTF", 45)
love.graphics.setFont(f)
love.graphics.setColor(50, 250, 250)
love.graphics.setBackgroundColor(18, 18, 18)
end
function love.draw()
x = 0
n = 0
for i = 0, 100, 1 do
love.graphics.setColor(50+(2*i), 250-i, 250-i)
if(n <= 500) then
love.graphics.print(i, x, n)
n = n + 100
else
x = x + 50
n = 0
love.graphics.print(i, x, n)
n = n + 100
end
end
end