Giter VIP home page Giter VIP logo

img2gb's Introduction

img2gb - Converts Images to GameBoy Tileset and Tilemap

GitHub Lint and Tests PYPI Version License Discord Black

img2gb generates GameBoy Tilesets and Tilemaps from standard image (PNG, JPEG,...). It converts the images into the GameBoy image format and generates C code (.c and .h files) that can be used in GameBoy projects.

image

Dependencies

  • Python >= 3.8
  • Pillow >= 5.0

Install

Usage

Hacking

Setup

To work on img2gb first create a virtualenv:

python3 -m venv __env__

and activate it:

source __env__/bin/activate

Then install the project with all dev dependencies:

pip install -e .[dev]

Commands

You can lint the code and check coding style with:

nox -s lint

You can fix coding style using Black with:

nox -s black_fix

You can run test on all supported Python versions or on a specific Python version with:

nox -s test       # Run on all Python version

nox -s test-3.8   # Run on Python 3.8
nox -s test-3.9   # Run on Python 3.9
nox -s test-3.10  # Run on Python 3.10
nox -s test-3.11  # Run on Python 3.11
nox -s test-3.12  # Run on Python 3.12

And you can build the documentation with (result in build/html/):

nox -s gendoc

Support this project

Want to support this project?

Changelog

  • [NEXT] (changes on master, but not released yet):
    • Nothing yet ;)
  • v1.2.0:
    • fix: Fixed wrong version displayed (@flozz, #3)
    • chore: Added Python 3.11 and 3.12 support
    • chore!: Removed Python 2.7 and 3.7 support
  • v1.1.0:
    • Removes arbitrary size limit for tilmaps
    • Implements offset option (#2)
  • v1.0.0:
    • Refacto of the Python API, with new high-level fuction to be easier to use
    • Refacto of the CLI: now tileset and tilemap are generated separately, this allow more options for both and covers more usecases.
    • New option to handle alternative palette
    • New option to handle 8x16px sprites
    • Documentation
    • Unit test (everything is not coverd but it is better than nothing :))
  • v0.10.0: Adds non-RGB image support (indexed images,...)
  • v0.9.1: Fixes an issue with Python 3
  • v0.9.0: Initial release (generates tiles, tilesets and tilemaps)

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.