LÖVE (Love2D) Core
/love2d-core
Structure and debug a LÖVE (Love2D) game in Lua: the love.load/update/draw loop, delta-time movement, input, and screen states.
- 许可证
- Apache-2.0
- 出品
- GameSkill 出品
所属合集
Awesome Gamedev Agent Skills
77 portable SKILL.md skills across 12 engines (Godot, Unity, Unreal, Phaser, PixiJS, three.js, Bevy, pygame, LÖVE, Roblox, Defold, Ebitengine), with a router.
我们测过
在 LÖVE 11.5 上通过 31/31 项检查(2026-10-30):能触发、有可运行示例、有截图和自检清单、单一职责、中英文文档齐全。触发检查是把提示词和 skill 描述做匹配,不是真实 agent 运行。
测试报告这个 skill 做什么
什么时候触发
Structure and debug a LÖVE (Love2D) game in Lua: the love.load/update/draw loop, delta-time movement, input, and screen states. Use when building a LÖVE 11.x game (main.lua, conf.lua, .love).
GameSkill 测过的版本
GameSkill 调优版:skill 文件取自提交 19d93f97c9c1,按我们的 skill 流程加上可运行示例、测试报告、自检清单和中文指南。
协议:基于 gamedev-skills/awesome-gamedev-agent-skills(作者 gamedev-skills),协议 Apache-2.0。ZIP 保留协议文件(LICENSE, NOTICE),CHANGES.md 列出了 GameSkill 加的所有文件。

自检清单
- 所有移动都乘 dt,速度按像素每秒算 / Scale every movement by dt; speed is in pixels per second
- `love.conf` 必须放在 `conf.lua`,放 `main.lua` 里不会生效 / Put love.conf in conf.lua; in main.lua it never runs
- 11.x 颜色是 0–1,旧代码的 0–255 要用 `love.math.colorFromBytes` / Colors are 0–1 in 11.x; use `love.math.colorFromBytes` for byte values
- `setColor` 是全局的,画文字和图片前重置成 `(1,1,1)` / Color state is global: reset setColor to (1,1,1) before text and images
- 按住键只触发一次 `love.keypressed`,需要重复就调 `setKeyRepeat(true)` / Held keys fire `love.keypressed` once; call `setKeyRepeat(true)` if you need repeats
中文指南
这个 skill 做什么
这个 skill 讲 LÖVE(Love2D)11.5 游戏的基础结构:love.load/love.update/love.draw 回调循环、按 dt 的帧率无关移动、输入处理、画面状态栈,以及 conf.lua 和颜色 0–1 的写法。
什么时候用
- 用 Lua 和 LÖVE 11.x 开始写游戏,搭
main.lua和conf.lua - 修移动速度随帧率变化、输入不响应、画面切换的问题
- 工作区里有调用
love.*的main.lua、conf.lua或.love文件
怎么装
下载本页的 ZIP,把 love2d-core/ 整个文件夹放进 agent 的 skills 文件夹:Claude Code 用 .claude/skills/,Codex、Gemini CLI、OpenCode 用 .agents/skills/,Cursor 用 .cursor/skills/,Copilot 用 .github/skills/,Windsurf 用 .windsurf/skills/,然后重启 agent。也可以直接对 agent 说:Install the skill from https://gameskill.dev/skills/love2d-core/install.md
最小示例
gameskill/examples/ 是一个 LÖVE 小游戏:game/conf.lua、game/main.lua、game/player.lua、game/states.lua 是游戏本体,shot/conf.lua、shot/main.lua 用来截图,tests/main.lua 是检查。
我们怎么测的
总分 31/31。在 LÖVE 11.5 无头模式下跑 19 项检查:30 帧和 120 帧一秒后移动距离一致;斜向移动做了归一化,不会更快;dt 上限为 0.1;玩家被限制在场地内;从标题进入游戏再返回标题正常;暂停压栈后游戏画面还在,出栈后恢复;暂停时更新被冻结;标题画面按 Esc 退出;余烬按种子生成,结果可复现;收集完进入结束画面;conf.lua 里 t.version 是 11.5;绘制颜色在 0–1 范围;colorFromBytes 转换正确;速度单位是像素每秒;暂停压在游戏之上;暂停能弹出;游戏结束后重开是全新一局;main.lua 定义了各个回调;Esc 通过 love.event.quit 退出。审查时修了三处:游戏结束画面在进入时把分数清零;按 Esc 只设了标记、从没真正退出(现在在 love.update 里调用 love.event.quit);斜向测试被 dt 上限截断。截图由 LÖVE 自己的 captureScreenshot 保存。结果在 gameskill/test-report.json。
搭配
pygame-core:同样的主循环概念在 pygame 里的写法game-feel:手感和反馈input-systems:可重绑定的多设备输入
安装
告诉你的 AI
Install the skill from https://gameskill.dev/skills/love2d-core/install.md
GameSkill 测过的版本
mkdir -p .claude/skills
curl -fsSL https://gameskill.dev/dl/skills/love2d-core.zip -o /tmp/gameskill-love2d-core.zip
unzip -oq /tmp/gameskill-love2d-core.zip -d .claude/skills
rm /tmp/gameskill-love2d-core.zip包含内容
- Worked steps: main.lua skeleton; Frame-rate independence; conf.lua; Color is 0–1 in LÖVE 11.x
- A pitfalls section with the mistakes to avoid
- Bundled 1 reference doc the agent reads when needed
- Written for LÖVE 11.x
适合
- Building a LÖVE 11.x game (main.lua, conf.lua, .love)
试试这条提示词
Structure my LÖVE game with screen states and frame-rate-independent movement.关于这个 Skill
Structure and debug a LÖVE (Love2D) game in Lua: the love.load/update/draw loop, delta-time movement, input, and screen states. Use when building a LÖVE 11.x game (main.lua, conf.lua, .love).
From the love2d-core SKILL.md in gamedev-skills/awesome-gamedev-agent-skills.
What's inside
- main.lua skeleton (the callback loop + input)
- Frame-rate independence (the single most common bug)
- conf.lua (window + version; runs before main.lua)
- Color is 0–1 in LÖVE 11.x (not 0–255)
- Screen states (brief — full manager in references)
环境要求
- LÖVE 11.x
常见问题
AI 2D 美术与序列帧管线 Sprite Asset Pipeline
把 AI 生成的原始视频直接变成商业级透明 2D 游戏序列帧:绿幕/溢色消除命令、0px 脚底锚点锁死排版、动作非线性重定时(4.33s → ~1.88s 含打击顿帧)与 Phaser / Godot 4 图集一键导出。
- FFmpeg 去绿幕 + 边缘溢色消除抽帧命令生成器
- 0px 脚底锚点自动对齐排版(彻底杜绝人物上下飘移)
基于 gamedev-skills/awesome-gamedev-agent-skills (作者 gamedev-skills,协议 Apache-2.0)。ZIP 里保留原作者的 LICENSE 和 NOTICE,ATTRIBUTION.md 和 CHANGES.md 写明来源提交和 GameSkill 加的内容。
搭配使用
作者标注的相关 Skills,或更适合相邻任务的 Skills。
Game Save Systems
Design save/load for game state — choosing what to serialize, file formats, save slots, atomic crash-safe writes, schema versioning and migration, and autosave.
Game Input Systems
Game input architecture: action mapping, rebinding with conflict checks, keyboard, gamepad and touch, deadzones, buffering and coyote time.
Pygame Core
Structure a pygame-ce game: the game loop, delta-time movement, blitting, keyboard and mouse input, and sprite groups with collision.
Awesome Gamedev Agent Skills 中的更多 Skills
查看全部 45 个2D Platformer
Build a 2D platformer: run/jump control with coyote time, jump buffering, and variable jump height, plus tiled levels and hazards.
Behavior Trees & Utility AI
Build a behavior-tree runtime and a Utility AI system with response curves, plus hybrid agents where the behavior tree drives utility scoring.
Bevy ECS
Structure a Bevy app around ECS: plugins, components and resources, systems with Query and Commands, system ordering and Time.
Card Game
Build a card game: card data, deck/hand/discard zones, draw/shuffle/reshuffle, a turn structure, costs, and effect resolution.
相似 skills
Game Decompilation Skill For Claude
Seven Claude Code skills for byte-matching decompilation of retro games: rebuild readable C/C++ function by function, diagnose why a function won't match, and run parallel matcher workers. No license is published, so see the repository for use.
pyxel-skill
The official agent skill for building and verifying Pyxel retro games, by Pyxel's creator kitao. Bundles the pyxel-mcp server so the agent can run, screenshot and check its own game.
FunPlay Skill
14 MIT agent skills for game development with scripts and tests: sprite-sheet slicing, normal maps, audio conversion, game concept briefs, browser game slices, Unity MCP workflow and Cocos/WeChat minigame rules.
Ludra
A 2D game engine built for AI agents: games are JSON, every error comes with a machine-readable fix, and the agent plays and tests its own game headlessly. Ships a Claude Code plugin and skill.