Cette page est affichée en anglais. Une traduction française est en cours.
ConfigsMay 19, 2026·3 min de lecture

LÖVE — Free 2D Game Framework for Lua

LÖVE is a free, open-source framework for making 2D games in Lua. It provides modules for graphics, audio, physics, and input, letting developers focus on game logic rather than engine plumbing.

Prêt pour agents

Cet actif peut être lu et installé directement par les agents

TokRepo expose une commande CLI universelle, un contrat d'installation, le metadata JSON, un plan selon l'adaptateur et le contenu raw pour aider les agents à juger l'adaptation, le risque et les prochaines actions.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
LÖVE 2D Game Framework
Commande CLI universelle
npx tokrepo install cc2879c0-5339-11f1-9bc6-00163e2b0d79

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.physics module
  • 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 .love files (renamed ZIP archives containing Lua source)
  • Configure window properties in conf.lua with love.conf(t) for resolution, fullscreen, and vsync
  • Distribute by appending a .love file 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.newShader for 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.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires