updated tiles

This commit is contained in:
2025-11-28 15:42:42 +01:00
parent 038fbb14db
commit 02066640e2
40 changed files with 105 additions and 9 deletions

3
.gitignore vendored
View File

@@ -1,5 +1,7 @@
### IntelliJ IDEA ###
out/
.idea/
*.iml
!**/src/main/**/out/
!**/src/test/**/out/
.kotlin
@@ -25,7 +27,6 @@ bin/
### VS Code ###
.vscode/
.idea/
### Mac OS ###
.DS_Store

50
assets/maps/testmap2.map Normal file
View File

@@ -0,0 +1,50 @@
12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12
12 12 12 12 12 12 12 12 12 12 12 12 12 12 13 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12
12 12 12 12 12 12 12 13 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 13 12 12 12 12 12 12 12 13 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12
12 12 12 12 13 12 12 12 12 12 12 13 12 12 12 12 12 12 13 12 12 12 12 12 12 12 12 13 12 12 12 12 12 12 12 12 12 12 12 12 12 13 12 12 12 12 12 12 12 12
12 12 12 12 12 12 12 12 12 13 12 12 12 12 12 13 12 12 12 12 12 12 12 13 12 12 12 12 12 12 12 13 12 12 13 12 12 12 13 12 12 12 12 12 12 12 12 12 12 12
12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 13 12 12 12 12 12 12 12 13 12 12 12 12 12 12 13 12 12 12 12 12 12 13 12 12 12 12 12 12
12 12 12 12 12 13 22 20 20 20 20 20 20 20 23 12 12 12 22 20 20 20 20 20 20 20 20 23 12 12 12 22 20 20 20 20 20 20 20 20 20 20 23 12 12 12 12 12 12 12
12 12 12 12 12 12 18 41 40 40 40 40 40 41 19 20 20 20 21 41 10 10 11 10 10 10 10 19 20 20 20 21 41 10 35 33 33 33 33 33 33 36 17 12 12 13 12 12 12 12
12 12 13 12 12 12 18 41 40 39 39 39 40 41 41 41 41 41 41 41 10 14 15 15 15 16 10 41 41 41 41 41 41 41 31 26 26 26 26 26 26 30 17 12 12 12 12 12 12 12
12 12 12 12 12 12 18 41 40 39 39 39 40 41 41 41 41 41 41 41 10 17 12 12 12 18 10 41 41 41 41 41 41 41 31 26 26 26 26 26 26 30 17 12 12 12 12 12 12 12
12 12 12 13 12 12 18 41 40 39 39 39 40 41 41 41 41 41 41 41 10 17 12 12 12 18 11 41 41 41 41 41 41 41 31 26 26 26 26 26 26 30 17 12 13 12 12 12 12 12
12 12 12 12 13 12 18 41 40 39 39 39 40 41 41 41 41 41 41 41 10 19 20 20 20 21 10 41 41 41 41 41 41 41 31 26 26 26 26 26 26 30 17 12 12 12 12 12 12 12
12 12 12 12 12 12 18 41 40 40 39 40 40 41 41 41 41 41 41 41 11 10 35 33 36 10 10 41 41 41 41 41 41 41 37 28 28 29 26 27 28 38 17 13 12 12 12 12 12 12
12 12 12 12 12 12 18 41 41 41 10 41 41 41 41 41 41 41 41 41 41 41 31 26 30 41 41 41 41 41 41 41 41 41 41 41 41 31 26 30 14 15 25 12 12 12 12 12 12 12
12 12 12 12 13 12 18 41 41 41 10 41 41 41 41 41 41 41 41 41 41 41 31 26 30 41 41 41 41 41 41 41 41 41 41 41 41 31 26 30 17 12 12 12 12 13 12 12 12 12
12 12 12 12 12 12 24 15 16 41 10 41 41 41 41 41 41 41 41 41 41 41 31 26 30 41 41 41 41 41 41 41 41 41 41 41 41 31 26 30 17 12 12 12 12 12 12 12 12 12
12 12 12 12 12 12 12 12 18 41 10 41 41 41 41 41 41 41 41 41 41 41 31 26 30 41 41 41 41 41 41 41 41 41 41 41 41 31 26 30 17 12 12 12 12 12 13 12 12 12
12 12 13 12 12 12 12 22 21 41 10 41 41 41 41 41 41 41 41 41 41 41 31 26 30 41 41 41 41 41 41 41 41 41 41 35 33 34 26 30 17 12 12 13 12 12 12 12 12 12
12 12 12 12 12 12 12 18 10 10 10 41 41 41 41 41 41 41 41 41 41 41 31 26 30 41 41 41 41 41 41 41 41 41 41 31 26 26 26 30 17 12 12 12 12 12 12 12 12 12
12 12 12 13 12 12 12 18 10 41 41 41 41 41 41 41 41 41 41 41 41 10 31 26 30 10 41 41 41 41 41 41 41 41 41 31 26 27 28 38 17 12 13 12 12 12 12 12 12 12
12 12 12 12 12 12 12 18 10 41 41 41 10 35 33 33 33 33 33 33 33 33 34 26 32 33 33 33 33 33 33 33 33 33 33 34 26 30 10 41 17 12 12 12 12 12 12 12 12 12
12 12 12 12 12 13 12 18 10 41 41 41 11 31 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 30 10 14 25 12 12 12 12 12 12 12 12 12
12 12 12 12 12 12 13 18 10 10 41 41 10 37 28 28 28 28 28 28 28 28 29 26 27 28 28 28 28 28 28 28 28 28 28 29 26 30 10 17 12 13 12 12 12 12 12 12 12 12
12 12 12 12 12 12 12 24 16 10 41 41 10 41 41 41 41 41 41 41 41 10 31 26 30 10 41 41 41 41 41 41 41 41 41 31 26 30 10 17 12 12 12 12 13 12 12 12 12 12
12 12 12 12 12 12 12 12 18 10 41 41 10 41 41 41 41 41 41 41 41 41 31 26 30 41 41 41 41 41 41 41 41 41 41 31 26 30 11 17 12 12 12 12 12 12 12 12 12 12
12 12 12 12 12 13 12 22 21 10 41 41 10 10 10 41 41 41 41 41 41 41 31 26 30 41 41 41 41 41 41 41 41 41 41 31 26 30 10 17 12 12 12 13 12 12 12 12 12 12
12 12 12 12 12 12 12 18 10 10 41 41 41 41 10 41 41 41 41 41 41 41 31 26 30 41 41 41 41 41 41 41 41 41 41 31 26 30 10 17 12 12 12 12 12 12 12 12 12 12
12 12 12 13 12 12 12 18 10 41 41 41 41 41 10 41 41 41 41 41 41 41 31 26 30 41 41 10 41 41 41 41 41 41 41 31 26 30 10 17 12 13 12 12 12 12 12 12 12 12
12 12 12 12 12 12 12 18 10 41 41 41 41 41 10 41 41 41 41 41 41 41 31 26 30 41 41 41 41 41 10 41 41 41 41 31 26 30 10 17 12 12 12 12 12 12 12 12 12 12
12 12 12 12 12 12 13 18 10 10 10 10 10 10 10 41 41 41 41 41 41 41 31 26 30 41 41 41 41 41 10 41 41 41 41 37 28 38 10 17 12 12 12 12 13 12 12 12 12 12
12 12 12 12 12 12 12 18 10 10 11 10 10 10 10 41 41 41 41 41 41 41 31 26 30 41 41 41 41 41 41 41 41 41 41 41 10 41 14 25 12 12 13 12 12 12 12 12 12 12
12 12 12 12 12 12 12 24 16 10 10 10 10 10 10 41 41 41 41 41 41 41 31 26 30 41 41 41 41 41 41 41 41 41 41 10 10 10 17 12 12 12 12 12 12 12 12 12 12 12
12 12 12 12 12 13 12 12 18 10 10 10 10 11 10 41 41 41 41 41 41 41 31 26 30 41 41 41 41 41 41 41 41 41 41 10 10 10 17 12 12 12 12 12 12 12 13 12 12 12
12 12 12 12 12 12 12 12 18 11 10 10 10 10 10 41 41 41 41 41 41 41 31 26 30 41 41 41 41 41 41 41 41 41 41 10 10 11 17 12 12 13 12 12 12 12 12 12 12 12
12 12 12 12 12 12 12 12 18 10 10 10 10 10 10 41 41 41 41 41 41 41 31 26 30 41 41 41 41 41 41 41 41 41 41 10 10 10 17 12 12 12 12 12 12 12 12 12 12 12
12 12 12 12 13 12 12 22 21 41 41 41 41 41 41 41 41 41 41 41 41 41 37 28 38 41 41 41 41 41 41 41 41 41 41 11 10 10 19 23 12 12 12 12 12 12 12 12 12 12
12 12 12 12 12 12 12 18 41 41 41 41 41 41 41 41 41 41 41 10 10 10 10 10 10 10 10 41 41 41 41 41 41 41 10 10 10 10 10 19 23 12 12 12 13 12 12 12 12 12
12 12 12 12 12 12 13 18 41 41 41 41 41 41 41 41 41 41 10 10 10 10 10 10 10 10 10 10 41 41 10 41 41 10 10 10 10 10 10 10 17 12 12 12 12 12 12 12 12 12
12 12 12 12 12 12 12 18 10 41 41 41 41 41 41 41 41 41 10 11 10 10 10 10 10 11 10 10 41 41 41 41 10 10 10 10 10 11 10 10 17 12 13 12 12 12 12 12 12 12
12 12 12 12 12 12 12 18 10 41 41 41 41 10 41 41 41 41 10 10 11 10 10 10 10 10 10 10 10 41 41 41 10 10 10 10 10 41 10 10 17 12 12 12 12 12 12 12 12 12
12 12 13 12 12 12 12 18 10 41 41 41 41 41 41 41 41 41 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 41 10 10 10 10 10 17 12 12 12 12 13 12 12 12 12
12 12 12 12 12 12 12 18 10 41 41 41 41 10 41 14 15 15 16 10 10 10 10 10 11 10 10 14 15 15 16 10 10 10 10 10 10 10 11 10 17 12 12 12 12 12 12 13 12 12
12 12 12 12 12 12 12 18 41 41 41 41 41 41 14 25 12 12 24 16 10 10 10 10 10 10 14 25 12 12 18 10 10 41 10 10 41 10 10 10 17 12 12 12 12 12 12 12 12 12
12 12 12 12 13 12 12 24 15 15 15 15 15 15 25 12 12 12 12 24 15 15 15 15 15 15 25 12 13 12 24 16 10 11 10 10 10 10 14 15 25 12 13 12 12 12 12 12 12 12
12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 13 12 12 12 12 12 12 12 12 12 12 12 12 24 15 15 15 15 15 15 25 12 12 12 12 12 12 12 13 12 12 12
12 12 12 12 12 12 12 12 12 12 12 13 12 12 12 12 13 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 13 12 12 12 12 12 12 13 12 12 12 12 12 12
12 12 12 12 12 12 13 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 13 12 12 12 12 13 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12
12 12 12 12 12 12 12 12 12 12 12 12 12 12 13 12 12 12 12 12 13 12 12 12 12 12 12 12 12 12 12 12 13 12 12 12 12 12 12 13 12 12 12 12 12 12 12 12 12 12
12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 13 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 13 12 12 12 12
12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12

Binary file not shown.

Before

Width:  |  Height:  |  Size: 614 B

After

Width:  |  Height:  |  Size: 6.0 KiB

BIN
assets/tiles/floor01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 616 B

BIN
assets/tiles/grass00.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

BIN
assets/tiles/grass01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

BIN
assets/tiles/hut.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

BIN
assets/tiles/road00.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

BIN
assets/tiles/road01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

BIN
assets/tiles/road02.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

BIN
assets/tiles/road03.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
assets/tiles/road04.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
assets/tiles/road05.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
assets/tiles/road06.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
assets/tiles/road07.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

BIN
assets/tiles/road08.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

BIN
assets/tiles/road09.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

BIN
assets/tiles/road10.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

BIN
assets/tiles/road11.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

BIN
assets/tiles/road12.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

BIN
assets/tiles/table01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 619 B

BIN
assets/tiles/water00.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

BIN
assets/tiles/water01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
assets/tiles/water02.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

BIN
assets/tiles/water03.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

BIN
assets/tiles/water04.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

BIN
assets/tiles/water05.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

BIN
assets/tiles/water06.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

BIN
assets/tiles/water07.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
assets/tiles/water08.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

BIN
assets/tiles/water09.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

BIN
assets/tiles/water11.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

BIN
assets/tiles/water12.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

BIN
assets/tiles/water13.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

@@ -18,10 +18,10 @@ public class TileManager {
public TileManager(GamePanel panel) {
this.panel = panel;
tile = new Tile[10];
tile = new Tile[50];
mapTileNum = new int[panel.maxWorldCol][panel.maxWorldRow];
getTileImage();
loadMap("testworld");
loadMap("testmap2");
}
public void initializeTile(int i, String name, boolean col) {
@@ -35,12 +35,57 @@ public class TileManager {
}
public void getTileImage() {
initializeTile(0, "grass", false);
initializeTile(1, "wall", true);
initializeTile(2, "water", true);
initializeTile(3, "earth", false);
initializeTile(4, "tree", true);
initializeTile(5, "sand", false);
// PLACEHOLDER
initializeTile(0, "grass00", false);
initializeTile(2, "grass00", false);
initializeTile(3, "grass00", false);
initializeTile(4, "grass00", false);
initializeTile(5, "grass00", false);
initializeTile(6, "grass00", false);
initializeTile(7, "grass00", false);
initializeTile(8, "grass00", false);
initializeTile(9, "grass00", false);
// GRASS
initializeTile(10, "grass00", false);
initializeTile(11, "grass01", false);
// WATER
initializeTile(12, "water00", true);
initializeTile(13, "water01", true);
initializeTile(14, "water02", true);
initializeTile(15, "water03", true);
initializeTile(16, "water04", true);
initializeTile(17, "water05", true);
initializeTile(18, "water06", true);
initializeTile(19, "water07", true);
initializeTile(20, "water08", true);
initializeTile(21, "water09", true);
initializeTile(22, "water10", true);
initializeTile(23, "water11", true);
initializeTile(24, "water12", true);
initializeTile(25, "water13", true);
// ROAD
initializeTile(26, "road00", false);
initializeTile(27, "road01", false);
initializeTile(28, "road02", false);
initializeTile(29, "road03", false);
initializeTile(30, "road04", false);
initializeTile(31, "road05", false);
initializeTile(32, "road06", false);
initializeTile(33, "road07", false);
initializeTile(34, "road08", false);
initializeTile(35, "road09", false);
initializeTile(36, "road10", false);
initializeTile(37, "road11", false);
initializeTile(38, "road12", false);
// WORLD
initializeTile(39, "earth", false);
initializeTile(40, "wall", true);
initializeTile(41, "tree", true);
BufferedImage scaledImage;
for (Tile tile : tile) {