Configs2026年7月4日·1 分钟阅读

LOVE — Free 2D Game Framework Powered by Lua

A free, open-source 2D game framework for Lua that provides graphics, audio, physics, and input handling so you can focus on building your game.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
LOVE Overview
直接安装命令
npx -y tokrepo@latest install 57baeeff-77c6-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

Introduction

LOVE (also written as Love2D) is a free, open-source framework for making 2D games in Lua. It handles rendering, audio, input, and physics through a clean API, letting game developers write game logic in Lua without dealing with low-level engine plumbing.

What LOVE Does

  • Provides hardware-accelerated 2D rendering with sprites, shapes, and shaders
  • Includes a complete audio system for music playback and sound effects
  • Integrates Box2D physics for rigid body simulation and collision detection
  • Handles keyboard, mouse, touch, and gamepad input through callback functions
  • Packages games as standalone executables for Windows, macOS, and Linux

Architecture Overview

LOVE is written in C++ and exposes its subsystems to Lua through a module-based API. The main loop calls user-defined love.update and love.draw callbacks each frame. Subsystems include love.graphics (OpenGL-backed rendering), love.audio (OpenAL-backed sound), love.physics (Box2D wrapper), and love.filesystem (sandboxed file access). Each module operates independently and can be used selectively.

Self-Hosting & Configuration

  • Install via package managers (Homebrew, APT, Chocolatey) or download from the website
  • Create a main.lua file defining love.load, love.update, and love.draw callbacks
  • Run your game with the love command pointing to your project directory
  • Configure window settings in a conf.lua file for resolution, fullscreen, and vsync
  • Distribute by zipping your Lua files into a .love archive or fusing with the LOVE binary

Key Features

  • Immediate-mode 2D rendering with sprite batching, canvases, and GLSL shaders
  • Built-in Box2D physics with joints, fixtures, and collision callbacks
  • Cross-platform support for Windows, macOS, Linux, iOS, and Android
  • Hot-reloadable Lua scripts for rapid iteration during development
  • Active community with extensive libraries for UI, networking, ECS, and more

Comparison with Similar Tools

  • Pygame — Python-based; simpler but less performant and no built-in physics engine
  • Raylib — C library with many bindings; lower level with more manual setup required
  • Godot — full game engine with editor; heavier but supports 3D and visual scripting
  • Ebitengine — Go-based 2D engine; statically typed but smaller ecosystem and no built-in physics

FAQ

Q: What version of Lua does LOVE use? A: LOVE uses LuaJIT, a high-performance JIT compiler compatible with Lua 5.1.

Q: Can I make 3D games with LOVE? A: LOVE is designed for 2D. Basic 3D is possible through shaders and custom mesh rendering, but a 3D engine would be more appropriate.

Q: How do I distribute my game? A: Zip your project into a .love file, or fuse it with the LOVE binary to create a standalone executable.

Q: Is LOVE suitable for commercial games? A: Yes, LOVE is licensed under zlib/libpng and can be used for commercial projects without restrictions.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产