LÖVE is a free and open-source framework for game development.
Written in C++ and uses Lua as the scripting language. It is available for Windows, macOS, Android, GNU+Linux and iOS.
LÖVE is well known in Game Development Competitions. It supports and provides various resources from the #gamedev world, such as:
And among many other resources.
LÖVE, in short, is just a command that receives files as a parameter, that is, the installation involves downloading the binary and installing it. But, if you want to compile from scratch, just follow the compilation instructions described in the GitHub repository.
To download, go to the address: https://love2d.org/ and click on the option according to your operating system and architecture:
In my case, I chose to download AppImage:
To run, just run the binary:
A window will appear with the animation of an emoji-style balloon with the tail written: NO GAMES
:
To install, use the install
command on GNU+Linux distros:
In this case, installing and renaming so the command is just:
love
Output:
'love-11.5-x86_64.AppImage' -> '/usr/local/bin/love'
.
Now, to run it, regardless of where you are, just run the command: love
!
For Windows, just use PowerShell or Windows Terminal. If you want to install, move it to the C:\
drive, preferably in a folder named LÖVE/love.exe
and add the PATH to use only as the love
command too.
Every time you develop with LÖVE, I advise creating a folder/directory for your project:
And within this project, create a file Lua named: main.lua
and insert the code below:
This code will create a window with a width of 400px and a height of 300px and will draw the phrase: ‘Hello World’ in this window.
To learn Lua quickly go to: https://terminalroot.com/definitive-guide-to-lua-for-beginners/.
NOTE: Do not run:
love main.lua
. It does not work!!! You will get a blue error window and information like:Error: [love "boot.lua"]:330: Cannot load game at path ()...
.
To run it, you need to run the directory where the code is located, that is, the complete directory, if it is in the same directory, then it is just the dot: (.
), like this:
The window will appear:
Let’s create a basic animation of drawing eyes in the window and moving them as we move the mouse. Edit the main.lua
file and insert the code below:
And run again:
The output will be similar to below:
According to this article, it was possible to notice how easy and interesting it is to use LÖVE. There are a multitude of things about it and for that I have separated the links below: