LÖVE:Lua 的 2D 游戏框架
LÖVE: 2D Game Framework for Lua

原始链接: https://github.com/love2d/love

LÖVE是一个免费开源的2D游戏框架,使用Lua编程语言,兼容Windows、macOS、Linux、Android和iOS。官方wiki上有文档,社区支持通过论坛、Discord和Reddit提供。 开发主要集中在“main”分支(不稳定),稳定的发布版本会被标记并可从GitHub下载,修复会出现在主要版本分支中。实验性功能位于单独的“love-experiments”仓库中。不稳定版本会自动生成,可通过GitHub CI访问,或通过Linux的PPAs/AUR获取。 全面的测试套件确保API的功能。欢迎通过问题追踪器、Discord和pull requests贡献代码,但由LLM/AI生成的贡献不被接受。从源代码构建需要CMake和单独的构建目录。针对macOS、iOS和Android提供了特定平台的构建说明,通常涉及Xcode项目和依赖管理。LÖVE利用SDL3、OpenGL和Lua/LuaJIT等库。

## LÖVE 2D 游戏框架讨论 一篇 Hacker News 帖子介绍了 LÖVE,一个使用 Lua 构建、基于 SDL2 的 2D 游戏框架。用户称赞它易于使用——只需运行一个 zip 文件即可启动引擎——以及简单但强大的 API,并以最近的独立热门游戏 *Balatro* 为例,证明了它是一个成功的案例。 虽然 LÖVE 提供了跨平台能力,但有人指出最新发布的版本已经过时,许多开发者正在使用更高效但尚未发布的开发版本 (12.0)。 讨论还涉及替代方案;其他语言存在 SDL2 绑定,一位用户质疑 LÖVE 的性能与基于 Web 的解决方案相比如何。有人提出了关于移动端打包(Android/iOS)和应用内购买集成的疑问。总的来说,LÖVE 被认为是高层和底层游戏开发抽象之间的一个理想平衡点。
相关文章

原文

LÖVE is an awesome framework you can use to make 2D games in Lua. It's free, open-source, and works on Windows, macOS, Linux, Android, and iOS.

Build Status: Github CI

We use our wiki for documentation. If you need further help, feel free to ask on our forums, our Discord server, or our subreddit.

We use the 'main' branch for development of the next major release, and therefore it should not be considered stable.

There are also branches for currently released major versions, which may have fixes and changes meant for upcoming patch releases within that major version.

We tag all our releases (since we started using mercurial and git), and have binary downloads available for them.

Experimental changes are sometimes developed in a separate love-experiments repository.

Files for releases are in the releases section on GitHub. The site has links to files and additional platform content for the latest release.

There are also unstable/nightly builds:

  • Builds for some platforms are automatically created after each commit and are available through GitHub's CI interfaces.
  • For ubuntu linux they are in ppa:bartbes/love-unstable
  • For arch linux there's love-git in the AUR.

The test suite in testing/ covers all the LÖVE APIs, and tests them the same way developers use them. You can view current test coverage from any action.
You can run the suite locally like you would run a normal LÖVE project, e.g.:
love testing

See the readme in the testing folder for more info.

The best places to contribute are through the issue tracker and the official Discord server or IRC channel.

For code contributions, pull requests and patches are welcome. Be sure to read the source code style guide. Changes and new features typically get discussed in the issue tracker or on Discord or the forums before a pull request is made.

Note

Pull requests, bug reports, and other contributions made with LLM / generative AI technology will not be accepted.

Follow the instructions at the megasource repository page.

Because in-tree builds are not allowed, the Makefiles needs to be generated in a separate build directory. In this example, folder named build is used:

$ cmake -B build -S. --install-prefix $PWD/prefix # this will create the directory `build/`.
$ cmake --build build --target install -j$(nproc) # this will build with all cores and put the files in `prefix/`.

Note

CMake 3.15 and earlier doesn't support --install-prefix. In that case, use -DCMAKE_INSTALL_PREFIX= instead.

Download or clone this repository and copy, move, or symlink the macOS/Frameworks subfolder into love's platform/xcode/macosx folder and the shared subfolder into love's platform/xcode folder.

Then use the Xcode project found at platform/xcode/love.xcodeproj to build the love-macosx target.

Building for iOS requires macOS and Xcode.

Download the love-apple-dependencies zip file corresponding to the LÖVE version being used from the Releases page, unzip it, and place the iOS/libraries subfolder into love's platform/xcode/ios folder and the shared subfolder into love's platform/xcode folder.

Or, download or clone this repository and copy, move, or symlink the iOS/libraries subfolder into love's platform/xcode/ios folder and the shared subfolder into love's platform/xcode folder.

Then use the Xcode project found at platform/xcode/love.xcodeproj to build the love-ios target.

See readme-iOS.rtf for more information.

Visit the Android build repository for build instructions.

  • SDL3
  • OpenGL 3.3+ / OpenGL ES 3.0+ / Vulkan / Metal
  • OpenAL
  • Lua / LuaJIT / LLVM-lua
  • FreeType
  • harfbuzz
  • ModPlug
  • Vorbisfile
  • Theora
联系我们 contact @ memedata.com