Install LÖVE, then:
mkdir my-little-game
cd my-little-game
touch main.lua
# edit main.lua as you please
love .
Hello world:
function love.draw()
love.graphics.print("Hello World!")
end
With a color:
green = {0, 255, 0}
function love.draw()
love.graphics.print({green, "Hello World!"})
end
With many colors:
green = {0, 255, 0}
red = {255, 0, 0}
orange = {255, 165, 0}
yellow = {255, 255, 0}
green = {0, 255, 0}
blue = {0, 0, 255}
indigo = {75, 0, 130}
violet = {238, 130, 238}
function love.draw()
love.graphics.print({red, "R", orange, "A", yellow, "I", green, "N", blue, "B", indigo, "O", violet, "W"})
end
Top comments (0)