I'm also completely new to programming and went from several languages such as C#,C++, and now LUA. I'm currently studying up on the free primer of LUA. So far, I'm at least able to comprehend it. So I decided to try out the LOVE engine in order to (attempt to) make 2D games. My question here is this; is this code sloppy or formatted incorrectly? I'm not too sure if it should look like this :/
Code: Select all
-- Main initialization setting resolution and font along with defining variables
function love.load()
love.graphics.setMode(1024, 768,false, true, 0)
love.graphics.setCaption("LOVE Break Demonstration")
local f = love.graphics.newFont(32)
love.graphics.setFont(f)
love.graphics.setBackgroundColor(0,0,0)
player = love.graphics.newImage("images/bat.png")
title = love.graphics.newImage("images/splash.png")
tset1 = love.graphics.newImage("images/barrier1shdw.png")
tset2 = love.graphics.newImage("images/barrier1shdwr.png")
ball = love.graphics.newImage("images/ball.png")
Texts = {"Play","Quit"}
end
-- Drawing the menu
function love.draw()
love.graphics.print(Texts[1] ,450, 420)
love.graphics.print(Texts[2] ,450, 480)
love.graphics.draw(title ,275, 120)
love.graphics.draw(tset1 ,200, 120)
love.graphics.draw(tset2 ,750, 120)
end