Home

Awesome

pixel-sprite-generator

Haxe port of Pixel Sprite Generator by zfedoran.

Live Example

SWF - https://pub.darekgreenly.com/github/pixel-sprite-generator/PixelSpriteGenerator.swf

HTML/JS - https://pub.darekgreenly.com/github/pixel-sprite-generator/index.html

<img src="https://raw.githubusercontent.com/Zielak/pixel-sprite-generator/master/doc/screenshot.png">

Installation

Using Haxelib

haxelib install pixel-sprite-generator

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>