So I'm new with LÖVE and I'm trying to make a simple game first.
So I have a file that contains the informations about a map, like this :
Code: Select all
001000000010
000000000000
000000000000
000000000000
000000000000
000000000000
000000000000
000000000000
000000000000
000000000000
000000000000
001000000000
Code: Select all
map = {}
for i=1,12 do
map[i] = {}
for j=1,12 do
for line in love.filesystem.lines("maps/salon.map") do
table.insert(map[i], string.sub(line,j,j))
end
end
end
The print function looks like this :
Code: Select all
x = 30
y = 30
for i=1,12 do
for j=1,12 do
love.graphics.print( {{255, 255, 255}, map[i][j]}, x,y)
x = x + 15
end
y = y + 15
x = 30
end