Home

Awesome

pixel-sprite-generator

JavaScript implementation of a procedural pixel sprite generator similar to the old days of video game sprites. The sprites are algorithmically generated by combinatorial methods.

Live Example

http://plnkr.co/edit/Dji8rljS0yDL16Ao8Iq6?p=preview

<a href="http://plnkr.co/edit/Dji8rljS0yDL16Ao8Iq6?p=preview"><img src="https://github.com/zfedoran/pixel-sprite-generator/raw/master/doc/screenshot.png"></a>

Installation

Using Bower

If you have bower installed, you can add the pixel-sprite-generator to your project using the following command.

bower install pixel-sprite-generator

Using NPM

If you have npm installed, you can add the pixel-sprite-generator to your project using the following command.

npm install pixel-sprite-generator

Ports/Other Languages

Similar Projects

Algorithm

The sprites are generated by using a two dimensional mask. The values in the mask are then randomized and mirrored. The resulting template is rendered to a canvas element.

<a href="http://web.archive.org/web/20080228054410/http://www.davebollinger.com/works/pixelspaceships/"><img src="https://github.com/zfedoran/pixel-sprite-generator/raw/master/doc/algorithm-1.png"></a>

The algorithm is explained in more detail on Dave Bollinger's website.

<a href="http://web.archive.org/web/20080228054410/http://www.davebollinger.com/works/pixelspaceships/"><img src="https://github.com/zfedoran/pixel-sprite-generator/raw/master/doc/algorithm-0.png"></a>