Introduction
LÖVE (also called Love2D) is a framework for creating 2D games in Lua. It has been actively developed since 2008 and is known for its simplicity: a game is a folder with a main.lua file that defines callback functions. The framework handles the window, rendering, audio, input, and physics so developers can prototype rapidly.
What LÖVE Does
- Renders 2D graphics using OpenGL with support for sprites, shapes, shaders, and canvases
- Provides a built-in Box2D physics engine via the
love.physicsmodule - Handles audio playback with support for WAV, OGG, MP3, and streaming large files
- Manages keyboard, mouse, gamepad, and touch input through callback functions
- Packages games into standalone executables for Windows, macOS, Linux, Android, and iOS
Architecture Overview
LÖVE is written in C++ and embeds LuaJIT as its scripting runtime. The engine runs a main loop that calls user-defined Lua callbacks: love.update(dt) for logic and love.draw() for rendering. Each subsystem (graphics, audio, physics, filesystem) is exposed as a Lua module. The rendering backend uses OpenGL ES on mobile and OpenGL on desktop, abstracted behind a unified API.
Self-Hosting & Configuration
- Download binaries from the official site or install via package managers (
brew,apt,scoop) - Games are directories or
.lovefiles (renamed ZIP archives containing Lua source) - Configure window properties in
conf.luawithlove.conf(t)for resolution, fullscreen, and vsync - Distribute by appending a
.lovefile to the LÖVE binary to create a standalone executable - Android and iOS builds use the official LÖVE app or custom build templates
Key Features
- LuaJIT scripting for near-native performance with a beginner-friendly language
- GLSL shader support via
love.graphics.newShaderfor custom visual effects - Canvas (off-screen render targets) for post-processing, minimaps, and layered rendering
- Thread module for running Lua code in parallel for asset loading or computation
- Filesystem sandboxing that isolates game save data per project
Comparison with Similar Tools
- Pygame — Python-based; LÖVE uses Lua and generally offers better performance and simpler packaging
- Godot — full engine with editor; LÖVE is a code-only framework with a smaller footprint
- Raylib — C library; LÖVE provides a higher-level Lua API with built-in physics
- Defold — GUI editor with Lua scripting; LÖVE is editor-agnostic and more lightweight
- MonoGame — C#/.NET framework; LÖVE is simpler to start with but less suited for large projects
FAQ
Q: What language does LÖVE use? A: Lua, specifically LuaJIT. No compilation step is needed; games run directly from source files.
Q: Can LÖVE make 3D games? A: LÖVE is designed for 2D. Basic 3D is possible via custom shaders and mesh manipulation, but dedicated 3D engines are better suited.
Q: How do I distribute a LÖVE game?
A: Zip your game folder as a .love file, then fuse it with the LÖVE binary for each target platform to create a standalone executable.
Q: Is LÖVE suitable for commercial games? A: Yes. LÖVE is licensed under zlib/libpng, allowing use in commercial projects without royalties or attribution requirements.