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.0Auto-check passedGame Development

Install Love2d Core

skills CLI
$ npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill love2d-core -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install gamedev-skills/awesome-gamedev-agent-skills love2d-core --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/gamedev-skills/awesome-gamedev-agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/other-engines/love2d-core .claude/skills/love2d-core && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
love2d-core
GitHub stars
1.4k
Token cost
~1.6k tokens
SKILL.md length
417 words
Files
2 (incl. references)
Skills in repo
53
Repo updated
First seen
Licence
Apache-2.0

At a glance

Structure and debug a LÖVE (Love2D) game in Lua: the love.load/update/draw loop, delta-time movement, input, and screen states.

  • Works in 5 steps: main.lua skeleton (the callback loop +… → Frame-rate independence (the single most… → conf.lua (window + version; runs before… → …
  • Building a LÖVE 11.x game (main.lua
  • SKILL.md covers When to use, Core workflow, Patterns and Pitfalls, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Love2d Core is an agent skill from gamedev-skills/awesome-gamedev-agent-skills. 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).

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/state-stack.md`).

It sits in Game Development. It works with Lua. The repository describes itself as: 74 game-dev skills for AI coding agents — Godot, Unity, Unreal, Phaser, PixiJS, three.js, Bevy, pygame, LÖVE, Roblox. Portable SKILL.md Agent Skills (the format Anthropic… The licence is Apache-2.0.

When your agent uses it

  • Building a LÖVE 11.x game (main.lua

Example prompts

  • “/love2d-core”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. main.lua skeleton (the callback loop + input)
  2. Frame-rate independence (the single most common bug)
  3. conf.lua (window + version; runs before main.lua)
  4. Color is 0–1 in LÖVE 11.x (not 0–255)
  5. Screen states (brief — full manager in references)

What it can do on your machine

Read from SKILL.md and the folder at commit 0a70cfc. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are lua).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Love2d Core loads about 1.6k tokens when it runs, and up to ~2.7k if it reads all its reference files. Until then it costs about 51 tokens; SKILL.md has 417 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~51
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from gamedev-skills/awesome-gamedev-agent-skills at commit 0a70cfc, republished under its Apache-2.0 licence (© gamedev-skills). 417 words, ~1,573 tokens.

Download SKILL.mdSave it as .claude/skills/love2d-core/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
love2d-core
description
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).

LÖVE (Love2D) Core

Set up and debug the foundation of a LÖVE game in Lua: the callback loop, frame-rate- independent movement, input, and screen states. Targets LÖVE 11.5.

When to use

  • Use when starting a LÖVE game, wiring up main.lua/conf.lua, or fixing the core loop, movement that runs at the wrong speed, input handling, or screen switching.
  • Use when the workspace has main.lua calling love.*, a conf.lua, or a .love file.

When not to use: Lua language questions unrelated to LÖVE; physics bodies/joints (LÖVE uses Box2D via love.physics — a separate concern); shader code (love.graphics GLSL is its own topic). For cross-engine save/load patterns, use save-systems.

Core workflow

  1. Confirm the entry points. A LÖVE game runs main.lua; it should define love.load() (one-time setup), love.update(dt) (state), and love.draw() (rendering). Window/version setup goes in conf.lua (run before modules load).
  2. Pin the version. Set t.version = "11.5" in conf.lua so LÖVE warns on mismatch.
  3. Drive all motion by dt (delta time, in seconds) so speed is frame-rate independent.
  4. Handle input two ways: polled (love.keyboard.isDown in update, for held keys) and event (love.keypressed callback, for discrete presses).
  5. Manage screens (menu, game, pause) with a small state stack rather than a pile of if flags — see Patterns and references/state-stack.md.
  6. Run and observe. Launch with love . from the project folder; verify the window, motion speed, and input on screen before assuming it works.

Patterns

1. main.lua skeleton (the callback loop + input)
lua
-- main.lua — LÖVE calls these callbacks for you. Colors are 0–1 in LÖVE 11.x.
function love.load()
    -- One-time setup. speed is in PIXELS PER SECOND, not per frame.
    player = { x = 100, y = 100, size = 40, speed = 220 }
    love.graphics.setBackgroundColor(0.1, 0.1, 0.12)
end

function love.update(dt)
    -- Polled input: good for continuous movement while a key is held.
    if love.keyboard.isDown("right") then player.x = player.x + player.speed * dt end
    if love.keyboard.isDown("left")  then player.x = player.x - player.speed * dt end
    if love.keyboard.isDown("down")  then player.y = player.y + player.speed * dt end
    if love.keyboard.isDown("up")    then player.y = player.y - player.speed * dt end
end

function love.draw()
    love.graphics.setColor(0.2, 0.8, 1.0)                 -- tint ON
    love.graphics.rectangle("fill", player.x, player.y, player.size, player.size)
    love.graphics.setColor(1, 1, 1)                       -- reset tint before text/images
    love.graphics.print("Arrow keys to move, Esc to quit", 10, 10)
end

function love.keypressed(key)
    -- Event input: fires once per physical press. Use for menus, jumps, toggles.
    if key == "escape" then love.event.quit() end
end
2. Frame-rate independence (the single most common bug)
lua
-- RIGHT: scaled by dt → same real-world speed at 30 or 240 FPS.
player.x = player.x + player.speed * dt
-- WRONG: "pixels per frame" → moves twice as fast at double the frame rate.
player.x = player.x + player.speed
Show full SKILL.md (170 more words)Show less
3. conf.lua (window + version; runs before main.lua)
lua
-- conf.lua — must be its own file; love.conf will NOT run from main.lua.
function love.conf(t)
    t.version = "11.5"             -- the LÖVE version this game targets (string "X.Y")
    t.window.title  = "My LÖVE Game"
    t.window.width  = 800
    t.window.height = 600
    t.window.vsync  = 1            -- number since 11.0: 1 = on, 0 = off, -1 = adaptive
    t.window.resizable = false
    t.modules.physics = false      -- disable modules you don't use to trim startup/memory
end
4. Color is 0–1 in LÖVE 11.x (not 0–255)
lua
-- LÖVE 11.x uses normalized floats. (Pre-11.0 code used 0–255 and will look wrong.)
love.graphics.setColor(1, 0, 0)                          -- opaque red
love.graphics.setColor(0.2, 0.8, 1.0, 0.5)               -- translucent cyan (alpha 0.5)
-- Need to convert old byte values? Use the helper instead of dividing by hand:
love.graphics.setColor(love.math.colorFromBytes(128, 234, 255))
5. Screen states (brief — full manager in references)
lua
-- A screen is a table with optional :update(dt), :draw(), :keypressed(key).
-- Keep the active screen on a stack so pause/menu overlays are trivial to pop.
local Stack = require("state_stack")   -- see references/state-stack.md for the module
function love.load()              Stack.push(require("screens.menu")) end
function love.update(dt)          Stack.current():update(dt) end
function love.draw()              Stack.current():draw() end
function love.keypressed(key)     Stack.current():keypressed(key) end

Pitfalls

  • Speed varies with FPS → you forgot * dt. Every per-frame change to position, timers, or animation must be scaled by dt.
  • love.conf placed in main.lua → it silently does nothing. It must live in conf.lua, which LÖVE runs before loading modules.
  • Colors washed out or invisible → you used 0–255 values. In 11.x, setColor(255,0,0) clamps to white; use setColor(1,0,0) or love.math.colorFromBytes.
  • Everything tinted after one setColor → color is global and persists across draws. Reset with love.graphics.setColor(1, 1, 1) before drawing text/images you want untinted.
  • Nothing happens on key release/repeat → love.keypressed(key, scancode, isrepeat) fires on press (and OS key-repeat); use love.keyreleased for release, and check isrepeat if you must ignore held-key repeats.

References

  • For a complete push/pop screen-state manager (menu → game → pause, with delegated callbacks), read references/state-stack.md.
  • save-systems — saving/loading game state (engine-agnostic).
  • input-systems — rebindable, multi-device input architecture.
  • pygame-core / phaser-core — the same loop concepts in other lightweight engines.

© gamedev-skills, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in skills/other-engines/love2d-core of gamedev-skills/awesome-gamedev-agent-skills.

  • SKILL.md
  • references/state-stack.md

Open the folder on GitHubat commit 0a70cfc

Compare with similar skills

Love2d Core next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Love2d Core compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Love2d Core this skillgamedev-skills/awesome-gamedev-agent-skills1.4k—~1.6kAutomated safety check: PassApache-2.0
Sync Simplegraphicatty303/pob-web103—~1.4kAutomated safety check: PassMIT
Dota2 Game LogicXavierCHN/x-template217—~2.7kAutomated safety check: PassMIT
Defold Scripts Editingselimanac/defold-astar111—~1.8kAutomated safety check: PassNone
Monarch Screen Setupselimanac/defold-astar111—~2.1kAutomated safety check: PassNone
Xmath Usageselimanac/defold-astar111—~1.5kAutomated safety check: PassNone

Similar skills

  • Sync Simplegraphic

    atty303/pob-web

    Synchronize pob-web with PathOfBuilding-SimpleGraphic only when the user explicitly invokes $sync-simplegraphic.

    103 GitHub stars~1.4k tokensUpdated 6 days ago
    Game DevelopmentAuto-check passed
  • Dota2 Game Logic

    XavierCHN/x-template

    DOTA2 自定义游戏服务端逻辑开发指南。触发词:游戏逻辑、服务端、server、game mode、游戏模式、GameRules、modifier、timer、lua、TSTL。Use when user asks to create or modify DOTA2 custom game server-side logic, game mode configuration…

    217 GitHub stars~2.7k tokensUpdated 4 mo ago
    Game DevelopmentAuto-check passed
  • Defold Scripts Editing

    selimanac/defold-astar

    Creates and edits Defold Lua script files (.script, .guiscript, .renderscript, .editorscript) and plain Lua modules (.lua).

    111 GitHub stars~1.8k tokensUpdated 5 mo ago
    Game DevelopmentAuto-check passed
  • Monarch Screen Setup

    selimanac/defold-astar

    Organizes screens and popups in a Defold game using Monarch screen manager.

    111 GitHub stars~2.1k tokensUpdated 5 mo ago
    Game DevelopmentAuto-check passed
  • Xmath Usage

    selimanac/defold-astar

    Provides xmath API reference and in-place math optimization patterns for Defold.

    111 GitHub stars~1.5k tokensUpdated 5 mo ago
    Game DevelopmentAuto-check passed
  • Defold API Fetch

    selimanac/defold-astar

    Fetches Defold API documentation. An agent skill from selimanac/defold-astar.

    111 GitHub stars~2.5k tokensUpdated 5 mo ago
    Game DevelopmentAuto-check passed

More from gamedev-skills/awesome-gamedev-agent-skills

All 53 skills in this repo
  • Create Game Assets

    gamedev-skills/awesome-gamedev-agent-skills

    Plan, generate, source, normalize, and validate cohesive visual game assets.

    1.4k GitHub stars~2k tokensUpdated 2 days ago
    Auto-check passed
  • Roblox UI

    gamedev-skills/awesome-gamedev-agent-skills

    Build production Roblox interfaces with ScreenGui/PlayerGui lifecycle, responsive UDim2 layouts, safe insets, reusable editable Instances, cross-device input and selection, restrained motion…

    1.4k GitHub stars~2.9k tokensUpdated 2 days ago
    Auto-check passed
  • AI Behavior Trees Utility AI

    gamedev-skills/awesome-gamedev-agent-skills

    Build a production behavior-tree runtime (Blackboard, action/condition leaves, sequence/selector/parallel composites, decorators) and a Utility AI system (response curves — linear, exponential…

    1.4k GitHub stars~2k tokensUpdated 2 days ago
    Auto-check passed
  • Bevy Ecs

    gamedev-skills/awesome-gamedev-agent-skills

    Structure a Bevy app around its Entity Component System: build the App with plugins, define Component/Resource types, write systems with Query/Res/Commands, filter and order systems, and use the…

    1.4k GitHub stars~2.5k tokensUpdated 2 days ago
    Auto-check passed
  • Card Game

    gamedev-skills/awesome-gamedev-agent-skills

    Build a card game: card data, deck/hand/discard zones, draw/shuffle/reshuffle, a turn structure, costs, and effect resolution.

    1.4k GitHub stars~1.6k tokensUpdated 2 days ago
    Auto-check passed
  • Fps Shooter

    gamedev-skills/awesome-gamedev-agent-skills

    Build a first-person shooter: move+mouse-look controller, hitscan or projectile shooting, weapons, health, and enemy AI.

    1.4k GitHub stars~1.5k tokensUpdated 2 days ago
    Auto-check passed

Works with

Questions about Love2d Core

What does Love2d Core do?

Structure and debug a LÖVE (Love2D) game in Lua: the love.load/update/draw loop, delta-time movement, input, and screen states. Love2d Core is an agent skill from gamedev-skills/awesome-gamedev-agent-skills.load/update/draw loop, delta-time movement, input, and screen states.

When should I use Love2d Core?

Love2d Core fits situations like: building a LÖVE 11.x game (main.lua.

How do I install Love2d Core in Claude Code?

Run `npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill love2d-core -a claude-code`. Or copy the skill folder (skills/other-engines/love2d-core in gamedev-skills/awesome-gamedev-agent-skills) into .claude/skills/love2d-core in your project. Claude Code loads it when a task matches its description.

How do I install Love2d Core in Codex?

Run `npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill love2d-core -a codex`. Or copy the skill folder (skills/other-engines/love2d-core in gamedev-skills/awesome-gamedev-agent-skills) into .agents/skills/love2d-core in your project. Codex loads it when a task matches its description.

Can I use Love2d Core in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill love2d-core -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/love2d-core, .gemini/skills/love2d-core, .github/skills/love2d-core and .opencode/skills/love2d-core in your project.

What does Love2d Core need to run?

SKILL.md names no scripts, command-line tools or credentials: Love2d Core is instructions for the agent only.

Does Love2d Core access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Love2d Core safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Love2d Core use?

Love2d Core is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Love2d Core use?

About 1.6k tokens (SKILL.md is roughly 6.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.2k tokens, read only when the agent opens those files.

What are the alternatives to Love2d Core?

Skills that share tags, products or a category with Love2d Core: Sync Simplegraphic (atty303/pob-web, 103 stars), Dota2 Game Logic (XavierCHN/x-template, 217 stars), Defold Scripts Editing (selimanac/defold-astar, 111 stars) and Monarch Screen Setup (selimanac/defold-astar, 111 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Love2d Core?

gamedev-skills (a GitHub organization) maintains it in gamedev-skills/awesome-gamedev-agent-skills, which has 1,389 GitHub stars. The repository holds 53 skills in this directory. The repository was last updated on October 9, 2026.

Source: gamedev-skills/awesome-gamedev-agent-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.