https://github.com/zfedoran/pixel-sprite-generator
JavaScript procedural sprite generator
https://github.com/zfedoran/pixel-sprite-generator
Last synced: 4 months ago
JSON representation
JavaScript procedural sprite generator
- Host: GitHub
- URL: https://github.com/zfedoran/pixel-sprite-generator
- Owner: zfedoran
- License: mit
- Created: 2014-11-23T17:45:13.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2021-09-03T17:59:46.000Z (almost 5 years ago)
- Last Synced: 2025-04-02T03:49:59.823Z (about 1 year ago)
- Language: JavaScript
- Size: 546 KB
- Stars: 601
- Watchers: 38
- Forks: 56
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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](http://plnkr.co/edit/Dji8rljS0yDL16Ao8Iq6?p=preview)
## Installation
#### Using Bower
If you have [bower](http://bower.io/) 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](https://www.npmjs.org/) 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](https://github.com/tobbel/pixel-sprite-generator) port by [tobbel](https://github.com/tobbel)
- Haxe [Zielak/pixel-sprite-generator](https://github.com/Zielak/pixel-sprite-generator) port by [Zielak](https://github.com/Zielak)
- C# [BenMcLean/Pixel-Sprite-Generator-CSharp](https://github.com/BenMcLean/Pixel-Sprite-Generator-CSharp) port by [BenMcLean](https://github.com/BenMcLean)
- libGDX [BenMcLean/pixel-sprite-generator-libgdx](https://github.com/BenMcLean/pixel-sprite-generator-libgdx) port by [BenMcLean](https://github.com/BenMcLean)
- Unity3d [Shogan/PixelSpriteGenerator-Unity](https://github.com/Shogan/PixelSpriteGenerator-Unity) port by [Shogan](https://github.com/Shogan)
- Node.js [blipn/pixel-sprite-generator-nodejs](https://github.com/blipn/pixel-sprite-generator-nodejs) port by [blipn](https://github.com/blipn)
- Node.js/Browser [seiyria/mixel](https://github.com/seiyria/mixel) port by [seiyria](https://github.com/seiyria)
- Rust [tversteeg/sprite-gen](https://github.com/tversteeg/sprite-gen) port (with editor) by [tversteeg](https://github.com/tversteeg)
- OCaml [fccm/px_sprite_gen](https://github.com/fccm/px_sprite_gen) port by [Florent Monnier](https://github.com/fccm)
- Python [MaartenGr/Sprite-Generator](https://github.com/MaartenGr/Sprite-Generator) port by [MaartenGr](https://github.com/MaartenGr)
## Similar Projects
- Sprator [yurkth/sprator](https://github.com/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.
The algorithm is explained in more detail on [Dave Bollinger's](http://web.archive.org/web/20080228054410/http://www.davebollinger.com/works/pixelspaceships/) website.