Introduction
Lua is a small and powerful programming language that can be used for everything from system maintenance to graphics and games. It's a popular scripting language in the video game and visual effects industry. LĂ–VE is a framework for Lua that you can use to make games.
In this guide, learn how to install LĂ–VE on the Raspberry Pi 4, learn about callback functions, the coordinate system involved as well as the table data structure.Â
Complete this guide to gain familiarity with the fundamentals which will get you up and running with game development on LĂ–VE!
In this guide, learn how to install LĂ–VE on the Raspberry Pi 4, learn about callback functions, the coordinate system involved as well as the table data structure.Â
Complete this guide to gain familiarity with the fundamentals which will get you up and running with game development on LĂ–VE!
-
-
-
-
-
-
-- My First LĂ–VE program -- function love.keypressed(key) print(key) if key == "x" then print( "Quitting ... ") love.event.quit() end end function love.draw() -- draw some text in white love.graphics.setColor(255,255,255) -- RGB values, Use white love.graphics.setFont(love.graphics.newFont(72)) love.graphics.print("Press x to exit", 200, 200) end
-
-
function love.load() playerSprite = love.graphics.newImage("player.png") end
-
function love.load() player = { sprite = love.graphics.newImage("player.png"), x = 0, y = 250 } end
-
-
function love.load() player = { sprite = love.graphics.newImage("player.png"), x = 0, y = 250 } end function love.update() if love.keyboard.isDown("up") then player.y = player.y - 2 end
-
-
function love.load() player = { sprite = love.graphics.newImage("player.png"), x = 0, y = 250 } end function love.update() if love.keyboard.isDown("up") then player.y = player.y - 2 elseif love.keyboard.isDown("down") then player.y = player.y + 2 elseif love.keyboard.isDown("right") then player.x = player.x + 2 elseif love.keyboard.isDown("left") then player.x = player.x - 2 end end function love.draw() love.graphics.draw(player.sprite,player.x,player.y) end
-