allow for background-only ("no tile")

This commit is contained in:
synth-ruiner 2017-12-24 18:12:46 +00:00
parent 673edd715d
commit 44ee5b874e
2 changed files with 8 additions and 3 deletions

View File

@ -123,6 +123,13 @@ $(document).ready(function() {
// get tiles // get tiles
bitsyData.tiles = {}; bitsyData.tiles = {};
// tile 0 (background colour only) is implicit in bitsy rather than being stored in the game data
// so, make our own version
bitsyData.tiles[0] = {
name: 0,
bitmap: _.chunk(_.split(_.repeat(0, 64), ''), 8)
};
var tiles = input.match(/TIL (.*)\n([01]{8}\n){8}/g); var tiles = input.match(/TIL (.*)\n([01]{8}\n){8}/g);
if (tiles.length > 0) { if (tiles.length > 0) {

View File

@ -40,15 +40,13 @@ if (src.match(/^(file|https)?:\/\/|^\/\//)) {
## known bugs ## known bugs
* tile 0 (background colour only) is an implicit tile in Bitsy- it's not stored in the game data. so this tool ignores it. oops!!
* when importing game data, create a version of this
* when writing game data, don't write the 0 tile
## to do ## to do
* allow user to save output as image, or tweet it :) *user can currently right-click -> Save As but the 128x128 size is not great* * allow user to save output as image, or tweet it :) *user can currently right-click -> Save As but the 128x128 size is not great*
* create new tiles based on image * create new tiles based on image
* only add unique new tiles * only add unique new tiles
* don't write the 0 tile (implicit background-only tile)
* implement slider (*always use existing tiles* -> *always create new tiles*) (representing 0-64 threshold for # of common pixels) * implement slider (*always use existing tiles* -> *always create new tiles*) (representing 0-64 threshold for # of common pixels)
* re-style the damn thing * re-style the damn thing
* reorganise the page layout for a more logical workflow * reorganise the page layout for a more logical workflow