What is löve?
LÖVE is an awesome framework you can use to make 2D games in Lua. It's free, open-source, and works on Windows, macOS, Linux, Android and iOS. - love2d.org
What is Lua?
Lua is a powerful, efficient, lightweight, embeddable scripting language. - lua.org
Creating a function
Functions are first-class citizens in Lua. They can be stored in variables, passed as arguments to other functions, and returned as values from other functions.
Using tables
Tables are the only data structure in Lua. They can be used as arrays, dictionaries, or even objects.
Tables are references
Tables in Lua are reference types. Don't worry about memory management.
Using Löve
Love event cycle consists of several callback functions that you can define in your code. The most commonly used callbacks are love.load, love.update, and love.draw.
Drawing text
You can use the love.graphics.print function to draw text on the screen.
Drawing an image
You can use the love.graphics.draw function to draw images on the screen.
Moving an object
You can update the position of an object in the love.update function.
Running the game
To run the game, open a terminal and navigate to the directory where the game is saved. Then, run the following command:
Delta time
Delta time (dt) is the time elapsed since the last frame. It is used to make movement frame-rate independent.
Congratulations
You have completed the basics of Löve. You can now start creating your own games.
-- This is a simple Lua programprint("Hello, World!")