diff --git a/images/16x16DungeonTileset.png b/images/16x16DungeonTileset.png new file mode 100644 index 0000000..e27952e Binary files /dev/null and b/images/16x16DungeonTileset.png differ diff --git a/images/annie-spratt-ORDz1m1-q0I-unsplash.jpg b/images/annie-spratt-ORDz1m1-q0I-unsplash.jpg deleted file mode 100644 index 325c07d..0000000 Binary files a/images/annie-spratt-ORDz1m1-q0I-unsplash.jpg and /dev/null differ diff --git a/images/annie-spratt-Y-JCyxFMXbc-unsplash.jpg b/images/annie-spratt-Y-JCyxFMXbc-unsplash.jpg deleted file mode 100644 index 898fa79..0000000 Binary files a/images/annie-spratt-Y-JCyxFMXbc-unsplash.jpg and /dev/null differ diff --git a/images/claudio-schwarz-um3hiJN6f2c-unsplash.jpg b/images/claudio-schwarz-um3hiJN6f2c-unsplash.jpg deleted file mode 100644 index 1cc5b4c..0000000 Binary files a/images/claudio-schwarz-um3hiJN6f2c-unsplash.jpg and /dev/null differ diff --git a/images/gayatri-malhotra-4wF66_KWJxA-unsplash.jpg b/images/gayatri-malhotra-4wF66_KWJxA-unsplash.jpg deleted file mode 100644 index 66b4005..0000000 Binary files a/images/gayatri-malhotra-4wF66_KWJxA-unsplash.jpg and /dev/null differ diff --git a/images/icon.png b/images/icon.png index 49ff694..2c08510 100644 Binary files a/images/icon.png and b/images/icon.png differ diff --git a/images/michal-matlon-4ApmfdVo32Q-unsplash.jpg b/images/michal-matlon-4ApmfdVo32Q-unsplash.jpg deleted file mode 100644 index d41ddaf..0000000 Binary files a/images/michal-matlon-4ApmfdVo32Q-unsplash.jpg and /dev/null differ diff --git a/scripts/game.js b/scripts/game.js index 3d0d138..739e760 100644 --- a/scripts/game.js +++ b/scripts/game.js @@ -11,37 +11,30 @@ // It's the "microrogue" tileset const tileSet = document.createElement("img"); - tileSet.src = "./../images/colored_tilemap_packed.png"; + tileSet.src = "./../images/16x16DungeonTileset.png"; const tileOptions = { layout: "tile", bg: "transparent", - tileWidth: 8, - tileHeight: 8, + tileWidth: 16, + tileHeight: 16, tileSet: tileSet, tileMap: { - "@": [40, 0], // player - ".": [32, 32], // floor - "M": [88, 0], // monster - "*": [72, 24], // treasure chest - "g": [64, 40], // gold - "x": [56, 32], // axe - "p": [56, 64], // potion - "a": [40, 32], // tree 1 - "b": [32, 40], // tree 2 - "c": [40, 40], // tree 3 - "d": [48, 40], // tree 4 - "e": [56, 40], // tree 5 - "T": [72, 56], // tombstone - "╔": [0, 72], // room corner - "╗": [24, 72], // room corner - "╝": [72, 72], // room corner - "╚": [48, 72], // room corner - "═": [8, 72], // room edge - "║": [32, 72], // room edge + "@": [144, 224], // player + ".": [32, 48], // floor + "M": [32, 160], // monster + "g": [272, 144], // gold + "p": [192, 176], // potion + "T": [112, 160], // tombstone + "╔": [336, 160], // room corner + "╗": [368, 160], // room corner + "╝": [368, 192], // room corner + "╚": [336, 192], // room corner + "═": [352, 160], // room edge + "║": [336, 176], // room edge "o": [40, 72], // room corner "D": [16, 16], //Door to win - "s": [32, 24], //stairs to next Stage + "s": [288, 112], //stairs to next Stage }, width: 25, height: 40, @@ -50,11 +43,11 @@ //const usePointer = true; //const useArrows = true; const touchOffsetY = -20; // move the center by this much - const scaleMonitor = 6; // scale computer screens by this much + const scaleMonitor = 3; // scale computer screens by this much const turnLengthMS = 200; // shortest time between turns // these map tiles are walkable - const walkable = [".", "*", "g", "D", "s"]; + const walkable = [".", "g", "D", "s"]; // these map tiles should not be replaced by room edges const noreplace = walkable.concat(["M", "╔", "╗", "╚", "╝", "═", "║"]); @@ -226,7 +219,6 @@ digger.create(digCallback.bind(game)); generateItems(game, freeCells); - generateScenery(game.map, zeroCells); generateRooms(game.map, digger); game.player = createBeing(makePlayer, freeCells); @@ -273,15 +265,6 @@ return [x, y]; } - function generateScenery(map, freeCells) { - for (let i = 0; i < 100; i++) { - if (freeCells.length) { - const key = takeFreeCell(freeCells); - map[key] = ROT.RNG.getItem("abcde"); - } - } - } - function generateRooms(map, mapgen) { const rooms = mapgen.getRooms(); for (let rm = 0; rm < rooms.length; rm++) {