Love2D intro notes


Love2D is a way to build apps. It is based on the distribution of compressed bundles of files, usually a “main.lua” Lua script file plus other Lua scripts and optionally other files, tipically images and sounds.

Love2D is mainly a way to build game apps with 2D graphic. It can leverage some of its cross-platform ability, both mobile and classic desktop systems.

To activate a Love2D app you must use an installer with file extension association (or install its package). Extension association is a way to usually launch such apps, the other is in this form: “love gamefile.love”. The extension of the zipped compressed app bundle is “.love” in fact, and the above way is meant to launch the love2d app using the “love” runtime executable and the file to open as a “command line argument”, usable both in consoles and in desktop app launcher files (e.g. Windows or Linux app Icons).

The “love” executable file is a runtime that can run both zipped “.love” files and directories containing Lua/Love2D scripts also. Such directories must contain at least the “main.lua” file as app entry-point for program execution, and such directories can be distributed by zipping such contents with a zip compression program/command and renaming such zip file to a love file extension: app.zip -> app.love.

To write such script textual files describing the program you can use a Lua IDE such as ZeroBrane Studio (written in wxlua) or Microsoft’s Visual Studio Code extendible IDE with Lua specific “extensions” from the “VSCode Extension Marketplace” (BTW VSCode is built mainly in JavaScript).


Lascia un commento

Il tuo indirizzo email non sarà pubblicato.

Questo sito usa Akismet per ridurre lo spam. Scopri come i tuoi dati vengono elaborati.