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

LOVE2D — Awesome 2D Game Framework for Lua

Free open-source 2D game framework that lets you build games in Lua with a simple API, cross-platform support, and zero boilerplate.

Agent 就绪

Agent 可直接安装

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

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
LOVE2D Overview
直接安装命令
npx -y tokrepo@latest install 2d229611-7809-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 provides a clean, minimal API for graphics, audio, input, and physics, letting you focus on game logic rather than engine plumbing. It has been a staple of the indie game development community for over a decade.

What LOVE2D Does

  • Renders 2D graphics with hardware-accelerated OpenGL
  • Handles keyboard, mouse, gamepad, and touch input
  • Plays audio with positional sound and multiple simultaneous sources
  • Integrates Box2D physics for collision detection and rigid body simulation
  • Packages games as standalone executables for Windows, macOS, Linux, and mobile

Architecture Overview

LOVE2D is written in C++ with LuaJIT as the scripting runtime. The framework exposes modules for graphics, audio, filesystem, physics, and windowing through a Lua API. Games consist of Lua scripts loaded by the LOVE runtime. The callback-based architecture (love.update, love.draw, love.keypressed) keeps the game loop simple and predictable.

Self-Hosting & Configuration

  • Download prebuilt binaries for all major platforms from love2d.org
  • On Linux, install via package managers (apt, pacman, snap)
  • Configure window size, fullscreen mode, and vsync in conf.lua
  • Bundle games as .love files (ZIP archives) for easy distribution
  • Build standalone executables by fusing the .love file with the runtime

Key Features

  • Minimal, readable API that beginners can learn in hours
  • LuaJIT runtime provides near-native performance for game logic
  • Built-in Box2D physics integration for collision and simulation
  • Cross-platform output from a single codebase (desktop and mobile)
  • Active community with extensive libraries for networking, UI, and ECS

Comparison with Similar Tools

  • Godot — full-featured engine with an editor; LOVE is lighter and code-only
  • Phaser — HTML5 game framework for the browser; LOVE targets native desktop
  • Pygame — Python-based 2D games; LOVE offers better performance via LuaJIT
  • Raylib — C library for games; LOVE provides a higher-level scripted workflow
  • Ebitengine — Go-based 2D engine; LOVE has a larger ecosystem and community

FAQ

Q: Is LOVE suitable for commercial games? A: Yes. LOVE uses the zlib license, allowing commercial use without royalties or attribution requirements.

Q: Can I make 3D games with LOVE? A: LOVE is designed for 2D. Limited 3D is possible through custom shaders and libraries, but dedicated 3D engines are a better choice.

Q: How do I distribute my game? A: Package your Lua files into a .love archive and fuse it with the runtime binary for each target platform.

Q: Does LOVE support mobile platforms? A: Yes. Official builds support iOS and Android, with touch input handled through the same event API.

Sources

讨论

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

相关资产