pixsy/readme.md

69 lines
2.7 KiB
Markdown
Raw Normal View History

2017-12-22 17:22:08 +00:00
# bitsy image to room
## about
a tool for Bitsy. upload any image and convert it into a room.
the room will be added to the game data automatically and you can paste it back into Bitsy.
## thanks
to **Adam LeDoux** for creating the wonderful and inspiring Bitsy
to **J.P. LeBreton** for creating Playscii which was a huge inspiration for this tool
to **Mark Wonnacott** for being relentlessly encouraging and making me want to work even an eighth as hard as them
to **Foliotek** for the **Croppie** image plugin
## contributing
The stylesheet and html are autogenerated; if you want to alter them please edit the pug template or less stylesheet, e.g. from the command line as follows:
`pug index.pug index.html`
2017-12-23 15:54:19 +00:00
2017-12-22 17:22:08 +00:00
`lessc style.less style.css`
`pug` and `less` can be installed via `npm` as follows:
`npm install -g pug-cli`
2017-12-23 15:54:19 +00:00
2017-12-22 17:22:08 +00:00
`npm install -g less`
I had to hack the included Croppie plugin to allow the user to upload images from their own computer without falling foul of CORS restrictions. So the version bundled here is non-standard. It's a one-line change:
```
croppie.js:182 (original)
if (src.match(/^(https)?:\/\/|^\/\//)) {
croppie.js:182 (mine)
if (src.match(/^(file|https)?:\/\/|^\/\//)) {
```
2017-12-24 12:43:48 +00:00
## known bugs
* keyup on game data input sets palette to pal 0 even if game data has not changed
2017-12-24 12:43:48 +00:00
2017-12-22 17:22:08 +00:00
## to do
2017-12-24 10:50:30 +00:00
* allow user to save output as image, or tweet it :) *user can currently right-click -> Save As but the 128x128 size is not great*
2017-12-23 15:54:19 +00:00
* create new tiles based on image
2017-12-24 10:50:30 +00:00
* only add unique new tiles
2017-12-24 18:12:46 +00:00
* don't write the 0 tile (implicit background-only tile)
2017-12-23 15:54:19 +00:00
* implement slider (*always use existing tiles* -> *always create new tiles*) (representing 0-64 threshold for # of common pixels)
* re-style the damn thing
2017-12-22 17:22:08 +00:00
* reorganise the page layout for a more logical workflow
2017-12-23 00:57:25 +00:00
* handle animated tiles?
2017-12-23 15:54:19 +00:00
* profile script performance and optimise where most needed
2017-12-23 16:46:15 +00:00
* make brightness slider trigger redraw every so often while being dragged, instead of waiting until drag stop
2017-12-22 17:22:08 +00:00
## could do
2017-12-23 15:54:19 +00:00
* add some more palettes?
* add some alternate default tiles? something more useful e.g. dithered gradients?
2017-12-22 17:22:08 +00:00
* add dithering options
* add camera support so users can take a pic instead of uploading an image
2017-12-22 19:46:27 +00:00
* add a 'smoothing' stage to remove errant pixels
* allow user to add palettes to game data
2017-12-23 16:15:07 +00:00
* allow user to draw to canvas
2017-12-24 11:16:26 +00:00
* do a 'branching tree' approach to finding the closest tile? i.e. create a 1x1, 2x2, 4x4 version of each tile, so all the broadly darker tiles will sit under '0' and lighter tiles under '1', then tiles that are lighter at the top will sit under '1100', etc... I'm not sure how much more effective this will be or whatever it will give better/faster results but it's worth a try
* give heavier weighting to edge pixels when finding a matching tile? (thanks Mark)