love.conf won't work?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
PloXyZeRO
Prole
Posts: 8
Joined: Thu Apr 05, 2012 2:47 am

love.conf won't work?

Post by PloXyZeRO »

Hey there! I'm absolutely NEW to love2d, I have no idea what I'm doing. I was playing Mari0 today and got curious, so I decided to try out!

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
However, the window stayed the same size no matter what! I tried height = 768 and width = 1024 as well, no change. Could anyone help? Thanks!
User avatar
jradich
Party member
Posts: 100
Joined: Mon Dec 12, 2011 8:44 pm

Re: love.conf won't work?

Post by jradich »

put the love.conf or whatever in a file called conf.lua.
Losing a friend's trust is the fastest way to lose a friend, forever. FOREVER!
PloXyZeRO
Prole
Posts: 8
Joined: Thu Apr 05, 2012 2:47 am

Re: love.conf won't work?

Post by PloXyZeRO »

Thank you, worked perfectly!
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], pericles and 10 guests