Removed not needed files and changed the styling of the game

This commit is contained in:
Patryk Hegenberg 2023-01-10 13:55:01 +01:00
parent 6867a03a7c
commit 456a66f3e8
8 changed files with 18 additions and 35 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 694 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 863 B

After

Width:  |  Height:  |  Size: 3.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 891 KiB

View file

@ -11,37 +11,30 @@
// It's the "microrogue" tileset // It's the "microrogue" tileset
const tileSet = document.createElement("img"); const tileSet = document.createElement("img");
tileSet.src = "./../images/colored_tilemap_packed.png"; tileSet.src = "./../images/16x16DungeonTileset.png";
const tileOptions = { const tileOptions = {
layout: "tile", layout: "tile",
bg: "transparent", bg: "transparent",
tileWidth: 8, tileWidth: 16,
tileHeight: 8, tileHeight: 16,
tileSet: tileSet, tileSet: tileSet,
tileMap: { tileMap: {
"@": [40, 0], // player "@": [144, 224], // player
".": [32, 32], // floor ".": [32, 48], // floor
"M": [88, 0], // monster "M": [32, 160], // monster
"*": [72, 24], // treasure chest "g": [272, 144], // gold
"g": [64, 40], // gold "p": [192, 176], // potion
"x": [56, 32], // axe "T": [112, 160], // tombstone
"p": [56, 64], // potion "╔": [336, 160], // room corner
"a": [40, 32], // tree 1 "╗": [368, 160], // room corner
"b": [32, 40], // tree 2 "╝": [368, 192], // room corner
"c": [40, 40], // tree 3 "╚": [336, 192], // room corner
"d": [48, 40], // tree 4 "═": [352, 160], // room edge
"e": [56, 40], // tree 5 "║": [336, 176], // room edge
"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
"o": [40, 72], // room corner "o": [40, 72], // room corner
"D": [16, 16], //Door to win "D": [16, 16], //Door to win
"s": [32, 24], //stairs to next Stage "s": [288, 112], //stairs to next Stage
}, },
width: 25, width: 25,
height: 40, height: 40,
@ -50,11 +43,11 @@
//const usePointer = true; //const usePointer = true;
//const useArrows = true; //const useArrows = true;
const touchOffsetY = -20; // move the center by this much 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 const turnLengthMS = 200; // shortest time between turns
// these map tiles are walkable // 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 // these map tiles should not be replaced by room edges
const noreplace = walkable.concat(["M", "╔", "╗", "╚", "╝", "═", "║"]); const noreplace = walkable.concat(["M", "╔", "╗", "╚", "╝", "═", "║"]);
@ -226,7 +219,6 @@
digger.create(digCallback.bind(game)); digger.create(digCallback.bind(game));
generateItems(game, freeCells); generateItems(game, freeCells);
generateScenery(game.map, zeroCells);
generateRooms(game.map, digger); generateRooms(game.map, digger);
game.player = createBeing(makePlayer, freeCells); game.player = createBeing(makePlayer, freeCells);
@ -273,15 +265,6 @@
return [x, y]; 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) { function generateRooms(map, mapgen) {
const rooms = mapgen.getRooms(); const rooms = mapgen.getRooms();
for (let rm = 0; rm < rooms.length; rm++) { for (let rm = 0; rm < rooms.length; rm++) {