Crunk is a collection of open source Lua and C snippets and libraries to assist in Lua app/game development for Playdate.
The code is designed to be simple, modular and permissively licensed.
This means you if you want a Set
data structure you can
just copy set.lua
into your project,
import "set.lua"
(PlayDate Lua) or Set = require "set.lua"
(Lua)
and away you go.
Where possibel, each Lua file stands alone. In order to support both
PUC-Lua and Playdate-Lua our Lua files support both
require
and import
mechanisms but use neither themselves.
Mixed C/Lua:
- crunk/qrcode - Fast QR Code generation (70x faster than PlayDate SDK)
crunk.qrcode.generate(text)
crunk.qrcode.generate(text, ecc_level, mask, min_version, max_version)
Pure Lua:
- crunk/image_format - Convert Playdate images to text for debugging.
crunk.image.format_ascii
crunk.image.format_color
crunk.image.format_blocks
- crunk/ds - Simple queue-like data structures for Lua
crunk.ds.queue
- Queuecrunk.ds.deque
- Deque (Double Ended Queue)crunk.ds.stack
- Stackcrunk.ds.set
- Set
- crunk/math - Math Helper functions
Pure C:
- crunk/pd_pixel - C macros for working with individual Playdate LCDImage pixels.
- crunk/pd_print - C macros for printing and logging to console (pd_print, pd_error, pd_debug)
Wherever possible we include LuaCATS types for use with the Lua Language Server so VSCode/NeoVim get offer autocompletion and static analysis.
Please configure playdate-luacats for the best experience with this.
If you find this software useful, please consider:
- Sponsoring me on GitHub
- Purchasing something from my Itch Store
- Sending me free copies of your Playdate apps using Crunk.
MIT License
Copyright 2023 Peter Tripp
See LICENSE for full terms.
- qrcodegen (MIT) - Copyright Project Nayuki
- pd_pixel.h (Unknown) - Copyright Dustin Mierau