GithubHelp home page GithubHelp logo

godotboy's Introduction

Godotboy

A monochromatic posterisation shader with a customisable palette.

Demo

About

A while back I was participating in the yearly GBJAM, which requires entrants to make a game either for or with the same limitations as the Nintendo Game Boy:

  • A virtual resolution of 160x144
  • A palette of 4 distinct colours

While it would be simple enough to just draw the graphics using 4 colours and call it a day, I wanted more flexibility. So I started work on a shader solution.

Usage

The repo contains a demo project that indicates how the shader ought to be used. This demo project also makes a great start for any GBJam submissions written using the Godot engine, since all of the project and import options have been preconfigured.

In general, the shader should be applied as a material to a ColorRect node placed above all objects in the scene, which can be achieved by making it the child of a CanvasLayer. Then a palette texture needs to be set, which can be done through the editor.

If you want to change the default palette at runtime, you can do so by accessing the shader params of the node that has the associated shader material through a suitable script.

For best results, all art assets should be in greyscale with evenly spaced red, green and blue values. This will ensure a more accurate conversion to the chosen palette.

This shader is intended for 2D games using low resolution pixel art graphics, but is helpful in making 3D games also.

Features

  • Support for up to 256 distinct colours
  • Full posterisation step to allow for conversion of non-pixel-art textures
  • Automatic greyscale conversion using the luminosity method

License

See LICENSE for more details.

godotboy's People

Stargazers

 avatar Yi Chen Hock avatar Aphiwad Chhoeun avatar Agnis Aldiņš "NeZvērs" avatar  avatar Márton Mészáros avatar Mauricio avatar  avatar George L. Albany avatar

Watchers

James Cloos avatar Callum John avatar Agnis Aldiņš "NeZvērs" avatar

Forkers

boyquotes

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.