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
- Dart tobbel/pixel-sprite-generator port by tobbel
- Haxe Zielak/pixel-sprite-generator port by Zielak
- C# BenMcLean/Pixel-Sprite-Generator-CSharp port by BenMcLean
- libGDX BenMcLean/pixel-sprite-generator-libgdx port by BenMcLean
- Unity3d Shogan/PixelSpriteGenerator-Unity port by Shogan
- Node.js blipn/pixel-sprite-generator-nodejs port by blipn
- Node.js/Browser seiyria/mixel port by seiyria
- Rust tversteeg/sprite-gen port (with editor) by tversteeg
- OCaml fccm/px_sprite_gen port by Florent Monnier
- Python MaartenGr/Sprite-Generator port by MaartenGr
Similar Projects
- Sprator yurkth/sprator
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>