diff --git a/src/main/java/com/drewm/data/FallingBlockData.java b/src/main/java/com/drewm/data/FallingBlockData.java new file mode 100644 index 0000000..69b6af5 --- /dev/null +++ b/src/main/java/com/drewm/data/FallingBlockData.java @@ -0,0 +1,9 @@ +package com.drewm.data; + +public record FallingBlockData( + float x, + float y, + float width, + float height +) { +} diff --git a/src/main/java/com/drewm/data/MovingPlatformData.java b/src/main/java/com/drewm/data/MovingPlatformData.java new file mode 100644 index 0000000..e2b010b --- /dev/null +++ b/src/main/java/com/drewm/data/MovingPlatformData.java @@ -0,0 +1,12 @@ +package com.drewm.data; + +public record MovingPlatformData( + float startX, + float startY, + float endX, + float endY, + float width, + float height, + float speed +) { +} diff --git a/src/main/java/com/drewm/data/RoomData.java b/src/main/java/com/drewm/data/RoomData.java index b951ab8..d86560e 100644 --- a/src/main/java/com/drewm/data/RoomData.java +++ b/src/main/java/com/drewm/data/RoomData.java @@ -10,6 +10,8 @@ public record RoomData( List doors, List floatingMines, List sawBlades, - List lasers + List lasers, + List movingPlatforms, + List fallingBlocks ) { } diff --git a/src/main/java/com/drewm/entities/BasicZombie.java b/src/main/java/com/drewm/entities/BasicZombie.java index 8d6d733..59e9d56 100644 --- a/src/main/java/com/drewm/entities/BasicZombie.java +++ b/src/main/java/com/drewm/entities/BasicZombie.java @@ -61,7 +61,7 @@ public void update() { this.facingLeft = !this.facingLeft; } - if (getBounds().intersects(playing.player.getBounds())) { + if (getScreenBounds().intersects(playing.player.getScreenBounds())) { playing.player.takeDamage(1); } } @@ -81,22 +81,12 @@ public void draw(Graphics2D g2) { } if (showHitbox) { - Rectangle2D.Float hitbox = getBounds(); + Rectangle2D.Float hitbox = getScreenBounds(); g2.setColor(Color.RED); g2.drawRect((int) hitbox.x, (int) hitbox.y, (int) hitbox.width, (int) hitbox.height); } } - public Rectangle2D.Float getBounds() { - float screenX = worldX - playing.player.worldX + playing.player.screenX; - float screenY = worldY - playing.player.worldY + playing.player.screenY; - return new Rectangle2D.Float(screenX + hitboxOffsetX, screenY + hitboxOffsetY, hitboxWidth, hitboxHeight); - } - - public Rectangle2D.Float getWorldBounds() { - return new Rectangle2D.Float(worldX + hitboxOffsetX, worldY + hitboxOffsetY, hitboxWidth, hitboxHeight); - } - public void handleDrop() { float dropChance = RANDOM.nextFloat(); diff --git a/src/main/java/com/drewm/entities/Entity.java b/src/main/java/com/drewm/entities/Entity.java index 6bc55a8..d7e0412 100644 --- a/src/main/java/com/drewm/entities/Entity.java +++ b/src/main/java/com/drewm/entities/Entity.java @@ -3,6 +3,8 @@ import com.drewm.gamestates.Playing; import com.drewm.levels.LevelManager; import com.drewm.main.Window; +import com.drewm.objects.MovingPlatform; +import com.drewm.objects.FallingBlock; import com.drewm.utils.Constants; import java.awt.*; @@ -12,13 +14,13 @@ public class Entity { protected final Playing playing; public float worldX, worldY; + private float previousWorldY; public int screenX, screenY; public int spriteWidth, spriteHeight; public int hitboxWidth, hitboxHeight, hitboxOffsetX, hitboxOffsetY; public float velocityY = 0; - public boolean isSolid = false; public boolean useGravity = false; public boolean showHitbox = false; public boolean isOnGround = false; @@ -27,6 +29,8 @@ public class Entity { public float jumpPower = Constants.STARTING_JUMP_FORCE; public int health = 100; + private MovingPlatform ridingPlatform = null; + BufferedImage[] movementSprites; public int spriteCounter = 0; public int spriteNum = 0; @@ -58,63 +62,248 @@ public Entity(float worldX, float worldY, BufferedImage[] movementSprites, int s } public void update(boolean jumpPressed) { - int feetY = (int) (worldY + hitboxOffsetY + hitboxHeight); - int leftX = (int) (worldX + hitboxOffsetX + 1); // small padding + previousWorldY = worldY; + + applyGravity(); + + if (jumpPressed && isOnGround) { + jump(); + } + + moveVertically(); + + updateGroundStatus(); + + checkFallingBlockUndersideCollision(); + + if (ridingPlatform != null && isOnGround) { + worldX += ridingPlatform.getDeltaX(); + worldY += ridingPlatform.getDeltaY(); + worldY = ridingPlatform.getLandingY() - (hitboxOffsetY + hitboxHeight); + } + + screenY = Math.round(worldY - playing.camera.getCameraY()); + + updateSpriteAnimation(); + } + + public void draw(Graphics2D g2) { + if (facingLeft) { + g2.drawImage(this.movementSprites[spriteNum], (int)(this.worldX + this.spriteWidth * Constants.SCALE), (int) this.worldY, this.spriteWidth * -Constants.SCALE, this.spriteHeight * Constants.SCALE, null); + } else { + g2.drawImage(this.movementSprites[spriteNum], (int) this.worldX, (int) this.worldY, this.spriteWidth * Constants.SCALE, this.spriteHeight * Constants.SCALE, null); + } + + if (showHitbox) { + Rectangle2D.Float hitbox = getScreenBounds(); + g2.setColor(Color.RED); + g2.drawRect((int) hitbox.x, (int) hitbox.y, (int) hitbox.width, (int) hitbox.height); + } + } + + private void updateGroundStatus() { + int feetY = (int) (worldY + hitboxOffsetY + hitboxHeight - 1); + int leftX = (int) (worldX + hitboxOffsetX + 1); int rightX = (int) (worldX + hitboxOffsetX + hitboxWidth - 1); - this.isOnGround = playing.levelManager.isSolidTile(leftX, feetY + 1) || - playing.levelManager.isSolidTile(rightX, feetY + 1); + boolean onSolidTile = playing.levelManager.isSolidTile(leftX, feetY + 2) || + playing.levelManager.isSolidTile(rightX, feetY + 2); - if (useGravity) { - if (velocityY < 0) { - velocityY += Constants.GRAVITY_ASCEND; - } else { - velocityY += Constants.GRAVITY_DESCEND; + MovingPlatform platformBelow = findPlatformBelow(); + FallingBlock fallingBlockBelow = findFallingBlockBelow(); + + if (platformBelow != null) { + ridingPlatform = platformBelow; + isOnGround = true; + } else if (fallingBlockBelow != null) { + ridingPlatform = null; + isOnGround = true; + } else if (onSolidTile) { + ridingPlatform = null; + isOnGround = true; + } else { + ridingPlatform = null; + isOnGround = false; + } + } + + private MovingPlatform findPlatformBelow() { + Rectangle2D.Float entityBounds = getBounds(); + float entityBottom = entityBounds.y + entityBounds.height; + + if (ridingPlatform != null) { + float platformTop = ridingPlatform.getWorldY(); + if (Math.abs(entityBottom - platformTop) <= 3 && + entityBounds.x < ridingPlatform.getWorldX() + ridingPlatform.getBounds().width && + entityBounds.x + entityBounds.width > ridingPlatform.getWorldX()) { + return ridingPlatform; } + } + + for (MovingPlatform platform : playing.levelManager.getCurrentRoom().getMovingPlatforms()) { + float platformTop = platform.getWorldY(); - if (velocityY > Constants.TERMINAL_VELOCITY) { - velocityY = Constants.TERMINAL_VELOCITY; + if (Math.abs(entityBottom - platformTop) <= 3 && + entityBounds.x < platform.getWorldX() + platform.getBounds().width && + entityBounds.x + entityBounds.width > platform.getWorldX()) { + return platform; } } - if (jumpPressed && isOnGround) { - velocityY = -jumpPower; + return null; + } + + private FallingBlock findFallingBlockBelow() { + Rectangle2D.Float entityBounds = getBounds(); + float entityBottom = entityBounds.y + entityBounds.height; + + for (FallingBlock fallingBlock : playing.levelManager.getCurrentRoom().getFallingBlocks()) { + Rectangle2D.Float blockBounds = fallingBlock.getBounds(); + float blockTop = blockBounds.y; + + if (Math.abs(entityBottom - blockTop) <= 3 && + entityBounds.x < blockBounds.x + blockBounds.width && + entityBounds.x + entityBounds.width > blockBounds.x) { + return fallingBlock; + } + } + + return null; + } + + private void applyGravity() { + if (!useGravity || isOnGround) return; + + velocityY += (velocityY < 0) ? Constants.GRAVITY_ASCEND : Constants.GRAVITY_DESCEND; + + if (velocityY > Constants.TERMINAL_VELOCITY) { + velocityY = Constants.TERMINAL_VELOCITY; + } + } + + private void jump() { + velocityY = -jumpPower; + isOnGround = false; + ridingPlatform = null; + } + + private MovingPlatform checkOneWayPlatformCollision(float nextWorldY) { + Rectangle2D.Float nextBounds = new Rectangle2D.Float( + worldX + hitboxOffsetX, + nextWorldY + hitboxOffsetY, + hitboxWidth, + hitboxHeight + ); + + for (MovingPlatform platform : playing.levelManager.getCurrentRoom().getMovingPlatforms()) { + if (platform.canLandOn(nextBounds, velocityY, previousWorldY + hitboxOffsetY)) { + return platform; + } + } + + return null; + } + + private FallingBlock checkFallingBlockCollision(float nextWorldY) { + Rectangle2D.Float nextBounds = new Rectangle2D.Float( + worldX + hitboxOffsetX, + nextWorldY + hitboxOffsetY, + hitboxWidth, + hitboxHeight + ); + + if (velocityY > 0) { + for (FallingBlock fallingBlock : playing.levelManager.getCurrentRoom().getFallingBlocks()) { + Rectangle2D.Float blockBounds = fallingBlock.getBounds(); + + if (nextBounds.y + nextBounds.height >= blockBounds.y && + nextBounds.y + nextBounds.height <= blockBounds.y + 5 && + nextBounds.x < blockBounds.x + blockBounds.width && + nextBounds.x + nextBounds.width > blockBounds.x && + previousWorldY + hitboxOffsetY + hitboxHeight <= blockBounds.y + 3) { + return fallingBlock; + } + } + } + + return null; + } + + private void moveVertically() { + if (ridingPlatform != null && isOnGround) { + return; } float nextWorldY = worldY + velocityY; - if (!isColliding((int) worldX, (int) nextWorldY)) { - worldY = nextWorldY; - screenY = Math.round(worldY - playing.camera.getCameraY()); + + if (!isColliding((int) worldX, Math.round(nextWorldY))) { + MovingPlatform platform = checkOneWayPlatformCollision(nextWorldY); + FallingBlock fallingBlock = checkFallingBlockCollision(nextWorldY); + + if (platform != null) { + worldY = platform.getLandingY() - (hitboxOffsetY + hitboxHeight); + velocityY = 0; + isOnGround = true; + ridingPlatform = platform; + } else if (fallingBlock != null) { + worldY = fallingBlock.getBounds().y - (hitboxOffsetY + hitboxHeight); + velocityY = 0; + isOnGround = true; + ridingPlatform = null; + } else { + worldY = nextWorldY; + } } else { if (velocityY > 0) isOnGround = true; velocityY = 0; } + } - if (isMoving) { - spriteCounter++; - if (spriteCounter > 12) { - if (spriteNum >= 7) { - spriteNum = 0; - } else { - spriteNum++; - } - spriteCounter = 0; + public boolean isCollidingWithFallingBlocks(float testX, float testY) { + Rectangle2D.Float testBounds = new Rectangle2D.Float( + testX + hitboxOffsetX, + testY + hitboxOffsetY, + hitboxWidth, + hitboxHeight + ); + + for (FallingBlock fallingBlock : playing.levelManager.getCurrentRoom().getFallingBlocks()) { + if (testBounds.intersects(fallingBlock.getBounds())) { + return true; } } + + return false; } + private void updateSpriteAnimation() { + if (!isMoving) return; - public void draw(Graphics2D g2) { - if (facingLeft) { - g2.drawImage(this.movementSprites[spriteNum], (int)(this.worldX + this.spriteWidth * Constants.SCALE), (int) this.worldY, this.spriteWidth * -Constants.SCALE, this.spriteHeight * Constants.SCALE, null); - } else { - g2.drawImage(this.movementSprites[spriteNum], (int) this.worldX, (int) this.worldY, this.spriteWidth * Constants.SCALE, this.spriteHeight * Constants.SCALE, null); + spriteCounter++; + if (spriteCounter > 12) { + spriteNum = (spriteNum + 1) % movementSprites.length; + spriteCounter = 0; } + } - if (showHitbox) { - Rectangle2D.Float hitbox = getBounds(); - g2.setColor(Color.RED); - g2.drawRect((int) hitbox.x, (int) hitbox.y, (int) hitbox.width, (int) hitbox.height); + private void checkFallingBlockUndersideCollision() { + Rectangle2D.Float entityBounds = getBounds(); + + for (FallingBlock fallingBlock : playing.levelManager.getCurrentRoom().getFallingBlocks()) { + if (fallingBlock.isFalling()) { + Rectangle2D.Float blockBounds = fallingBlock.getBounds(); + + if (entityBounds.intersects(blockBounds)) { + float entityTop = entityBounds.y; + float blockBottom = blockBounds.y + blockBounds.height; + + if (entityTop < blockBottom && entityTop + entityBounds.height > blockBounds.y) { + if (entityTop > blockBounds.y) { + takeDamage(this.health); + } + } + } + } } } @@ -122,6 +311,10 @@ public Rectangle2D.Float getBounds() { return new Rectangle2D.Float(worldX + hitboxOffsetX, worldY + hitboxOffsetY, hitboxWidth, hitboxHeight); } + public Rectangle2D.Float getScreenBounds() { + return new Rectangle2D.Float(screenX + hitboxOffsetX, screenY + hitboxOffsetY, hitboxWidth, hitboxHeight); + } + public boolean isColliding(int worldX, int worldY) { LevelManager levelManager = Window.getWindow().playing.levelManager; @@ -130,8 +323,12 @@ public boolean isColliding(int worldX, int worldY) { int topY = worldY + hitboxOffsetY; int bottomY = worldY + hitboxOffsetY + hitboxHeight - 1; - return levelManager.isSolidTile(leftX, topY) || levelManager.isSolidTile(rightX, topY) || + boolean tileCollision = levelManager.isSolidTile(leftX, topY) || levelManager.isSolidTile(rightX, topY) || levelManager.isSolidTile(leftX, bottomY) || levelManager.isSolidTile(rightX, bottomY); + + boolean fallingBlockCollision = isCollidingWithFallingBlocks(worldX, worldY); + + return tileCollision || fallingBlockCollision; } public boolean isStandingOnSpike(int worldX, int worldY) { @@ -147,4 +344,4 @@ public boolean isStandingOnSpike(int worldX, int worldY) { public void takeDamage(int amount) { this.health -= amount; } -} +} \ No newline at end of file diff --git a/src/main/java/com/drewm/entities/Player.java b/src/main/java/com/drewm/entities/Player.java index 2c30f6e..d1a864b 100644 --- a/src/main/java/com/drewm/entities/Player.java +++ b/src/main/java/com/drewm/entities/Player.java @@ -18,7 +18,7 @@ public class Player extends Entity { public boolean leftPressed, rightPressed, jumpPressed; private int coinMultiplier = 1; - private int coins = 1000; + private int coins = 100000; private int maxHealth = Constants.PLAYER_STARTING_MAX_HEALTH; private int health = maxHealth; private float speed = Constants.PLAYER_STARTING_SPEED; @@ -126,11 +126,6 @@ public void update() { } } - @Override - public Rectangle2D.Float getBounds() { - return new Rectangle2D.Float(screenX + hitboxOffsetX, screenY + hitboxOffsetY, hitboxWidth, hitboxHeight); - } - public void draw(Graphics2D g2) { if (facingLeft) { g2.drawImage(this.movementSprites[spriteNum], this.screenX + this.spriteWidth * Constants.SCALE, this.screenY, this.spriteWidth * -Constants.SCALE, this.spriteHeight * Constants.SCALE, null); @@ -139,7 +134,7 @@ public void draw(Graphics2D g2) { } if (showHitbox) { - Rectangle2D.Float rect = getBounds(); + Rectangle2D.Float rect = getScreenBounds(); g2.setColor(Color.RED); g2.drawRect((int) rect.x, (int) rect.y, (int) rect.width, (int) rect.height); } diff --git a/src/main/java/com/drewm/gamestates/Playing.java b/src/main/java/com/drewm/gamestates/Playing.java index 823d142..90059d4 100644 --- a/src/main/java/com/drewm/gamestates/Playing.java +++ b/src/main/java/com/drewm/gamestates/Playing.java @@ -19,7 +19,7 @@ import java.util.List; public class Playing implements Statemethods { - private String currentLevelFilePath = "/maps/map1-lg.json"; + private String currentLevelFilePath = "/maps/map1.json"; public List bullets = new ArrayList<>(); public LevelManager levelManager = new LevelManager(this); private final List explosions = new ArrayList<>(); @@ -110,7 +110,7 @@ public void update() { currentDoor = null; for (Door door : this.levelManager.getCurrentRoom().getDoors()) { - if (door.getScreenBounds().intersects(player.getBounds())) { + if (door.getScreenBounds().intersects(player.getScreenBounds())) { currentDoor = door; break; } @@ -128,18 +128,26 @@ public void update() { for (SawBlade sawBlade : this.levelManager.getCurrentRoom().getSawBlades()) { sawBlade.update(); - if (sawBlade.getScreenBounds().intersects(player.getBounds())) { + if (sawBlade.getScreenBounds().intersects(player.getScreenBounds())) { player.takeDamage(1); } } for (Laser laser : this.levelManager.getCurrentRoom().getLasers()) { laser.update(); - if (laser.isActive() && laser.getScreenBounds().intersects(player.getBounds())) { + if (laser.isActive() && laser.getScreenBounds().intersects(player.getScreenBounds())) { player.takeDamage(1); } } + for (MovingPlatform movingPlatform : this.levelManager.getCurrentRoom().getMovingPlatforms()) { + movingPlatform.update(); + } + + for (FallingBlock fallingBlock : this.levelManager.getCurrentRoom().getFallingBlocks()) { + fallingBlock.update(); + } + Iterator explosionIterator = explosions.iterator(); while (explosionIterator.hasNext()) { Explosion explosion = explosionIterator.next(); @@ -189,6 +197,14 @@ public void draw(Graphics g) { explosion.draw(g2, camera.getCameraX(), camera.getCameraY()); } + for (MovingPlatform movingPlatform : this.levelManager.getCurrentRoom().getMovingPlatforms()) { + movingPlatform.draw(g2); + } + + for (FallingBlock fallingBlock : this.levelManager.getCurrentRoom().getFallingBlocks()) { + fallingBlock.draw(g2); + } + Modal activeModal = getActiveModal(); if (activeModal != null) activeModal.draw(g); } diff --git a/src/main/java/com/drewm/levels/LevelManager.java b/src/main/java/com/drewm/levels/LevelManager.java index 76835ec..c910d5f 100644 --- a/src/main/java/com/drewm/levels/LevelManager.java +++ b/src/main/java/com/drewm/levels/LevelManager.java @@ -113,7 +113,21 @@ public void loadRooms(String filePath, boolean persistPlayerState) { lasers.add(new Laser(laser.x1(), laser.y1(), laser.x2(), laser.y2(), laser.activationIntervalMS(), laser.delayMS(), playing)); } - rooms.put(i, new Room(worldMap, roomNumTileWidth, roomNumTileHeight, worldBackground, basicZombies, collectables, doors, floatingMines, sawBlades, lasers)); + // Load moving platforms + List movingPlatformData = room.movingPlatforms(); + List movingPlatforms = new ArrayList<>(); + for (MovingPlatformData movingPlatform : movingPlatformData) { + movingPlatforms.add(new MovingPlatform(movingPlatform.startX(), movingPlatform.startY(), movingPlatform.endX(), movingPlatform.endY(), movingPlatform.width(), movingPlatform.height(), movingPlatform.speed(), playing)); + } + + // Load falling blocks + List fallingBlockData = room.fallingBlocks(); + List fallingBlocks = new ArrayList<>(); + for (FallingBlockData fallingBlock : fallingBlockData) { + fallingBlocks.add(new FallingBlock(fallingBlock.x(), fallingBlock.y(), fallingBlock.width(), fallingBlock.height(), playing)); + } + + rooms.put(i, new Room(worldMap, roomNumTileWidth, roomNumTileHeight, worldBackground, basicZombies, collectables, doors, floatingMines, sawBlades, lasers, movingPlatforms, fallingBlocks)); } } catch (IOException e) { e.printStackTrace(); diff --git a/src/main/java/com/drewm/levels/Room.java b/src/main/java/com/drewm/levels/Room.java index 6f3d880..7d34b75 100644 --- a/src/main/java/com/drewm/levels/Room.java +++ b/src/main/java/com/drewm/levels/Room.java @@ -16,8 +16,22 @@ public class Room { private List floatingMines; private List sawBlades; private List lasers; - - public Room(int[][] worldMap, int roomNumTileWidth, int roomNumTileHeight, int[][] worldBackground, List basicZombies, List collectables, List doors, List floatingMines, List sawBlades, List lasers) { + private List movingPlatforms; + private List fallingBlocks; + + public Room(int[][] worldMap, + int roomNumTileWidth, + int roomNumTileHeight, + int[][] worldBackground, + List basicZombies, + List collectables, + List doors, + List floatingMines, + List sawBlades, + List lasers, + List movingPlatforms, + List fallingBlocks + ) { this.worldMap = worldMap; this.worldBackground = worldBackground; this.basicZombies = basicZombies; @@ -26,9 +40,11 @@ public Room(int[][] worldMap, int roomNumTileWidth, int roomNumTileHeight, int[] this.floatingMines = floatingMines; this.sawBlades = sawBlades; this.lasers = lasers; + this.movingPlatforms = movingPlatforms; this.roomNumTileWidth = roomNumTileWidth; this.roomNumTileHeight = roomNumTileHeight; + this.fallingBlocks = fallingBlocks; } public int[][] getWorldMap() { @@ -90,4 +106,8 @@ public int getRoomNumTileWidth() { public int getRoomNumTileHeight() { return roomNumTileHeight; } + + public List getMovingPlatforms() { return movingPlatforms; } + + public List getFallingBlocks() { return fallingBlocks; } } diff --git a/src/main/java/com/drewm/objects/Collectable.java b/src/main/java/com/drewm/objects/Collectable.java index 5cd03bd..ef970e4 100644 --- a/src/main/java/com/drewm/objects/Collectable.java +++ b/src/main/java/com/drewm/objects/Collectable.java @@ -48,7 +48,7 @@ public Collectable(float x, float y, ItemType type, Playing playing) { } public boolean update() { - if (getScreenBounds().intersects(playing.player.getBounds())) { + if (getScreenBounds().intersects(playing.player.getScreenBounds())) { switch(itemType) { case COIN -> playing.player.earnCoins(playing.player.getCoinMultiplier()); case KEYCARD -> { diff --git a/src/main/java/com/drewm/objects/FallingBlock.java b/src/main/java/com/drewm/objects/FallingBlock.java new file mode 100644 index 0000000..55f5ade --- /dev/null +++ b/src/main/java/com/drewm/objects/FallingBlock.java @@ -0,0 +1,129 @@ +package com.drewm.objects; + +import com.drewm.gamestates.Playing; +import com.drewm.utils.Constants; + +import java.awt.*; +import java.awt.geom.Rectangle2D; + +public class FallingBlock { + private final Playing playing; + private float worldX, worldY; + private final float width, height; + + private final float midpoint; + private final float triggerRadius = 0.2f; + + private boolean isTriggered = false; + private boolean isFalling = false; + private float fallVelocity = 0; + private final float gravity = Constants.GRAVITY_DESCEND; + private final float maxFallSpeed = 1; + + public FallingBlock(float worldX, float worldY, float width, float height, Playing playing) { + this.playing = playing; + this.worldX = worldX; + this.worldY = worldY; + this.width = width; + this.height = height; + this.midpoint = worldX + width / 2; + } + + public void update() { + if (!isTriggered && + playing.player.worldX > midpoint - (midpoint - worldX) * triggerRadius && + playing.player.worldX < midpoint + (midpoint - worldX) * triggerRadius && + playing.player.worldY > worldY + height && + playing.player.worldY < worldY + height + Constants.TILE_SIZE * 3) { + + isTriggered = true; + isFalling = true; + } + + if (isFalling) { + fallVelocity += gravity; + if (fallVelocity > maxFallSpeed) { + fallVelocity = maxFallSpeed; + } + + float nextY = worldY + fallVelocity; + + if (!isColliding(worldX, nextY)) { + worldY = nextY; + } else { + isFalling = false; + fallVelocity = 0; + } + } + } + + public void draw(Graphics2D g2) { + float screenX = this.worldX - playing.camera.getCameraX(); + float screenY = this.worldY - playing.camera.getCameraY(); + + if (screenX + width > 0 && + screenX < Constants.SCREEN_WIDTH && + screenY + height > 0 && + screenY < Constants.SCREEN_HEIGHT) { + + g2.setColor(Color.DARK_GRAY); + g2.fill(getScreenBounds()); + + g2.setColor(Color.LIGHT_GRAY); + g2.setStroke(new BasicStroke(4)); + Rectangle2D.Float bounds = getScreenBounds(); + g2.draw(new Rectangle2D.Float( + bounds.x + 4f / 2f, + bounds.y + 4f / 2f, + bounds.width - 4f, + bounds.height - 4f + )); + } + } + + private boolean isColliding(float testX, float testY) { + int leftX = (int) testX; + int rightX = (int) (testX + width - 1); + int topY = (int) testY; + int bottomY = (int) (testY + height - 1); + + return playing.levelManager.isSolidTile(leftX, topY) || + playing.levelManager.isSolidTile(rightX, topY) || + playing.levelManager.isSolidTile(leftX, bottomY) || + playing.levelManager.isSolidTile(rightX, bottomY); + } + + public Rectangle2D.Float getBounds() { + return new Rectangle2D.Float(worldX, worldY, width, height); + } + + public Rectangle2D.Float getScreenBounds() { + float screenX = worldX - playing.camera.getCameraX(); + float screenY = worldY - playing.camera.getCameraY(); + return new Rectangle2D.Float(screenX, screenY, width, height); + } + + public float getWorldX() { + return worldX; + } + + public float getWorldY() { + return worldY; + } + + public float getWidth() { + return width; + } + + public float getHeight() { + return height; + } + + public boolean isTriggered() { + return isTriggered; + } + + public boolean isFalling() { + return isFalling; + } +} \ No newline at end of file diff --git a/src/main/java/com/drewm/objects/FloatingMine.java b/src/main/java/com/drewm/objects/FloatingMine.java index 6e2bc4c..abe81dd 100644 --- a/src/main/java/com/drewm/objects/FloatingMine.java +++ b/src/main/java/com/drewm/objects/FloatingMine.java @@ -5,7 +5,7 @@ import javax.imageio.ImageIO; import java.awt.*; -import java.awt.geom.Rectangle2D; +import java.awt.geom.Ellipse2D; import java.awt.image.BufferedImage; import java.io.IOException; import java.util.Objects; @@ -51,7 +51,7 @@ public FloatingMine(float startX, float startY, float endX, float endY, Playing } public boolean update() { - if (getScreenBounds().intersects(playing.player.getBounds())) { + if (getScreenBounds().intersects(playing.player.getScreenBounds())) { return true; } worldX += directionX * speed; @@ -90,14 +90,14 @@ public void draw(Graphics2D g2) { screenY + Constants.TILE_SIZE * 2 > 0 && screenY < Constants.SCREEN_HEIGHT) { g2.drawImage(spriteFrames[spriteNum], (int) screenX, (int) screenY, spriteFrames[0].getWidth() * Constants.SCALE, spriteFrames[0].getHeight() * Constants.SCALE, null); - if (showHitbox) g2.drawRect((int) screenX, (int) screenY, spriteFrames[0].getWidth() * Constants.SCALE, spriteFrames[0].getHeight() * Constants.SCALE); + if (showHitbox) g2.draw(getScreenBounds()); } } - public Rectangle2D.Float getScreenBounds() { + public Ellipse2D.Float getScreenBounds() { float screenX = this.worldX - playing.player.worldX + playing.player.screenX; float screenY = this.worldY - playing.player.worldY + playing.player.screenY; - return new Rectangle2D.Float(screenX, screenY, spriteFrames[0].getWidth() * Constants.SCALE, spriteFrames[0].getHeight() * Constants.SCALE); + return new Ellipse2D.Float(screenX + 3 * Constants.SCALE, screenY, (spriteFrames[0].getWidth() - 6) * Constants.SCALE, spriteFrames[0].getWidth() * Constants.SCALE); } private float distanceTo(float targetX, float targetY) { diff --git a/src/main/java/com/drewm/objects/MovingPlatform.java b/src/main/java/com/drewm/objects/MovingPlatform.java new file mode 100644 index 0000000..08e4b16 --- /dev/null +++ b/src/main/java/com/drewm/objects/MovingPlatform.java @@ -0,0 +1,139 @@ +package com.drewm.objects; + +import com.drewm.gamestates.Playing; +import com.drewm.utils.Constants; + +import java.awt.*; +import java.awt.geom.Rectangle2D; + +public class MovingPlatform { + private final Playing playing; + private float worldX, worldY; + private float prevWorldX, prevWorldY; + private final float startX, startY, endX, endY; + private float directionX, directionY; + private boolean movingToEnd = true; + private final float width, height; + private float speed; + + public MovingPlatform(float startX, float startY, float endX, float endY, float width, float height, float speed, Playing playing) { + this.startX = startX; + this.startY = startY; + this.endX = endX; + this.endY = endY; + this.worldX = startX; + this.worldY = startY; + this.prevWorldX = startX; + this.prevWorldY = startY; + this.width = width; + this.height = height; + this.speed = speed; + this.playing = playing; + + calculateDirection(); + } + + public void update() { + prevWorldX = worldX; + prevWorldY = worldY; + + worldX += directionX * speed; + worldY += directionY * speed; + + float targetX = movingToEnd ? endX : startX; + float targetY = movingToEnd ? endY : startY; + + if (distanceTo(targetX, targetY) < speed) { + worldX = targetX; + worldY = targetY; + movingToEnd = !movingToEnd; + calculateDirection(); + } + } + + public void draw(Graphics2D g2) { + float screenX = this.worldX - playing.camera.getCameraX(); + float screenY = this.worldY - playing.camera.getCameraY(); + if (screenX + Constants.TILE_SIZE * 2 > 0 && + screenX < Constants.SCREEN_WIDTH && + screenY + Constants.TILE_SIZE * 2 > 0 && + screenY < Constants.SCREEN_HEIGHT) { + g2.setColor(Color.DARK_GRAY); + g2.fill(getScreenBounds()); + g2.setColor(Color.LIGHT_GRAY); + g2.setStroke(new BasicStroke(4)); + Rectangle2D.Float bounds = getScreenBounds(); + g2.draw(new Rectangle2D.Float( + bounds.x + 4f / 2f, + bounds.y + 4f / 2f, + bounds.width - 4f, + bounds.height - 4f + )); + } + } + + public boolean canLandOn(Rectangle2D.Float entityBounds, float entityVelocityY, float entityPreviousY) { + if (entityVelocityY <= 0) { + return false; + } + + if (entityBounds.x + entityBounds.width <= worldX || entityBounds.x >= worldX + width) { + return false; + } + + float entityBottom = entityBounds.y + entityBounds.height; + float entityPreviousBottom = entityPreviousY + entityBounds.height; + float platformTop = worldY; + + return entityPreviousBottom <= platformTop && + entityBottom >= platformTop && + entityBottom <= platformTop + height; + } + + public float getLandingY() { + return worldY; + } + + public Rectangle2D.Float getBounds() { + return new Rectangle2D.Float(worldX, worldY, width, height); + } + + public Rectangle2D.Float getScreenBounds() { + float screenX = this.worldX - playing.camera.getCameraX(); + float screenY = this.worldY - playing.camera.getCameraY(); + return new Rectangle2D.Float(screenX, screenY, width, height * Constants.SCALE); + } + + public float getWorldX() { + return worldX; + } + + public float getWorldY() { + return worldY; + } + + public float getDeltaX() { + return worldX - prevWorldX; + } + + public float getDeltaY() { + return worldY - prevWorldY; + } + + private float distanceTo(float targetX, float targetY) { + float dx = targetX - worldX; + float dy = targetY - worldY; + return (float) Math.sqrt(dx * dx + dy * dy); + } + + private void calculateDirection() { + float dx = (movingToEnd ? endX - worldX : startX - worldX); + float dy = (movingToEnd ? endY - worldY : startY - worldY); + float distance = (float) Math.sqrt(dx * dx + dy * dy); + + if (distance != 0) { + directionX = dx / distance; + directionY = dy / distance; + } + } +} diff --git a/src/main/java/com/drewm/objects/SawBlade.java b/src/main/java/com/drewm/objects/SawBlade.java index b727329..847adb0 100644 --- a/src/main/java/com/drewm/objects/SawBlade.java +++ b/src/main/java/com/drewm/objects/SawBlade.java @@ -6,6 +6,8 @@ import javax.imageio.ImageIO; import java.awt.*; import java.awt.geom.AffineTransform; +import java.awt.geom.Arc2D; +import java.awt.geom.Ellipse2D; import java.awt.geom.Rectangle2D; import java.awt.image.AffineTransformOp; import java.awt.image.BufferedImage; @@ -21,6 +23,8 @@ public class SawBlade { private int spriteCounter = 0; private int spriteNum = 0; private float speed = 1f; + private boolean upsideDown; + private boolean showHitbox = false; public SawBlade(float startX, float endX, float y, boolean upsideDown, Playing playing) { this.playing = playing; @@ -35,17 +39,18 @@ public SawBlade(float startX, float endX, float y, boolean upsideDown, Playing p } this.worldX = startX; this.worldY = y; + this.upsideDown = upsideDown; try { - BufferedImage spriteSheet = ImageIO.read(Objects.requireNonNull(getClass().getResourceAsStream("/sprites/saw-blade.png"))); + BufferedImage spriteSheet = ImageIO.read(Objects.requireNonNull(getClass().getResourceAsStream("/sprites/saw-blade-sm.png"))); this.spriteFrames = new BufferedImage[4]; for (int i = 0; i < spriteFrames.length; i++) { BufferedImage frame = spriteSheet.getSubimage( - i * Constants.TILE_WIDTH * 2, + i * Constants.TILE_WIDTH, 0, - Constants.TILE_WIDTH * 2, - Constants.TILE_WIDTH + Constants.TILE_WIDTH, + Constants.TILE_WIDTH / 2 ); if (upsideDown) { @@ -93,12 +98,16 @@ public void draw(Graphics2D g2) { screenY + Constants.TILE_SIZE > 0 && screenY < Constants.SCREEN_HEIGHT) { g2.drawImage(spriteFrames[spriteNum], (int) screenX, (int) screenY, spriteFrames[0].getWidth() * Constants.SCALE, spriteFrames[0].getHeight() * Constants.SCALE, null); + if (showHitbox) g2.draw(getScreenBounds()); } } - public Rectangle2D.Float getScreenBounds() { - float screenX = this.worldX - playing.player.worldX + playing.player.screenX; - float screenY = this.worldY - playing.player.worldY + playing.player.screenY; - return new Rectangle2D.Float(screenX, screenY, spriteFrames[0].getWidth() * Constants.SCALE, spriteFrames[0].getHeight() * Constants.SCALE); + public Arc2D.Float getScreenBounds() { + float screenX = this.worldX - playing.camera.getCameraX(); + float screenY = this.worldY - playing.camera.getCameraY(); + screenY -= upsideDown ? spriteFrames[0].getHeight() * Constants.SCALE : 0; + float startingAngle = upsideDown ? 180f : 0f; + float extent = 180f; + return new Arc2D.Float(screenX, screenY, spriteFrames[0].getWidth() * Constants.SCALE, spriteFrames[0].getWidth() * Constants.SCALE, startingAngle, extent, Arc2D.PIE); } } diff --git a/src/main/java/com/drewm/weapons/Bullet.java b/src/main/java/com/drewm/weapons/Bullet.java index 2548ba3..c3dd671 100644 --- a/src/main/java/com/drewm/weapons/Bullet.java +++ b/src/main/java/com/drewm/weapons/Bullet.java @@ -61,7 +61,7 @@ public boolean update(List zombies) { } for (BasicZombie zombie : zombies) { - if (getWorldBounds().intersects(zombie.getWorldBounds())) { + if (getWorldBounds().intersects(zombie.getBounds())) { zombie.takeDamage(damage); return true; } diff --git a/src/main/resources/maps/map0.json b/src/main/resources/maps/map0.json deleted file mode 100644 index 8de53b4..0000000 --- a/src/main/resources/maps/map0.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "tiles": [ - [3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,6,4,5], - [10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,6,11,12], - [10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,6,11,12], - [10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,6,11,12], - [10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,6,11,12], - [10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,6,11,12], - [10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,1,1,1,1,1,1,1,1,1,1,1,19], - [10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,14,15,15,15,15,15,15,15,15,15,15,15,5], - [10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,1,1,1,2,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,14,15,15,15,16,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,1,1,2,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,14,15,15,16,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,11,11,11,11,11,11,11,0,1,1,1,1,2,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,3,15,15,15,15,16,11,11,11,11,11,11,11,14,15,15,15,15,16,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,0,1,2,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,0,1,2,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,17,2,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,17,1,1,1,1,1,1,1,1,1,2,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,3,4,4,4,4,4,4,4,4,4,4,4,4,5,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,9,11,11,11,11,11,11,11,11,11,11,11,11,12,8,8,8,8,8,8,8,8,8,8,8,8,9,13,11,11,11,11,0,1,1,1,1,2,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,9,11,11,11,11,11,11,11,11,11,11,11,11,12,8,8,8,8,8,8,8,8,8,8,8,8,17,18,18,18,18,18,19,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,9,11,11,11,11,11,11,11,11,11,11,11,11,12,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,9,11,11,11,11,11,11,11,11,11,11,11,11,12,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,9,11,11,11,11,11,11,11,11,11,11,11,11,12,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,9,11,11,11,11,11,11,11,11,11,11,11,11,12,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,9,11,11,11,11,11,11,11,11,11,11,11,11,12,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,9,11,11,11,11,11,11,11,11,11,11,11,11,12,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,9,11,11,11,11,11,11,11,11,11,11,11,11,12,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,9,11,11,11,11,11,11,11,11,11,11,11,11,12,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,9,11,11,11,11,11,11,11,11,11,11,11,11,12,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,9,11,11,11,11,11,11,11,11,11,11,11,11,12,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,9,11,11,11,11,11,11,11,11,11,11,11,11,12,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,9,11,11,11,11,11,11,11,11,11,11,11,11,12,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,9,11,11,11,11,11,11,11,11,11,11,11,11,12,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,9,11,11,11,11,11,11,11,11,11,11,11,11,12,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,9,11,11,11,11,11,11,11,11,11,11,11,11,12,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,9,11,11,11,11,11,11,11,11,11,11,11,11,12,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,9,11,11,11,11,11,11,11,11,11,11,11,11,12,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,9,11,11,11,11,11,11,11,11,11,11,11,11,12,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,9,11,11,11,11,11,11,11,11,11,11,11,11,12,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,9,11,11,11,11,11,11,11,11,11,11,11,11,12,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,9,11,11,11,11,11,11,11,11,11,11,11,11,12,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,9,11,11,11,11,11,11,11,11,11,11,11,11,12,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,17,2,11,11,11,11,11,11,11,11,11,11,11,12,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,8,17,2,11,11,11,11,11,11,11,11,11,11,12,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,8,8,17,2,11,11,11,11,11,11,11,11,11,12,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,8,8,8,17,2,11,11,11,11,11,11,11,11,12,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,8,8,8,8,17,2,11,11,11,11,11,11,11,12,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,8,8,8,8,8,17,2,11,11,11,11,11,11,12,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,8,8,8,8,8,8,17,2,11,11,11,11,11,12,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,8,8,8,8,8,8,8,17,2,11,11,11,11,12,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,8,8,8,8,8,8,8,8,17,2,11,11,11,12,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,8,8,8,8,8,8,8,8,8,17,2,11,11,14,4,4,4,4,4,4,4,4,4,15,15,15,15,15,15,15,15,15,15,15,15,15,15,16,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,8,8,8,8,8,8,8,8,8,8,17,2,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,7,8,8,8,8,8,8,8,8,8,8,8,17,1,1,1,1,1,1,1,1,1,1,2,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,16,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [17,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,19] - ], - "players": [ - { - "type": "player", - "x": 2832.0, - "y": 96.0, - "health": 10, - "facingLeft": false - } - ], - "enemies": [ - { - "type": "enemy", - "x": 2832.0, - "y": 96.0, - "health": 30, - "facingLeft": false - }, - { - "type": "enemy", - "x": 2840.0, - "y": 96.0, - "health": 30, - "facingLeft": false - } - ], - "coins": [ - { - "x": 2640.0, - "y": 250.0 - }, - { - "x": 2592.0, - "y": 250.0 - }, - { - "x": 2640.0, - "y": 250.0 - }, - { - "x": 2592.0, - "y": 250.0 - }, - { - "x": 2640.0, - "y": 250.0 - }, - { - "x": 2592.0, - "y": 250.0 - } - ] -} \ No newline at end of file diff --git a/src/main/resources/maps/map1-lg.json b/src/main/resources/maps/map1-lg.json deleted file mode 100644 index 666b36f..0000000 --- a/src/main/resources/maps/map1-lg.json +++ /dev/null @@ -1,1471 +0,0 @@ -{ - "players": [ - { - "type": "player", - "x": 1520.0, - "y": 960.0, - "health": 10, - "facingLeft": false - } - ], - "rooms": [ - { - "tiles": [ - [9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], - [9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], - [9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], - [9,9,9,3,4,4,4,4,4,4,4,5,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], - [9,9,9,11,12,12,12,12,12,12,12,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], - [9,9,9,11,12,12,12,12,12,12,12,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], - [9,9,9,11,12,12,12,12,12,12,12,16,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,9,9], - [9,9,9,11,12,12,0,20,2,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,9,9], - [9,9,9,11,12,12,13,9,10,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,9,9], - [9,9,9,11,12,12,13,9,10,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,9,9], - [9,9,9,11,12,12,13,9,10,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,9,9], - [9,9,9,11,12,12,13,9,10,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,9,9], - [9,9,9,11,12,12,13,9,10,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,0,20,20,20,20,2,12,12,12,12,12,12,13,9,9], - [9,9,9,11,12,12,13,9,19,20,20,2,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,14,8,9,9,9,9,10,12,12,12,12,12,12,13,9,9], - [9,9,9,11,12,12,13,9,9,9,9,19,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,20,20,20,2,12,12,12,12,0,20,20,20,21,9,9,9,9,19,1,2,12,12,12,12,13,9,9], - [9,9,9,11,12,12,13,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,10,14,14,14,14,8,9,9,9,9,9,9,9,9,3,17,18,12,12,12,12,13,9,9], - [9,9,9,11,12,12,13,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,10,12,12,12,12,12,12,13,9,9], - [9,9,9,11,12,12,13,9,3,4,4,4,4,4,4,7,4,4,7,4,4,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,9,9,9,9,10,12,12,12,12,12,12,13,9,9], - [9,9,9,11,12,12,13,9,11,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,8,9,9,9,9,10,12,12,12,12,0,20,21,9,9], - [9,9,9,11,12,12,13,9,11,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,8,9,9,9,9,10,12,12,12,12,16,17,5,9,9], - [9,9,9,11,12,12,13,9,11,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,8,9,9,9,9,22,12,12,12,12,12,12,23,9,9], - [9,9,9,11,12,12,13,9,11,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,16,17,17,17,17,18,12,12,12,12,12,12,13,9,9], - [9,9,9,11,12,12,13,9,11,12,12,12,12,0,20,15,20,20,15,20,20,15,20,20,2,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,9,9], - [9,9,9,11,12,12,13,9,11,12,12,12,12,16,17,17,17,17,17,17,17,17,5,9,10,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,9,9], - [9,9,9,11,12,12,13,9,11,12,12,12,12,12,12,12,12,12,12,12,12,12,13,9,10,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], - [9,9,9,11,12,12,13,9,11,12,12,12,12,12,12,12,12,12,12,12,12,12,13,9,10,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], - [9,9,9,11,12,12,13,9,11,12,12,12,12,12,12,12,12,12,12,12,12,12,13,9,10,12,12,12,12,12,12,12,12,12,12,12,12,0,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20], - [9,9,9,11,12,12,13,9,11,12,12,12,12,12,12,12,12,12,12,12,12,12,13,9,10,12,12,12,12,12,12,12,12,12,12,12,12,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], - [9,9,9,11,12,12,13,9,11,12,12,12,12,12,12,12,12,12,12,12,12,12,13,9,10,12,12,12,12,12,12,12,12,12,12,12,12,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], - [9,9,9,11,12,12,13,9,11,12,12,12,12,12,12,12,12,12,12,12,12,12,13,9,10,12,12,12,12,12,12,12,12,12,12,12,12,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], - [9,9,9,11,12,12,13,9,19,20,20,20,20,20,20,20,20,20,20,2,12,12,13,9,10,12,12,12,12,12,12,12,12,12,12,12,12,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], - [9,9,9,11,12,12,13,9,3,4,4,4,4,4,4,4,4,4,4,18,12,12,13,9,10,12,12,12,12,12,12,12,12,12,12,12,12,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], - [9,9,9,11,12,12,13,9,11,12,12,12,12,12,12,12,12,12,12,12,12,12,13,9,10,12,12,12,12,12,12,12,12,12,12,12,12,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], - [9,9,9,11,12,12,13,9,11,12,12,12,12,12,12,12,12,12,12,12,12,12,13,9,10,12,12,12,12,12,12,12,12,12,12,12,12,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], - [9,9,9,11,12,12,13,9,11,12,12,12,12,12,12,12,12,12,12,12,12,12,13,9,10,12,12,12,12,12,12,12,12,12,12,12,12,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], - [9,9,9,11,12,12,13,9,11,12,12,12,12,12,0,2,12,12,12,12,12,12,13,9,10,12,12,12,12,12,12,12,12,12,12,12,12,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], - [9,9,9,11,12,12,13,9,11,12,12,12,12,12,16,18,12,12,12,12,12,12,13,9,10,12,12,12,12,12,12,12,12,12,12,12,12,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], - [9,9,9,11,12,12,13,9,11,12,12,12,12,12,12,12,12,12,12,12,12,12,13,9,10,12,12,12,12,12,12,12,12,12,12,12,12,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], - [9,9,9,11,12,12,13,9,11,12,12,12,12,12,12,12,12,12,12,12,12,0,21,9,19,20,20,20,20,20,20,20,20,20,20,20,20,21,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], - [9,9,9,11,12,12,13,9,11,12,12,0,2,12,12,12,12,0,2,12,12,13,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], - [9,9,9,11,12,12,13,9,11,12,12,16,18,12,12,12,12,16,18,12,12,16,4,4,4,5,9,9,9,9,9,9,9,9,9,9,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5], - [9,9,9,11,12,12,13,9,11,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,10,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13], - [9,9,9,11,12,12,13,9,11,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,10,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13], - [9,9,9,11,12,12,13,9,11,12,12,12,12,12,0,2,12,12,12,12,12,12,12,12,12,13,12,12,12,12,12,12,12,12,12,12,10,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13], - [9,9,9,11,12,12,16,4,18,12,12,12,12,12,16,18,12,12,12,12,12,12,12,12,12,16,4,4,4,4,12,12,4,4,4,4,18,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13], - [9,9,9,11,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,0,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21], - [9,9,9,11,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,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], - [9,9,9,11,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,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], - [9,9,9,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], - [9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9] - ], - "background": [ - [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4], - [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4], - [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4], - [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4], - [4,4,4,4,1,1,1,1,1,1,1,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4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,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4], - [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4] - ], - "enemies": [ - { - "type": "enemy", - "x": 800.0, - "y": 2240.0, - "health": 1, - "facingLeft": false - }, - { - "type": "enemy", - "x": 480.0, - "y": 3680.0, - "health": 1, - "facingLeft": false - }, - { - "type": "enemy", - "x": 1200.0, - "y": 3680.0, - "health": 1, - "facingLeft": false - }, - { - "type": "enemy", - "x": 2160.0, - "y": 3680.0, - "health": 1, - "facingLeft": false - }, - { - "type": "enemy", - "x": 2240.0, - "y": 2880.0, - "health": 1, - "facingLeft": false - } - ], - "collectables": [ - { - "x": 960.0, - "y": 1040.0, - "itemType": "COIN" - }, - { - "x": 1040.0, - "y": 1040.0, - "itemType": "COIN" - }, - { - "x": 1120.0, - "y": 1040.0, - "itemType": "COIN" - }, - { - "x": 960.0, - "y": 960.0, - "itemType": "COIN" - }, - { - "x": 1040.0, - "y": 960.0, - "itemType": "COIN" - }, - { - "x": 1120.0, - "y": 960.0, - "itemType": "COIN" - }, - { - "x": 720.0, - "y": 960.0, - "itemType": "COIN" - }, - { - "x": 800.0, - "y": 960.0, - "itemType": "COIN" - }, - { - "x": 880.0, - "y": 960.0, - "itemType": "COIN" - }, - { - "x": 720.0, - "y": 800.0, - "itemType": "COIN" - }, - { - "x": 800.0, - "y": 800.0, - "itemType": "COIN" - }, - { - "x": 880.0, - "y": 800.0, - "itemType": "COIN" - }, - { - "x": 1600.0, - "y": 1040.0, - "itemType": "COIN" - }, - { - "x": 1680.0, - "y": 1040.0, - "itemType": "COIN" - }, - { - "x": 1760.0, - "y": 1040.0, - "itemType": "COIN" - }, - { - "x": 2240.0, - "y": 1040.0, - "itemType": "COIN" - }, - { - "x": 2560.0, - "y": 1040.0, - "itemType": "COIN" - }, - { - "x": 2640.0, - "y": 1040.0, - "itemType": "COIN" - }, - { - "x": 2720.0, - "y": 1040.0, - "itemType": "COIN" - }, - { - "x": 2800.0, - "y": 1040.0, - "itemType": "COIN" - }, - { - "x": 2880.0, - "y": 960.0, - "itemType": "COIN" - }, - { - "x": 2960.0, - "y": 960.0, - "itemType": "COIN" - }, - { - "x": 3040.0, - "y": 1040.0, - "itemType": "COIN" - }, - { - "x": 3120.0, - "y": 1040.0, - "itemType": "COIN" - }, - { - "x": 3360.0, - "y": 880.0, - "itemType": "COIN" - }, - { - "x": 3520.0, - "y": 880.0, - "itemType": "COIN" - }, - { - "x": 3600.0, - "y": 880.0, - "itemType": "COIN" - }, - { - "x": 3520.0, - "y": 800.0, - "itemType": "COIN" - }, - { - "x": 3600.0, - "y": 800.0, - "itemType": "COIN" - }, - { - "x": 3520.0, - "y": 720.0, - "itemType": "COIN" - }, - { - "x": 3600.0, - "y": 720.0, - "itemType": "COIN" - }, - { - "x": 3840.0, - "y": 880.0, - "itemType": "COIN" - }, - { - "x": 3920.0, - "y": 1040.0, - "itemType": "COIN" - }, - { - "x": 4000.0, - "y": 1040.0, - "itemType": "COIN" - }, - { - "x": 4240.0, - "y": 1360.0, - "itemType": "COIN" - }, - { - "x": 4320.0, - "y": 1360.0, - "itemType": "COIN" - }, - { - "x": 3440.0, - "y": 1920.0, - "itemType": "COIN" - }, - { - "x": 3520.0, - "y": 1920.0, - "itemType": "COIN" - }, - { - "x": 3600.0, - "y": 1920.0, - "itemType": "COIN" - }, - { - "x": 3680.0, - "y": 1920.0, - "itemType": "COIN" - }, - { - "x": 3760.0, - "y": 1920.0, - "itemType": "COIN" - }, - { - "x": 3840.0, - "y": 1920.0, - "itemType": "COIN" - }, - { - "x": 2800.0, - "y": 2800.0, - "itemType": "COIN" - }, - { - "x": 2720.0, - "y": 2800.0, - "itemType": "COIN" - }, - { - "x": 2640.0, - "y": 2800.0, - "itemType": "COIN" - }, - { - "x": 2560.0, - "y": 2800.0, - "itemType": "COIN" - }, - { - "x": 2480.0, - "y": 2800.0, - "itemType": "COIN" - }, - { - "x": 2400.0, - "y": 2800.0, - "itemType": "COIN" - }, - { - "x": 2320.0, - "y": 2800.0, - "itemType": "COIN" - }, - { - "x": 2240.0, - "y": 2800.0, - "itemType": "COIN" - }, - { - "x": 2240.0, - "y": 2720.0, - "itemType": "COIN" - }, - { - "x": 2320.0, - "y": 2720.0, - "itemType": "COIN" - }, - { - "x": 2400.0, - "y": 2720.0, - "itemType": "COIN" - }, - { - "x": 2480.0, - "y": 2720.0, - "itemType": "COIN" - }, - { - "x": 2560.0, - "y": 2720.0, - "itemType": "COIN" - }, - { - "x": 2640.0, - "y": 2720.0, - "itemType": "COIN" - }, - { - "x": 2720.0, - "y": 2720.0, - "itemType": "COIN" - }, - { - "x": 2800.0, - "y": 2720.0, - "itemType": "COIN" - }, - { - "x": 2240.0, - "y": 2640.0, - "itemType": "COIN" - }, - { - "x": 2320.0, - "y": 2640.0, - "itemType": "COIN" - }, - { - "x": 2400.0, - "y": 2640.0, - "itemType": "COIN" - }, - { - "x": 2480.0, - "y": 2640.0, - "itemType": "COIN" - }, - { - "x": 2560.0, - "y": 2640.0, - "itemType": "COIN" - }, - { - "x": 2640.0, - "y": 2640.0, - "itemType": "COIN" - }, - { - "x": 2720.0, - "y": 2640.0, - "itemType": "COIN" - }, - { - "x": 2800.0, - "y": 2640.0, - "itemType": "COIN" - }, - { - "x": 2240.0, - "y": 2560.0, - "itemType": "COIN" - }, - { - "x": 2320.0, - "y": 2560.0, - "itemType": "COIN" - }, - { - "x": 2400.0, - "y": 2560.0, - "itemType": "COIN" - }, - { - "x": 2480.0, - "y": 2560.0, - "itemType": "COIN" - }, - { - "x": 2560.0, - "y": 2560.0, - "itemType": "COIN" - }, - { - "x": 2640.0, - "y": 2560.0, - "itemType": "COIN" - }, - { - "x": 2720.0, - "y": 2560.0, - "itemType": "COIN" - }, - { - "x": 2800.0, - "y": 2560.0, - "itemType": "COIN" - }, - { - "x": 2240.0, - "y": 2480.0, - "itemType": "COIN" - }, - { - "x": 2320.0, - "y": 2480.0, - "itemType": "COIN" - }, - { - "x": 2400.0, - "y": 2480.0, - "itemType": "COIN" - }, - { - "x": 2480.0, - "y": 2480.0, - "itemType": "COIN" - }, - { - "x": 2560.0, - "y": 2480.0, - "itemType": "COIN" - }, - { - "x": 2640.0, - "y": 2480.0, - "itemType": "COIN" - }, - { - "x": 2720.0, - "y": 2480.0, - "itemType": "COIN" - }, - { - "x": 2800.0, - "y": 2480.0, - "itemType": "COIN" - }, - { - "x": 2240.0, - "y": 2400.0, - "itemType": "COIN" - }, - { - "x": 2320.0, - "y": 2400.0, - "itemType": "COIN" - }, - { - "x": 2400.0, - "y": 2400.0, - "itemType": "COIN" - }, - { - "x": 2480.0, - "y": 2400.0, - "itemType": "COIN" - }, - { - "x": 2560.0, - "y": 2400.0, - "itemType": "COIN" - }, - { - "x": 2640.0, - "y": 2400.0, - "itemType": "COIN" - }, - { - "x": 2720.0, - "y": 2400.0, - "itemType": "COIN" - }, - { - "x": 2800.0, - "y": 2400.0, - "itemType": "COIN" - }, - { - "x": 2240.0, - "y": 2320.0, - "itemType": "COIN" - }, - { - "x": 2320.0, - "y": 2320.0, - "itemType": "COIN" - }, - { - "x": 2400.0, - "y": 2320.0, - "itemType": "COIN" - }, - { - "x": 2480.0, - "y": 2320.0, - "itemType": "COIN" - }, - { - "x": 2560.0, - "y": 2320.0, - "itemType": "COIN" - }, - { - "x": 2640.0, - "y": 2320.0, - "itemType": "COIN" - }, - { - "x": 2720.0, - "y": 2320.0, - "itemType": "COIN" - }, - { - "x": 2800.0, - "y": 2320.0, - "itemType": "COIN" - }, - { - "x": 2000.0, - "y": 1760.0, - "itemType": "COIN" - }, - { - "x": 2000.0, - "y": 1840.0, - "itemType": "COIN" - }, - { - "x": 2000.0, - "y": 1920.0, - "itemType": "COIN" - }, - { - "x": 2000.0, - "y": 2000.0, - "itemType": "COIN" - }, - { - "x": 2000.0, - "y": 2080.0, - "itemType": "COIN" - }, - { - "x": 2000.0, - "y": 2160.0, - "itemType": "COIN" - }, - { - "x": 2000.0, - "y": 2240.0, - "itemType": "COIN" - }, - { - "x": 2000.0, - "y": 2320.0, - "itemType": "COIN" - }, - { - "x": 2000.0, - "y": 2400.0, - "itemType": "COIN" - }, - { - "x": 2000.0, - "y": 2480.0, - "itemType": "COIN" - }, - { - "x": 2000.0, - "y": 2560.0, - "itemType": "COIN" - }, - { - "x": 2000.0, - "y": 2640.0, - "itemType": "COIN" - }, - { - "x": 2000.0, - "y": 2720.0, - "itemType": "COIN" - }, - { - "x": 2000.0, - "y": 2800.0, - "itemType": "COIN" - }, - { - "x": 2000.0, - "y": 2880.0, - "itemType": "COIN" - }, - { - "x": 2000.0, - "y": 2960.0, - "itemType": "COIN" - }, - { - "x": 1760.0, - "y": 1680.0, - "itemType": "COIN" - }, - { - "x": 1760.0, - "y": 1600.0, - "itemType": "COIN" - }, - { - "x": 1840.0, - "y": 1680.0, - "itemType": "COIN" - }, - { - "x": 1840.0, - "y": 1600.0, - "itemType": "COIN" - }, - { - "x": 1560.0, - "y": 1680.0, - "itemType": "COIN" - }, - { - "x": 1320.0, - "y": 1680.0, - "itemType": "COIN" - }, - { - "x": 1040.0, - "y": 1920.0, - "itemType": "COIN" - }, - { - "x": 1120.0, - "y": 1920.0, - "itemType": "COIN" - }, - { - "x": 1200.0, - "y": 1920.0, - "itemType": "COIN" - }, - { - "x": 1280.0, - "y": 1920.0, - "itemType": "COIN" - }, - { - "x": 1360.0, - "y": 1920.0, - "itemType": "COIN" - }, - { - "x": 1440.0, - "y": 1920.0, - "itemType": "COIN" - }, - { - "x": 1520.0, - "y": 1920.0, - "itemType": "COIN" - }, - { - "x": 1600.0, - "y": 1920.0, - "itemType": "COIN" - }, - { - "x": 1680.0, - "y": 1920.0, - "itemType": "COIN" - }, - { - "x": 1040.0, - "y": 2000.0, - "itemType": "COIN" - }, - { - "x": 1200.0, - "y": 2000.0, - "itemType": "COIN" - }, - { - "x": 1360.0, - "y": 2000.0, - "itemType": "COIN" - }, - { - "x": 1520.0, - "y": 2000.0, - "itemType": "COIN" - }, - { - "x": 1680.0, - "y": 2000.0, - "itemType": "COIN" - }, - { - "x": 1160.0, - "y": 3160.0, - "itemType": "COIN" - }, - { - "x": 1160.0, - "y": 3080.0, - "itemType": "COIN" - }, - { - "x": 1160.0, - "y": 3000.0, - "itemType": "COIN" - }, - { - "x": 1160.0, - "y": 3240.0, - "itemType": "COIN" - }, - { - "x": 1160.0, - "y": 3320.0, - "itemType": "COIN" - }, - { - "x": 1080.0, - "y": 3160.0, - "itemType": "COIN" - }, - { - "x": 1240.0, - "y": 3160.0, - "itemType": "COIN" - }, - { - "x": 720.0, - "y": 2560.0, - "itemType": "COIN" - }, - { - "x": 720.0, - "y": 2640.0, - "itemType": "COIN" - }, - { - "x": 720.0, - "y": 2720.0, - "itemType": "COIN" - }, - { - "x": 720.0, - "y": 2800.0, - "itemType": "COIN" - }, - { - "x": 720.0, - "y": 2880.0, - "itemType": "COIN" - }, - { - "x": 720.0, - "y": 2960.0, - "itemType": "COIN" - }, - { - "x": 720.0, - "y": 3040.0, - "itemType": "COIN" - }, - { - "x": 720.0, - "y": 3120.0, - "itemType": "COIN" - }, - { - "x": 720.0, - "y": 3200.0, - "itemType": "COIN" - }, - { - "x": 720.0, - "y": 3280.0, - "itemType": "COIN" - }, - { - "x": 720.0, - "y": 3360.0, - "itemType": "COIN" - }, - { - "x": 720.0, - "y": 3440.0, - "itemType": "COIN" - }, - { - "x": 720.0, - "y": 3520.0, - "itemType": "COIN" - }, - { - "x": 800.0, - "y": 2560.0, - "itemType": "COIN" - }, - { - "x": 800.0, - "y": 2640.0, - "itemType": "COIN" - }, - { - "x": 800.0, - "y": 2720.0, - "itemType": "COIN" - }, - { - "x": 800.0, - "y": 2800.0, - "itemType": "COIN" - }, - { - "x": 800.0, - "y": 2880.0, - "itemType": "COIN" - }, - { - "x": 800.0, - "y": 2960.0, - "itemType": "COIN" - }, - { - "x": 800.0, - "y": 3040.0, - "itemType": "COIN" - }, - { - "x": 800.0, - "y": 3120.0, - "itemType": "COIN" - }, - { - "x": 800.0, - "y": 3200.0, - "itemType": "COIN" - }, - { - "x": 800.0, - "y": 3280.0, - "itemType": "COIN" - }, - { - "x": 880.0, - "y": 2560.0, - "itemType": "COIN" - }, - { - "x": 880.0, - "y": 2640.0, - "itemType": "COIN" - }, - { - "x": 880.0, - "y": 2720.0, - "itemType": "COIN" - }, - { - "x": 880.0, - "y": 2800.0, - "itemType": "COIN" - }, - { - "x": 880.0, - "y": 2880.0, - "itemType": "COIN" - }, - { - "x": 880.0, - "y": 2960.0, - "itemType": "COIN" - }, - { - "x": 880.0, - "y": 3040.0, - "itemType": "COIN" - }, - { - "x": 960.0, - "y": 2560.0, - "itemType": "COIN" - }, - { - "x": 960.0, - "y": 2640.0, - "itemType": "COIN" - }, - { - "x": 960.0, - "y": 2720.0, - "itemType": "COIN" - }, - { - "x": 960.0, - "y": 2800.0, - "itemType": "COIN" - }, - { - "x": 960.0, - "y": 2880.0, - "itemType": "COIN" - }, - { - "x": 960.0, - "y": 2960.0, - "itemType": "COIN" - }, - { - "x": 960.0, - "y": 3040.0, - "itemType": "COIN" - }, - { - "x": 1040.0, - "y": 2640.0, - "itemType": "COIN" - }, - { - "x": 1040.0, - "y": 2720.0, - "itemType": "COIN" - }, - { - "x": 1040.0, - "y": 2800.0, - "itemType": "COIN" - }, - { - "x": 1040.0, - "y": 2880.0, - "itemType": "COIN" - }, - { - "x": 1040.0, - "y": 2960.0, - "itemType": "COIN" - }, - { - "x": 1680.0, - "y": 3360.0, - "itemType": "COIN" - }, - { - "x": 1760.0, - "y": 3360.0, - "itemType": "COIN" - }, - { - "x": 1840.0, - "y": 3360.0, - "itemType": "COIN" - }, - { - "x": 1920.0, - "y": 3360.0, - "itemType": "COIN" - }, - { - "x": 1680.0, - "y": 3440.0, - "itemType": "COIN" - }, - { - "x": 1760.0, - "y": 3440.0, - "itemType": "COIN" - }, - { - "x": 1840.0, - "y": 3440.0, - "itemType": "COIN" - }, - { - "x": 1920.0, - "y": 3440.0, - "itemType": "COIN" - }, - { - "x": 2080.0, - "y": 3280.0, - "itemType": "COIN" - }, - { - "x": 2160.0, - "y": 3280.0, - "itemType": "COIN" - }, - { - "x": 2240.0, - "y": 3280.0, - "itemType": "COIN" - }, - { - "x": 2320.0, - "y": 3280.0, - "itemType": "COIN" - }, - { - "x": 2400.0, - "y": 3280.0, - "itemType": "COIN" - }, - { - "x": 2480.0, - "y": 3280.0, - "itemType": "COIN" - }, - { - "x": 2560.0, - "y": 3280.0, - "itemType": "COIN" - }, - { - "x": 2640.0, - "y": 3280.0, - "itemType": "COIN" - }, - { - "x": 2720.0, - "y": 3280.0, - "itemType": "COIN" - }, - { - "x": 2800.0, - "y": 3280.0, - "itemType": "COIN" - }, - { - "x": 2080.0, - "y": 3360.0, - "itemType": "COIN" - }, - { - "x": 2160.0, - "y": 3360.0, - "itemType": "COIN" - }, - { - "x": 2240.0, - "y": 3360.0, - "itemType": "COIN" - }, - { - "x": 2320.0, - "y": 3360.0, - "itemType": "COIN" - }, - { - "x": 2400.0, - "y": 3360.0, - "itemType": "COIN" - }, - { - "x": 2480.0, - "y": 3360.0, - "itemType": "COIN" - }, - { - "x": 2560.0, - "y": 3360.0, - "itemType": "COIN" - }, - { - "x": 2640.0, - "y": 3360.0, - "itemType": "COIN" - }, - { - "x": 2720.0, - "y": 3360.0, - "itemType": "COIN" - }, - { - "x": 2800.0, - "y": 3360.0, - "itemType": "COIN" - }, - { - "x": 2080.0, - "y": 3440.0, - "itemType": "COIN" - }, - { - "x": 2160.0, - "y": 3440.0, - "itemType": "COIN" - }, - { - "x": 2240.0, - "y": 3440.0, - "itemType": "COIN" - }, - { - "x": 2320.0, - "y": 3440.0, - "itemType": "COIN" - }, - { - "x": 2400.0, - "y": 3440.0, - "itemType": "COIN" - }, - { - "x": 2480.0, - "y": 3440.0, - "itemType": "COIN" - }, - { - "x": 2560.0, - "y": 3440.0, - "itemType": "COIN" - }, - { - "x": 2640.0, - "y": 3440.0, - "itemType": "COIN" - }, - { - "x": 2720.0, - "y": 3440.0, - "itemType": "COIN" - }, - { - "x": 2800.0, - "y": 3440.0, - "itemType": "COIN" - }, - { - "x": 360.0, - "y": 1120.0, - "itemType": "COIN" - }, - { - "x": 360.0, - "y": 1200.0, - "itemType": "COIN" - }, - { - "x": 360.0, - "y": 1280.0, - "itemType": "COIN" - }, - { - "x": 360.0, - "y": 1360.0, - "itemType": "COIN" - }, - { - "x": 360.0, - "y": 1440.0, - "itemType": "COIN" - }, - { - "x": 360.0, - "y": 1520.0, - "itemType": "COIN" - }, - { - "x": 360.0, - "y": 1600.0, - "itemType": "COIN" - }, - { - "x": 360.0, - "y": 1680.0, - "itemType": "COIN" - }, - { - "x": 360.0, - "y": 1760.0, - "itemType": "COIN" - }, - { - "x": 360.0, - "y": 1840.0, - "itemType": "COIN" - }, - { - "x": 360.0, - "y": 1920.0, - "itemType": "COIN" - }, - { - "x": 360.0, - "y": 2000.0, - "itemType": "COIN" - }, - { - "x": 360.0, - "y": 2080.0, - "itemType": "COIN" - }, - { - "x": 360.0, - "y": 2160.0, - "itemType": "COIN" - }, - { - "x": 360.0, - "y": 2240.0, - "itemType": "COIN" - }, - { - "x": 360.0, - "y": 2320.0, - "itemType": "COIN" - }, - { - "x": 360.0, - "y": 2400.0, - "itemType": "COIN" - }, - { - "x": 360.0, - "y": 2480.0, - "itemType": "COIN" - }, - { - "x": 360.0, - "y": 2560.0, - "itemType": "COIN" - }, - { - "x": 360.0, - "y": 2640.0, - "itemType": "COIN" - }, - { - "x": 360.0, - "y": 2720.0, - "itemType": "COIN" - }, - { - "x": 360.0, - "y": 2800.0, - "itemType": "COIN" - }, - { - "x": 360.0, - "y": 2880.0, - "itemType": "COIN" - }, - { - "x": 360.0, - "y": 2960.0, - "itemType": "COIN" - }, - { - "x": 360.0, - "y": 3040.0, - "itemType": "COIN" - }, - { - "x": 360.0, - "y": 3120.0, - "itemType": "COIN" - }, - { - "x": 360.0, - "y": 3200.0, - "itemType": "COIN" - } - ], - "doors": [ - { - "x": 4320.0, - "y": 3440.0, - "destinationRoom": -1, - "destinationX": -1, - "destinationY": -1, - "lockType": "NONE", - "isGoal": true - } - ], - "floatingMines": [ - { - "startX": 3600.0, - "startY": 800.0, - "endX": 3600.0, - "endY": 560.0 - }, - { - "startX": 4080.0, - "startY": 1280.0, - "endX": 4240.0, - "endY": 960.0 - } - ], - "sawBlades": [ - { - "startX": 3440.0, - "endX": 3760.0, - "y": 2000.0, - "upsideDown": false - }, - { - "startX": 3760.0, - "endX": 3440.0, - "y": 1760.0, - "upsideDown": true - } - ], - "lasers": [ - { - "x1": 3920.0, - "y1": 1600.0, - "x2": 4400.0, - "y2": 1600.0, - "activationIntervalMS": 2000, - "delayMS": 0 - }, - { - "x1": 1680.0, - "y1": 1440.0, - "x2": 1680.0, - "y2": 1760.0, - "activationIntervalMS": 2000, - "delayMS": 0 - }, - { - "x1": 1440.0, - "y1": 1440.0, - "x2": 1440.0, - "y2": 1760.0, - "activationIntervalMS": 2000, - "delayMS": 1000 - }, - { - "x1": 1200.0, - "y1": 1440.0, - "x2": 1200.0, - "y2": 1760.0, - "activationIntervalMS": 2000, - "delayMS": 0 - } - ] - } - ] -} \ No newline at end of file diff --git a/src/main/resources/maps/map1.json b/src/main/resources/maps/map1.json index d5bb9e1..963f53f 100644 --- a/src/main/resources/maps/map1.json +++ b/src/main/resources/maps/map1.json @@ -1,77 +1,1499 @@ { - "tiles": [ - [3,4,6,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5], - [10,11,6,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,6,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [10,11,6,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12], - [17,18,18,18,18,18,18,18,18,18,18,18,11,11,11,18,18,18,19], - [8,8,8,8,8,8,8,8,8,8,8,8,13,13,13,8,8,8,8], - [8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8], - [8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8], - [8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8], - [8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8] - ], - "background": [ - [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4], - [4,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,4], - [4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4], - [4,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,4], - [4,4,4,4,4,4,4,4,4,4,4,4,9,9,9,4,4,4,4], - [4,4,4,4,4,4,4,4,4,4,4,4,16,16,16,4,4,4,4], - [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4], - [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4], - [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4], - [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4] - ], "players": [ { "type": "player", - "x": 192.0, - "y": 40.0, + "x": 1520.0, + "y": 960.0, "health": 10, "facingLeft": false } ], - "enemies": [ - { - "type": "enemy", - "x": 240.0, - "y": 40.0, - "health": 30, - "facingLeft": false - }, - { - "type": "enemy", - "x": 288.0, - "y": 40.0, - "health": 30, - "facingLeft": false - } - ], - "coins": [ - { - "x": 576.0, - "y": 144.0 - }, - { - "x": 624.0, - "y": 144.0 - }, - { - "x": 672.0, - "y": 144.0 - }, - { - "x": 720.0, - "y": 144.0 - }, - { - "x": 768.0, - "y": 144.0 - }, + "rooms": [ { - "x": 816.0, - "y": 144.0 + "tiles": [ + [9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], + [9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], + [9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], + [9,9,9,3,4,4,4,4,4,4,4,5,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], + [9,9,9,11,12,12,12,12,12,12,12,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], + [9,9,9,11,12,12,12,12,12,12,12,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], + [9,9,9,11,12,12,12,12,12,12,12,16,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,9,9], + [9,9,9,11,12,12,0,20,2,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,9,9], + [9,9,9,11,12,12,13,9,10,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,9,9], + [9,9,9,11,12,12,13,9,10,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,9,9], + [9,9,9,11,12,12,13,9,10,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,9,9], + [9,9,9,11,12,12,13,9,10,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,9,9], + [9,9,9,11,12,12,13,9,10,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,0,20,20,20,20,2,12,12,12,12,12,12,13,9,9], + [9,9,9,11,12,12,13,9,19,20,20,2,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,14,8,9,9,9,9,10,12,12,12,12,12,12,13,9,9], + [9,9,9,11,12,12,13,9,9,9,9,19,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,1,20,20,20,2,12,12,12,12,0,20,20,20,21,9,9,9,9,19,1,2,12,12,12,12,13,9,9], + [9,9,9,11,12,12,13,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,10,14,14,14,14,8,9,9,9,9,9,9,9,9,3,17,18,12,12,12,12,13,9,9], + [9,9,9,11,12,12,13,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,10,12,12,12,12,12,12,13,9,9], + [9,9,9,11,12,12,13,9,3,4,4,4,4,4,4,7,4,4,7,4,4,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,9,9,9,9,10,12,12,12,12,12,12,13,9,9], + [9,9,9,11,12,12,13,9,11,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,8,9,9,9,9,10,12,12,12,12,0,20,21,9,9], + [9,9,9,11,12,12,13,9,11,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,8,9,9,9,9,10,12,12,12,12,16,17,5,9,9], + [9,9,9,11,12,12,13,9,11,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,8,9,9,9,9,22,12,12,12,12,12,12,23,9,9], + [9,9,9,11,12,12,13,9,11,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,16,17,17,17,17,18,12,12,12,12,12,12,13,9,9], + [9,9,9,11,12,12,13,9,11,12,12,12,12,0,20,15,20,20,15,20,20,15,20,20,2,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,9,9], + [9,9,9,11,12,12,13,9,11,12,12,12,12,16,17,17,17,17,17,17,17,17,5,9,10,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,9,9], + [9,9,9,11,12,12,13,9,11,12,12,12,12,12,12,12,12,12,12,12,12,12,13,9,10,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], + [9,9,9,11,12,12,13,9,11,12,12,12,12,12,12,12,12,12,12,12,12,12,13,9,10,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], + [9,9,9,11,12,12,13,9,11,12,12,12,12,12,12,12,12,12,12,12,12,12,13,9,10,12,12,12,12,12,12,12,12,12,12,12,12,0,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20], + [9,9,9,11,12,12,13,9,11,12,12,12,12,12,12,12,12,12,12,12,12,12,13,9,10,12,12,12,12,12,12,12,12,12,12,12,12,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], + [9,9,9,11,12,12,13,9,11,12,12,12,12,12,12,12,12,12,12,12,12,12,13,9,10,12,12,12,12,12,12,12,12,12,12,12,12,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], + [9,9,9,11,12,12,13,9,11,12,12,12,12,12,12,12,12,12,12,12,12,12,13,9,10,12,12,12,12,12,12,12,12,12,12,12,12,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], + [9,9,9,11,12,12,13,9,19,20,20,20,20,20,20,20,20,20,20,2,12,12,13,9,10,12,12,12,12,12,12,12,12,12,12,12,12,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], + [9,9,9,11,12,12,13,9,3,4,4,4,4,4,4,4,4,4,4,18,12,12,13,9,10,12,12,12,12,12,12,12,12,12,12,12,12,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], + [9,9,9,11,12,12,13,9,11,12,12,12,12,12,12,12,12,12,12,12,12,12,13,9,10,12,12,12,12,12,12,12,12,12,12,12,12,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], + [9,9,9,11,12,12,13,9,11,12,12,12,12,12,12,12,12,12,12,12,12,12,13,9,10,12,12,12,12,12,12,12,12,12,12,12,12,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], + [9,9,9,11,12,12,13,9,11,12,12,12,12,12,12,12,12,12,12,12,12,12,13,9,10,12,12,12,12,12,12,12,12,12,12,12,12,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], + [9,9,9,11,12,12,13,9,11,12,12,12,12,12,0,2,12,12,12,12,12,12,13,9,10,12,12,12,12,12,12,12,12,12,12,12,12,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], + [9,9,9,11,12,12,13,9,11,12,12,12,12,12,16,18,12,12,12,12,12,12,13,9,10,12,12,12,12,12,12,12,12,12,12,12,12,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], + [9,9,9,11,12,12,13,9,11,12,12,12,12,12,12,12,12,12,12,12,12,12,13,9,10,12,12,12,12,12,12,12,12,12,12,12,12,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], + [9,9,9,11,12,12,13,9,11,12,12,12,12,12,12,12,12,12,12,12,12,0,21,9,19,20,20,20,20,20,20,20,20,20,20,20,20,21,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], + [9,9,9,11,12,12,13,9,11,12,12,0,2,12,12,12,12,0,2,12,12,13,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], + [9,9,9,11,12,12,13,9,11,12,12,16,18,12,12,12,12,16,18,12,12,16,4,4,4,5,9,9,9,9,9,9,9,9,9,9,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5], + [9,9,9,11,12,12,13,9,11,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,10,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13], + [9,9,9,11,12,12,13,9,11,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,10,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13], + [9,9,9,11,12,12,13,9,11,12,12,12,12,12,0,2,12,12,12,12,12,12,12,12,12,13,12,12,12,12,12,12,12,12,12,12,10,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13], + [9,9,9,11,12,12,16,4,18,12,12,12,12,12,16,18,12,12,12,12,12,12,12,12,12,16,4,4,4,4,12,12,4,4,4,4,18,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13], + [9,9,9,11,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,0,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21], + [9,9,9,11,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,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], + [9,9,9,11,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,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], + [9,9,9,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9], + [9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9] + ], + "background": [ + [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4], + [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4], + [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,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4,4,4,4,4,4,4,4,4,4], + [4,4,4,4,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4], + [4,4,4,4,16,16,1,1,1,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4], + [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4], + [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4] + ], + "enemies": [ + { + "type": "enemy", + "x": 800.0, + "y": 2240.0, + "health": 1, + "facingLeft": false + }, + { + "type": "enemy", + "x": 480.0, + "y": 3680.0, + "health": 1, + "facingLeft": false + }, + { + "type": "enemy", + "x": 1200.0, + "y": 3680.0, + "health": 1, + "facingLeft": false + }, + { + "type": "enemy", + "x": 2160.0, + "y": 3680.0, + "health": 1, + "facingLeft": false + }, + { + "type": "enemy", + "x": 2240.0, + "y": 2880.0, + "health": 1, + "facingLeft": false + } + ], + "collectables": [ + { + "x": 960.0, + "y": 1040.0, + "itemType": "COIN" + }, + { + "x": 1040.0, + "y": 1040.0, + "itemType": "COIN" + }, + { + "x": 1120.0, + "y": 1040.0, + "itemType": "COIN" + }, + { + "x": 960.0, + "y": 960.0, + "itemType": "COIN" + }, + { + "x": 1040.0, + "y": 960.0, + "itemType": "COIN" + }, + { + "x": 1120.0, + "y": 960.0, + "itemType": "COIN" + }, + { + "x": 720.0, + "y": 960.0, + "itemType": "COIN" + }, + { + "x": 800.0, + "y": 960.0, + "itemType": "COIN" + }, + { + "x": 880.0, + "y": 960.0, + "itemType": "COIN" + }, + { + "x": 720.0, + "y": 800.0, + "itemType": "COIN" + }, + { + "x": 800.0, + "y": 800.0, + "itemType": "COIN" + }, + { + "x": 880.0, + "y": 800.0, + "itemType": "COIN" + }, + { + "x": 1600.0, + "y": 1040.0, + "itemType": "COIN" + }, + { + "x": 1680.0, + "y": 1040.0, + "itemType": "COIN" + }, + { + "x": 1760.0, + "y": 1040.0, + "itemType": "COIN" + }, + { + "x": 2240.0, + "y": 1040.0, + "itemType": "COIN" + }, + { + "x": 2560.0, + "y": 1040.0, + "itemType": "COIN" + }, + { + "x": 2640.0, + "y": 1040.0, + "itemType": "COIN" + }, + { + "x": 2720.0, + "y": 1040.0, + "itemType": "COIN" + }, + { + "x": 2800.0, + "y": 1040.0, + "itemType": "COIN" + }, + { + "x": 2880.0, + "y": 960.0, + "itemType": "COIN" + }, + { + "x": 2960.0, + "y": 960.0, + "itemType": "COIN" + }, + { + "x": 3040.0, + "y": 1040.0, + "itemType": "COIN" + }, + { + "x": 3120.0, + "y": 1040.0, + "itemType": "COIN" + }, + { + "x": 3360.0, + "y": 880.0, + "itemType": "COIN" + }, + { + "x": 3520.0, + "y": 880.0, + "itemType": "COIN" + }, + { + "x": 3600.0, + "y": 880.0, + "itemType": "COIN" + }, + { + "x": 3520.0, + "y": 800.0, + "itemType": "COIN" + }, + { + "x": 3600.0, + "y": 800.0, + "itemType": "COIN" + }, + { + "x": 3520.0, + "y": 720.0, + "itemType": "COIN" + }, + { + "x": 3600.0, + "y": 720.0, + "itemType": "COIN" + }, + { + "x": 3840.0, + "y": 880.0, + "itemType": "COIN" + }, + { + "x": 3920.0, + "y": 1040.0, + "itemType": "COIN" + }, + { + "x": 4000.0, + "y": 1040.0, + "itemType": "COIN" + }, + { + "x": 4240.0, + "y": 1360.0, + "itemType": "COIN" + }, + { + "x": 4320.0, + "y": 1360.0, + "itemType": "COIN" + }, + { + "x": 3440.0, + "y": 1920.0, + "itemType": "COIN" + }, + { + "x": 3520.0, + "y": 1920.0, + "itemType": "COIN" + }, + { + "x": 3600.0, + "y": 1920.0, + "itemType": "COIN" + }, + { + "x": 3680.0, + "y": 1920.0, + "itemType": "COIN" + }, + { + "x": 3760.0, + "y": 1920.0, + "itemType": "COIN" + }, + { + "x": 3840.0, + "y": 1920.0, + "itemType": "COIN" + }, + { + "x": 2800.0, + "y": 2800.0, + "itemType": "COIN" + }, + { + "x": 2720.0, + "y": 2800.0, + "itemType": "COIN" + }, + { + "x": 2640.0, + "y": 2800.0, + "itemType": "COIN" + }, + { + "x": 2560.0, + "y": 2800.0, + "itemType": "COIN" + }, + { + "x": 2480.0, + "y": 2800.0, + "itemType": "COIN" + }, + { + "x": 2400.0, + "y": 2800.0, + "itemType": "COIN" + }, + { + "x": 2320.0, + "y": 2800.0, + "itemType": "COIN" + }, + { + "x": 2240.0, + "y": 2800.0, + "itemType": "COIN" + }, + { + "x": 2240.0, + "y": 2720.0, + "itemType": "COIN" + }, + { + "x": 2320.0, + "y": 2720.0, + "itemType": "COIN" + }, + { + "x": 2400.0, + "y": 2720.0, + "itemType": "COIN" + }, + { + "x": 2480.0, + "y": 2720.0, + "itemType": "COIN" + }, + { + "x": 2560.0, + "y": 2720.0, + "itemType": "COIN" + }, + { + "x": 2640.0, + "y": 2720.0, + "itemType": "COIN" + }, + { + "x": 2720.0, + "y": 2720.0, + "itemType": "COIN" + }, + { + "x": 2800.0, + "y": 2720.0, + "itemType": "COIN" + }, + { + "x": 2240.0, + "y": 2640.0, + "itemType": "COIN" + }, + { + "x": 2320.0, + "y": 2640.0, + "itemType": "COIN" + }, + { + "x": 2400.0, + "y": 2640.0, + "itemType": "COIN" + }, + { + "x": 2480.0, + "y": 2640.0, + "itemType": "COIN" + }, + { + "x": 2560.0, + "y": 2640.0, + "itemType": "COIN" + }, + { + "x": 2640.0, + "y": 2640.0, + "itemType": "COIN" + }, + { + "x": 2720.0, + "y": 2640.0, + "itemType": "COIN" + }, + { + "x": 2800.0, + "y": 2640.0, + "itemType": "COIN" + }, + { + "x": 2240.0, + "y": 2560.0, + "itemType": "COIN" + }, + { + "x": 2320.0, + "y": 2560.0, + "itemType": "COIN" + }, + { + "x": 2400.0, + "y": 2560.0, + "itemType": "COIN" + }, + { + "x": 2480.0, + "y": 2560.0, + "itemType": "COIN" + }, + { + "x": 2560.0, + "y": 2560.0, + "itemType": "COIN" + }, + { + "x": 2640.0, + "y": 2560.0, + "itemType": "COIN" + }, + { + "x": 2720.0, + "y": 2560.0, + "itemType": "COIN" + }, + { + "x": 2800.0, + "y": 2560.0, + "itemType": "COIN" + }, + { + "x": 2240.0, + "y": 2480.0, + "itemType": "COIN" + }, + { + "x": 2320.0, + "y": 2480.0, + "itemType": "COIN" + }, + { + "x": 2400.0, + "y": 2480.0, + "itemType": "COIN" + }, + { + "x": 2480.0, + "y": 2480.0, + "itemType": "COIN" + }, + { + "x": 2560.0, + "y": 2480.0, + "itemType": "COIN" + }, + { + "x": 2640.0, + "y": 2480.0, + "itemType": "COIN" + }, + { + "x": 2720.0, + "y": 2480.0, + "itemType": "COIN" + }, + { + "x": 2800.0, + "y": 2480.0, + "itemType": "COIN" + }, + { + "x": 2240.0, + "y": 2400.0, + "itemType": "COIN" + }, + { + "x": 2320.0, + "y": 2400.0, + "itemType": "COIN" + }, + { + "x": 2400.0, + "y": 2400.0, + "itemType": "COIN" + }, + { + "x": 2480.0, + "y": 2400.0, + "itemType": "COIN" + }, + { + "x": 2560.0, + "y": 2400.0, + "itemType": "COIN" + }, + { + "x": 2640.0, + "y": 2400.0, + "itemType": "COIN" + }, + { + "x": 2720.0, + "y": 2400.0, + "itemType": "COIN" + }, + { + "x": 2800.0, + "y": 2400.0, + "itemType": "COIN" + }, + { + "x": 2240.0, + "y": 2320.0, + "itemType": "COIN" + }, + { + "x": 2320.0, + "y": 2320.0, + "itemType": "COIN" + }, + { + "x": 2400.0, + "y": 2320.0, + "itemType": "COIN" + }, + { + "x": 2480.0, + "y": 2320.0, + "itemType": "COIN" + }, + { + "x": 2560.0, + "y": 2320.0, + "itemType": "COIN" + }, + { + "x": 2640.0, + "y": 2320.0, + "itemType": "COIN" + }, + { + "x": 2720.0, + "y": 2320.0, + "itemType": "COIN" + }, + { + "x": 2800.0, + "y": 2320.0, + "itemType": "COIN" + }, + { + "x": 2000.0, + "y": 1760.0, + "itemType": "COIN" + }, + { + "x": 2000.0, + "y": 1840.0, + "itemType": "COIN" + }, + { + "x": 2000.0, + "y": 1920.0, + "itemType": "COIN" + }, + { + "x": 2000.0, + "y": 2000.0, + "itemType": "COIN" + }, + { + "x": 2000.0, + "y": 2080.0, + "itemType": "COIN" + }, + { + "x": 2000.0, + "y": 2160.0, + "itemType": "COIN" + }, + { + "x": 2000.0, + "y": 2240.0, + "itemType": "COIN" + }, + { + "x": 2000.0, + "y": 2320.0, + "itemType": "COIN" + }, + { + "x": 2000.0, + "y": 2400.0, + "itemType": "COIN" + }, + { + "x": 2000.0, + "y": 2480.0, + "itemType": "COIN" + }, + { + "x": 2000.0, + "y": 2560.0, + "itemType": "COIN" + }, + { + "x": 2000.0, + "y": 2640.0, + "itemType": "COIN" + }, + { + "x": 2000.0, + "y": 2720.0, + "itemType": "COIN" + }, + { + "x": 2000.0, + "y": 2800.0, + "itemType": "COIN" + }, + { + "x": 2000.0, + "y": 2880.0, + "itemType": "COIN" + }, + { + "x": 2000.0, + "y": 2960.0, + "itemType": "COIN" + }, + { + "x": 1760.0, + "y": 1680.0, + "itemType": "COIN" + }, + { + "x": 1760.0, + "y": 1600.0, + "itemType": "COIN" + }, + { + "x": 1840.0, + "y": 1680.0, + "itemType": "COIN" + }, + { + "x": 1840.0, + "y": 1600.0, + "itemType": "COIN" + }, + { + "x": 1560.0, + "y": 1680.0, + "itemType": "COIN" + }, + { + "x": 1320.0, + "y": 1680.0, + "itemType": "COIN" + }, + { + "x": 1040.0, + "y": 1920.0, + "itemType": "COIN" + }, + { + "x": 1120.0, + "y": 1920.0, + "itemType": "COIN" + }, + { + "x": 1200.0, + "y": 1920.0, + "itemType": "COIN" + }, + { + "x": 1280.0, + "y": 1920.0, + "itemType": "COIN" + }, + { + "x": 1360.0, + "y": 1920.0, + "itemType": "COIN" + }, + { + "x": 1440.0, + "y": 1920.0, + "itemType": "COIN" + }, + { + "x": 1520.0, + "y": 1920.0, + "itemType": "COIN" + }, + { + "x": 1600.0, + "y": 1920.0, + "itemType": "COIN" + }, + { + "x": 1680.0, + "y": 1920.0, + "itemType": "COIN" + }, + { + "x": 1040.0, + "y": 2000.0, + "itemType": "COIN" + }, + { + "x": 1200.0, + "y": 2000.0, + "itemType": "COIN" + }, + { + "x": 1360.0, + "y": 2000.0, + "itemType": "COIN" + }, + { + "x": 1520.0, + "y": 2000.0, + "itemType": "COIN" + }, + { + "x": 1680.0, + "y": 2000.0, + "itemType": "COIN" + }, + { + "x": 1160.0, + "y": 3160.0, + "itemType": "COIN" + }, + { + "x": 1160.0, + "y": 3080.0, + "itemType": "COIN" + }, + { + "x": 1160.0, + "y": 3000.0, + "itemType": "COIN" + }, + { + "x": 1160.0, + "y": 3240.0, + "itemType": "COIN" + }, + { + "x": 1160.0, + "y": 3320.0, + "itemType": "COIN" + }, + { + "x": 1080.0, + "y": 3160.0, + "itemType": "COIN" + }, + { + "x": 1240.0, + "y": 3160.0, + "itemType": "COIN" + }, + { + "x": 720.0, + "y": 2560.0, + "itemType": "COIN" + }, + { + "x": 720.0, + "y": 2640.0, + "itemType": "COIN" + }, + { + "x": 720.0, + "y": 2720.0, + "itemType": "COIN" + }, + { + "x": 720.0, + "y": 2800.0, + "itemType": "COIN" + }, + { + "x": 720.0, + "y": 2880.0, + "itemType": "COIN" + }, + { + "x": 720.0, + "y": 2960.0, + "itemType": "COIN" + }, + { + "x": 720.0, + "y": 3040.0, + "itemType": "COIN" + }, + { + "x": 720.0, + "y": 3120.0, + "itemType": "COIN" + }, + { + "x": 720.0, + "y": 3200.0, + "itemType": "COIN" + }, + { + "x": 720.0, + "y": 3280.0, + "itemType": "COIN" + }, + { + "x": 720.0, + "y": 3360.0, + "itemType": "COIN" + }, + { + "x": 720.0, + "y": 3440.0, + "itemType": "COIN" + }, + { + "x": 720.0, + "y": 3520.0, + "itemType": "COIN" + }, + { + "x": 800.0, + "y": 2560.0, + "itemType": "COIN" + }, + { + "x": 800.0, + "y": 2640.0, + "itemType": "COIN" + }, + { + "x": 800.0, + "y": 2720.0, + "itemType": "COIN" + }, + { + "x": 800.0, + "y": 2800.0, + "itemType": "COIN" + }, + { + "x": 800.0, + "y": 2880.0, + "itemType": "COIN" + }, + { + "x": 800.0, + "y": 2960.0, + "itemType": "COIN" + }, + { + "x": 800.0, + "y": 3040.0, + "itemType": "COIN" + }, + { + "x": 800.0, + "y": 3120.0, + "itemType": "COIN" + }, + { + "x": 800.0, + "y": 3200.0, + "itemType": "COIN" + }, + { + "x": 800.0, + "y": 3280.0, + "itemType": "COIN" + }, + { + "x": 880.0, + "y": 2560.0, + "itemType": "COIN" + }, + { + "x": 880.0, + "y": 2640.0, + "itemType": "COIN" + }, + { + "x": 880.0, + "y": 2720.0, + "itemType": "COIN" + }, + { + "x": 880.0, + "y": 2800.0, + "itemType": "COIN" + }, + { + "x": 880.0, + "y": 2880.0, + "itemType": "COIN" + }, + { + "x": 880.0, + "y": 2960.0, + "itemType": "COIN" + }, + { + "x": 880.0, + "y": 3040.0, + "itemType": "COIN" + }, + { + "x": 960.0, + "y": 2560.0, + "itemType": "COIN" + }, + { + "x": 960.0, + "y": 2640.0, + "itemType": "COIN" + }, + { + "x": 960.0, + "y": 2720.0, + "itemType": "COIN" + }, + { + "x": 960.0, + "y": 2800.0, + "itemType": "COIN" + }, + { + "x": 960.0, + "y": 2880.0, + "itemType": "COIN" + }, + { + "x": 960.0, + "y": 2960.0, + "itemType": "COIN" + }, + { + "x": 960.0, + "y": 3040.0, + "itemType": "COIN" + }, + { + "x": 1040.0, + "y": 2640.0, + "itemType": "COIN" + }, + { + "x": 1040.0, + "y": 2720.0, + "itemType": "COIN" + }, + { + "x": 1040.0, + "y": 2800.0, + "itemType": "COIN" + }, + { + "x": 1040.0, + "y": 2880.0, + "itemType": "COIN" + }, + { + "x": 1040.0, + "y": 2960.0, + "itemType": "COIN" + }, + { + "x": 1680.0, + "y": 3360.0, + "itemType": "COIN" + }, + { + "x": 1760.0, + "y": 3360.0, + "itemType": "COIN" + }, + { + "x": 1840.0, + "y": 3360.0, + "itemType": "COIN" + }, + { + "x": 1920.0, + "y": 3360.0, + "itemType": "COIN" + }, + { + "x": 1680.0, + "y": 3440.0, + "itemType": "COIN" + }, + { + "x": 1760.0, + "y": 3440.0, + "itemType": "COIN" + }, + { + "x": 1840.0, + "y": 3440.0, + "itemType": "COIN" + }, + { + "x": 1920.0, + "y": 3440.0, + "itemType": "COIN" + }, + { + "x": 2080.0, + "y": 3280.0, + "itemType": "COIN" + }, + { + "x": 2160.0, + "y": 3280.0, + "itemType": "COIN" + }, + { + "x": 2240.0, + "y": 3280.0, + "itemType": "COIN" + }, + { + "x": 2320.0, + "y": 3280.0, + "itemType": "COIN" + }, + { + "x": 2400.0, + "y": 3280.0, + "itemType": "COIN" + }, + { + "x": 2480.0, + "y": 3280.0, + "itemType": "COIN" + }, + { + "x": 2560.0, + "y": 3280.0, + "itemType": "COIN" + }, + { + "x": 2640.0, + "y": 3280.0, + "itemType": "COIN" + }, + { + "x": 2720.0, + "y": 3280.0, + "itemType": "COIN" + }, + { + "x": 2800.0, + "y": 3280.0, + "itemType": "COIN" + }, + { + "x": 2080.0, + "y": 3360.0, + "itemType": "COIN" + }, + { + "x": 2160.0, + "y": 3360.0, + "itemType": "COIN" + }, + { + "x": 2240.0, + "y": 3360.0, + "itemType": "COIN" + }, + { + "x": 2320.0, + "y": 3360.0, + "itemType": "COIN" + }, + { + "x": 2400.0, + "y": 3360.0, + "itemType": "COIN" + }, + { + "x": 2480.0, + "y": 3360.0, + "itemType": "COIN" + }, + { + "x": 2560.0, + "y": 3360.0, + "itemType": "COIN" + }, + { + "x": 2640.0, + "y": 3360.0, + "itemType": "COIN" + }, + { + "x": 2720.0, + "y": 3360.0, + "itemType": "COIN" + }, + { + "x": 2800.0, + "y": 3360.0, + "itemType": "COIN" + }, + { + "x": 2080.0, + "y": 3440.0, + "itemType": "COIN" + }, + { + "x": 2160.0, + "y": 3440.0, + "itemType": "COIN" + }, + { + "x": 2240.0, + "y": 3440.0, + "itemType": "COIN" + }, + { + "x": 2320.0, + "y": 3440.0, + "itemType": "COIN" + }, + { + "x": 2400.0, + "y": 3440.0, + "itemType": "COIN" + }, + { + "x": 2480.0, + "y": 3440.0, + "itemType": "COIN" + }, + { + "x": 2560.0, + "y": 3440.0, + "itemType": "COIN" + }, + { + "x": 2640.0, + "y": 3440.0, + "itemType": "COIN" + }, + { + "x": 2720.0, + "y": 3440.0, + "itemType": "COIN" + }, + { + "x": 2800.0, + "y": 3440.0, + "itemType": "COIN" + }, + { + "x": 360.0, + "y": 1120.0, + "itemType": "COIN" + }, + { + "x": 360.0, + "y": 1200.0, + "itemType": "COIN" + }, + { + "x": 360.0, + "y": 1280.0, + "itemType": "COIN" + }, + { + "x": 360.0, + "y": 1360.0, + "itemType": "COIN" + }, + { + "x": 360.0, + "y": 1440.0, + "itemType": "COIN" + }, + { + "x": 360.0, + "y": 1520.0, + "itemType": "COIN" + }, + { + "x": 360.0, + "y": 1600.0, + "itemType": "COIN" + }, + { + "x": 360.0, + "y": 1680.0, + "itemType": "COIN" + }, + { + "x": 360.0, + "y": 1760.0, + "itemType": "COIN" + }, + { + "x": 360.0, + "y": 1840.0, + "itemType": "COIN" + }, + { + "x": 360.0, + "y": 1920.0, + "itemType": "COIN" + }, + { + "x": 360.0, + "y": 2000.0, + "itemType": "COIN" + }, + { + "x": 360.0, + "y": 2080.0, + "itemType": "COIN" + }, + { + "x": 360.0, + "y": 2160.0, + "itemType": "COIN" + }, + { + "x": 360.0, + "y": 2240.0, + "itemType": "COIN" + }, + { + "x": 360.0, + "y": 2320.0, + "itemType": "COIN" + }, + { + "x": 360.0, + "y": 2400.0, + "itemType": "COIN" + }, + { + "x": 360.0, + "y": 2480.0, + "itemType": "COIN" + }, + { + "x": 360.0, + "y": 2560.0, + "itemType": "COIN" + }, + { + "x": 360.0, + "y": 2640.0, + "itemType": "COIN" + }, + { + "x": 360.0, + "y": 2720.0, + "itemType": "COIN" + }, + { + "x": 360.0, + "y": 2800.0, + "itemType": "COIN" + }, + { + "x": 360.0, + "y": 2880.0, + "itemType": "COIN" + }, + { + "x": 360.0, + "y": 2960.0, + "itemType": "COIN" + }, + { + "x": 360.0, + "y": 3040.0, + "itemType": "COIN" + }, + { + "x": 360.0, + "y": 3120.0, + "itemType": "COIN" + }, + { + "x": 360.0, + "y": 3200.0, + "itemType": "COIN" + } + ], + "doors": [ + { + "x": 4320.0, + "y": 3440.0, + "destinationRoom": -1, + "destinationX": -1, + "destinationY": -1, + "lockType": "NONE", + "isGoal": true + } + ], + "floatingMines": [ + { + "startX": 3600.0, + "startY": 800.0, + "endX": 3600.0, + "endY": 560.0 + }, + { + "startX": 4080.0, + "startY": 1280.0, + "endX": 4240.0, + "endY": 960.0 + } + ], + "sawBlades": [ + { + "startX": 3440.0, + "endX": 3760.0, + "y": 2040.0, + "upsideDown": false + }, + { + "startX": 3760.0, + "endX": 3440.0, + "y": 1760.0, + "upsideDown": true + } + ], + "lasers": [ + { + "x1": 3920.0, + "y1": 1600.0, + "x2": 4400.0, + "y2": 1600.0, + "activationIntervalMS": 2000, + "delayMS": 0 + }, + { + "x1": 1680.0, + "y1": 1440.0, + "x2": 1680.0, + "y2": 1760.0, + "activationIntervalMS": 2000, + "delayMS": 0 + }, + { + "x1": 1440.0, + "y1": 1440.0, + "x2": 1440.0, + "y2": 1760.0, + "activationIntervalMS": 2000, + "delayMS": 1000 + }, + { + "x1": 1200.0, + "y1": 1440.0, + "x2": 1200.0, + "y2": 1760.0, + "activationIntervalMS": 2000, + "delayMS": 0 + } + ], + "movingPlatforms": [ + { + "startX": 2800, + "startY": 2080, + "endX": 2400, + "endY": 2080, + "width": 160, + "height": 4, + "speed": 0.75 + }, + { + "startX": 2080, + "startY": 1760, + "endX": 2080, + "endY": 2960, + "width": 160, + "height": 4, + "speed": 0.75 + } + ], + "fallingBlocks": [ + { + "x": 1920.0, + "y": 560.0, + "width": 480.0, + "height": 320.0 + } + ] } ] } \ No newline at end of file diff --git a/src/main/resources/sprites/saw-blade-sm.png b/src/main/resources/sprites/saw-blade-sm.png new file mode 100644 index 0000000..2eabc98 Binary files /dev/null and b/src/main/resources/sprites/saw-blade-sm.png differ