Giter Site home page Giter Site logo

crunk's Introduction

Crunk: Missing Libs for Lua and Playdate

Introduction

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.

Components:

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 - Queue
    • crunk.ds.deque - Deque (Double Ended Queue)
    • crunk.ds.stack - Stack
    • crunk.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)

Types

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.

Giving Thanks

If you find this software useful, please consider:

  1. Sponsoring me on GitHub
  2. Purchasing something from my Itch Store
  3. Sending me free copies of your Playdate apps using Crunk.

License

MIT License

Copyright 2023 Peter Tripp

See LICENSE for full terms.

3rd Party Licenses

crunk's People

Contributors

notpeter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.