A simple project skeleton for LÖVE games that takes inspiration from Godot. It's geared toward low-spec 2D pixel-art games, and includes libraries and assets to get you up and running as soon as you fork the repo.
To see the demo, run this repo as a LÖVE project. You can safely delete the entire demo folder and the line Demo:run(root, Demo.basic) in main.lua.
This project is thoroughly annotated and documented with Lua Language Server annotations, which help tremendously for diagnostics, autocompletion, and opt-in type safety. If your environment doesn't support LLS, you can safely remove comments like ---@class, ---@field, etc, to make the code less noisy.
Important
For further info and examples, read the documentation on each module's source files.
Node is the building block for every ingame object. Nodes can have other Nodes as children, which are updated and drawn automatically, forming a tree structure.
Signal implements the observer pattern, making communication between Nodes easy and loosely-coupled.
Hitbox is a Node wrapper around bump that makes it easy to detect and resolve collisions.
See also the singletons for accessing and changing game-wide state: Input, Window, Debug and Camera.
Libraries for common operations. Submodules are included for:
- anim8 - Easily transforms spritesheets into animated objects.
- baton - Abstracts raw inputs into "actions" which can then be checked, altered or replaced.
- batteries - A better "standard library" for LÖVE games. Has utilities for math, sequencing, timing, vectors and more.
- bump - Collision detection and resolution for axis-aligned bounding boxes (AABBs).
- classic - Tiny, battle-tested class module for object orientation.
- gamera - A camera system.
- hump - General-purpose utilities for LÖVE. This template mostly uses it for its timing and tweening functions.
- inspect - Renders tables in a human-readable way.
- log.lua - A tiny logging module.
- moses - An "utility belt" for functional programming; makes it much easier to operate upon tables.
- push - Easy window resolution handling.
This is where static resources - data that doesn't change during the game - should go. Images, audio, fonts, but also things like Lua tables and Tiled maps.
Included collections:
data/collections/animations.lua- Preloadedanim8animations ready to use, mainly a player character.data/collections/colors.lua- A set of basic colors, plus this project's palette of choice, Bubblegum 16.data/collections/fonts.lua- 3 basic pixel fonts for varying purposes.data/collections/images.lua- Placeholder pixel graphics for different occasions, from Kenney's Micro Roguelike pack, already loaded as LÖVE images.data/collections/sounds.lua- Placeholder sound effects for different occasions, from various Kenney packs, already loaded as LÖVE sources.
To cut down on repeated requires, several globals are provided by default. They can be safely disabled by removing the line require("globals") from main.lua.
See a full list in globals.lua.
Issues, pull requests and suggestions are welcome. You can poke me in the LÖVE Discord server.
Original code and assets have a MIT License, see LICENSE.md for details.
All libraries and their licenses have been included as-is (see /lib/).
Please preserve the credits.txt file, as some assets require attribution.


