I always tought to start a game,
I always tought to start a game, I often thought to start a devLog and I sometimes tought to start a github. Lately, stopped a week at home by a bronchitis, I wondered how to connect these three ideas togheter and in no time I decided to put some love into gaming (get used to the puns) and start a project to learn and test my skills.
Before boring you more with a TLTR and since it's an old tradition in the programming field, I'll leave you with an Hello World in the language+library I'm gonna use for the creation of... well, you' will discover it ;)
-- main.lua --
--Dimensions of the window
WIN_HEIGHT = 800
WIN_WIDTH = 480
--variables for printf
LIMIT = 300 -- limit of width in px
ALIGN = 'center'
CENTERX = WIN_WIDTH/2-LIMIT/2
CENTERY = WIN_HEIGHT/2-LIMIT/2
--love functions:
function love.load()
--set the windows property
love.window.setTitle("Hello World")
love.window.setMode(WIN_WIDTH, WIN_HEIGHT, {resizable=true, vsync=false, centered=true})
end
function love.update()
--intentionally empty
end
function love.draw()
love.graphics.setNewFont(36) --change the font size
love.graphics.printf("Hello Github! <3", CENTERX, CENTERY, LIMIT, ALIGN)
end