From 4c26efaef6118ca6405ebd829f20a5e29bb5d1c5 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 29 Apr 2017 22:15:41 -0400 Subject: [PATCH] Added a bunch more turrets --- core/assets/sprites/moment.atlas | 276 ++++++++++-------- core/assets/sprites/moment.png | Bin 3292 -> 3877 bytes core/src/io/anuke/moment/Moment.java | 4 +- .../io/anuke/moment/entities/BulletType.java | 15 + core/src/io/anuke/moment/resource/Recipe.java | 6 +- core/src/io/anuke/moment/world/Generator.java | 2 +- core/src/io/anuke/moment/world/TileType.java | 119 +++++++- .../anuke/moment/desktop/DesktopLauncher.java | 1 + 8 files changed, 286 insertions(+), 137 deletions(-) diff --git a/core/assets/sprites/moment.atlas b/core/assets/sprites/moment.atlas index 68e612280f..c2793a340a 100644 --- a/core/assets/sprites/moment.atlas +++ b/core/assets/sprites/moment.atlas @@ -6,203 +6,217 @@ filter: Nearest,Nearest repeat: none block rotate: false - xy: 57, 23 + xy: 105, 23 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 bullet rotate: false - xy: 67, 23 + xy: 115, 23 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 -coal1 - rotate: false - xy: 77, 23 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -coal2 - rotate: false - xy: 87, 23 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -coal3 - rotate: false - xy: 97, 23 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -coaldrill - rotate: false - xy: 107, 23 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -conveyor - rotate: false - xy: 117, 23 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -conveyormove - rotate: false - xy: 127, 23 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -core - rotate: false - xy: 137, 23 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -dirt1 - rotate: false - xy: 147, 23 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -dirt2 - rotate: false - xy: 157, 23 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -dirt3 - rotate: false - xy: 167, 23 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -dirtblock - rotate: false - xy: 177, 23 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -doubleturret +circle rotate: false xy: 1, 1 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 -drill +coal1 rotate: false - xy: 187, 23 + xy: 125, 23 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 -furnace +coal2 rotate: false - xy: 197, 23 + xy: 135, 23 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 -smelter +coal3 rotate: false - xy: 197, 23 + xy: 145, 23 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 -grass +coaldrill rotate: false - xy: 207, 23 + xy: 155, 23 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 -healturret +conveyor + rotate: false + xy: 165, 23 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +conveyormove + rotate: false + xy: 175, 23 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +core + rotate: false + xy: 185, 23 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +dirt1 + rotate: false + xy: 195, 23 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +dirt2 + rotate: false + xy: 205, 23 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +dirt3 + rotate: false + xy: 215, 23 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +dirtblock + rotate: false + xy: 225, 23 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +doubleturret rotate: false xy: 13, 1 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 -icon-coal +drill rotate: false - xy: 217, 23 + xy: 235, 23 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 -icon-iron +flameturret rotate: false - xy: 227, 23 + xy: 21, 21 + size: 10, 10 + orig: 10, 10 + offset: 0, 0 + index: -1 +furnace + rotate: false + xy: 245, 23 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 -icon-steel +smelter rotate: false - xy: 237, 23 + xy: 245, 23 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 -icon-stone - rotate: false - xy: 247, 23 - size: 8, 8 - orig: 8, 8 - offset: 0, 0 - index: -1 -iron1 +grass rotate: false xy: 25, 11 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 -iron2 +healturret + rotate: false + xy: 33, 21 + size: 10, 10 + orig: 10, 10 + offset: 0, 0 + index: -1 +icon-coal rotate: false xy: 25, 1 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 -iron3 +icon-iron rotate: false xy: 35, 11 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 -irondrill +icon-steel rotate: false xy: 35, 1 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 -ironwall +icon-stone rotate: false xy: 45, 11 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 +iron1 + rotate: false + xy: 45, 1 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +iron2 + rotate: false + xy: 55, 11 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +iron3 + rotate: false + xy: 55, 1 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +irondrill + rotate: false + xy: 65, 11 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 +ironwall + rotate: false + xy: 65, 1 + size: 8, 8 + orig: 8, 8 + offset: 0, 0 + index: -1 laser rotate: false - xy: 55, 7 + xy: 135, 9 size: 1, 12 orig: 1, 12 offset: 0, 0 @@ -216,112 +230,126 @@ laserend index: -1 machineturret rotate: false - xy: 21, 21 + xy: 45, 21 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 mech1 rotate: false - xy: 45, 1 + xy: 75, 11 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 player rotate: false - xy: 58, 13 + xy: 75, 1 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 router rotate: false - xy: 68, 13 + xy: 85, 11 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 shadow rotate: false - xy: 33, 21 + xy: 57, 21 + size: 10, 10 + orig: 10, 10 + offset: 0, 0 + index: -1 +shotgunturret + rotate: false + xy: 69, 21 + size: 10, 10 + orig: 10, 10 + offset: 0, 0 + index: -1 +sniperturret + rotate: false + xy: 81, 21 size: 10, 10 orig: 10, 10 offset: 0, 0 index: -1 steelconveyor rotate: false - xy: 78, 13 + xy: 85, 1 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 steelconveyormove rotate: false - xy: 88, 13 + xy: 95, 11 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone rotate: false - xy: 98, 13 + xy: 95, 1 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone1 rotate: false - xy: 108, 13 + xy: 105, 13 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone2 rotate: false - xy: 118, 13 + xy: 105, 3 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stone3 rotate: false - xy: 128, 13 + xy: 115, 13 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stoneblock rotate: false - xy: 138, 13 + xy: 115, 3 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stonedrill rotate: false - xy: 148, 13 + xy: 125, 13 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stonedrillhead rotate: false - xy: 148, 13 + xy: 125, 13 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 stonewall rotate: false - xy: 158, 13 + xy: 125, 3 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 turret rotate: false - xy: 45, 21 + xy: 93, 21 size: 10, 10 orig: 10, 10 offset: 0, 0 diff --git a/core/assets/sprites/moment.png b/core/assets/sprites/moment.png index 4de7a74884e0023288901c2d8cfd16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2f; + items.put(Item.steel, 200); player = new Player().add(); diff --git a/core/src/io/anuke/moment/entities/BulletType.java b/core/src/io/anuke/moment/entities/BulletType.java index 44cc28d155..460fe300bf 100644 --- a/core/src/io/anuke/moment/entities/BulletType.java +++ b/core/src/io/anuke/moment/entities/BulletType.java @@ -20,6 +20,13 @@ public enum BulletType{ Draw.clear(); } }, + sniper(3f, 17){ + public void draw(Bullet b){ + Draw.color("light gray"); + Draw.rect("bullet", b.x, b.y, b.angle()); + Draw.clear(); + } + }, small(1.5f, 1){ public void draw(Bullet b){ Draw.color("orange"); @@ -27,6 +34,14 @@ public enum BulletType{ Draw.clear(); } }, + flame(0.6f, 4){ + public void draw(Bullet b){ + Draw.color(Color.YELLOW, Color.SCARLET, b.time/lifetime); + float size = 6f-b.time/lifetime*5f; + Draw.rect("circle", b.x, b.y, size, size); + Draw.clear(); + } + }, shot(2.4f, 2){ {lifetime=40;} public void draw(Bullet b){ diff --git a/core/src/io/anuke/moment/resource/Recipe.java b/core/src/io/anuke/moment/resource/Recipe.java index 6e482fca38..74875a3c51 100644 --- a/core/src/io/anuke/moment/resource/Recipe.java +++ b/core/src/io/anuke/moment/resource/Recipe.java @@ -9,12 +9,16 @@ public enum Recipe{ irondrill(TileType.irondrill, stack(Item.stone, 30)), coaldrill(TileType.coaldrill, stack(Item.stone, 30), stack(Item.iron, 30)), conveyor(TileType.conveyor, stack(Item.stone, 1)), + fastconveyor(TileType.steelconveyor, stack(Item.steel, 1)), router(TileType.router, stack(Item.stone, 3)), smelter(TileType.smelter, stack(Item.stone, 40), stack(Item.iron, 40)), healturret(TileType.healturret, stack(Item.iron, 20)), turret(TileType.turret, stack(Item.stone, 4)), dturret(TileType.doubleturret, stack(Item.stone, 6)), - machineturret(TileType.machineturret, stack(Item.iron, 8), stack(Item.stone, 6)); + machineturret(TileType.machineturret, stack(Item.iron, 10), stack(Item.stone, 6)), + shotgunturret(TileType.shotgunturret, stack(Item.iron, 10), stack(Item.steel, 8)), + flameturret(TileType.flameturret, stack(Item.iron, 12), stack(Item.steel, 12)), + sniperturret(TileType.sniperturret, stack(Item.iron, 15), stack(Item.steel, 20)); public TileType result; public ItemStack[] requirements; diff --git a/core/src/io/anuke/moment/world/Generator.java b/core/src/io/anuke/moment/world/Generator.java index 527f8e50b0..05a1823e5a 100644 --- a/core/src/io/anuke/moment/world/Generator.java +++ b/core/src/io/anuke/moment/world/Generator.java @@ -33,7 +33,7 @@ public class Generator{ } if(color == white){ - block = TileType.dirtblock; + block = TileType.stoneblock; }else if(color == blue){ diff --git a/core/src/io/anuke/moment/world/TileType.java b/core/src/io/anuke/moment/world/TileType.java index 128d04bb0b..d25106e4ee 100644 --- a/core/src/io/anuke/moment/world/TileType.java +++ b/core/src/io/anuke/moment/world/TileType.java @@ -179,7 +179,7 @@ public enum TileType{ } public String description(){ - return "Moves Items (faster than a normal conveyor!)"; + return "Moves Items\nFaster than a normal conveyor"; } @Override @@ -273,7 +273,7 @@ public enum TileType{ doubleturret(true, true, false){ { range = 40; - reload = 10f; + reload = 13f; bullet = BulletType.stone; ammo = Item.stone; health = 50; @@ -294,11 +294,19 @@ public enum TileType{ public String description(){ return "Shoots things."; } + + @Override + void shoot(Tile tile){ + vector.set(4, -2).rotate(tile.entity.rotation); + bullet(tile, tile.entity.rotation); + vector.set(4, 2).rotate(tile.entity.rotation); + bullet(tile, tile.entity.rotation); + } }, machineturret(true, true, false){ { range = 65; - reload = 5f; + reload = 7f; bullet = BulletType.iron; ammo = Item.iron; health = 65; @@ -320,6 +328,91 @@ public enum TileType{ return "Shoots things."; } }, + flameturret(true, true, false){ + { + range = 30f; + reload = 6f; + bullet = BulletType.flame; + ammo = Item.coal; + health = 75; + } + + public void update(Tile tile){ + updateTurret(tile); + } + + public void draw(Tile tile){ + Draw.rect("block", tile.worldx(), tile.worldy()); + } + + public void drawOver(Tile tile){ + Draw.rect(name(), tile.worldx(), tile.worldy(), tile.entity.rotation - 90); + } + + public String description(){ + return "Burns things."; + } + }, + sniperturret(true, true, false){ + { + range = 100; + reload = 60f; + bullet = BulletType.sniper; + ammo = Item.steel; + health = 60; + } + + public void update(Tile tile){ + updateTurret(tile); + } + + public void draw(Tile tile){ + Draw.rect("block", tile.worldx(), tile.worldy()); + } + + public void drawOver(Tile tile){ + Draw.rect(name(), tile.worldx(), tile.worldy(), tile.entity.rotation - 90); + } + + public String description(){ + return "Shoots things."; + } + }, + shotgunturret(true, true, false){ + { + range = 65; + reload = 40f; + bullet = BulletType.iron; + ammo = Item.iron; + health = 70; + } + + public void update(Tile tile){ + updateTurret(tile); + } + + public void draw(Tile tile){ + Draw.rect("block", tile.worldx(), tile.worldy()); + } + + public void drawOver(Tile tile){ + Draw.rect(name(), tile.worldx(), tile.worldy(), tile.entity.rotation - 90); + } + + public String description(){ + return "Shoots things."; + } + + @Override + void shoot(Tile tile){ + vector.set(0, 4).setAngle(tile.entity.rotation); + for(int i = 0; i < 6; i ++) + Timers.run(i, ()->{ + bullet(tile, tile.entity.rotation + Mathf.range(6)); + }); + + } + }, healturret(true, true, false){ { range = 30; @@ -415,24 +508,34 @@ public enum TileType{ tile.entity.shots += 20; tile.entity.removeItem(ammo, 1); } - - if(tile.entity.shots > 0){ + + //TODO readd + //if(tile.entity.shots > 0){ Enemy enemy = findTarget(tile, range); if(enemy != null){ tile.entity.rotation = MathUtils.lerpAngleDeg(tile.entity.rotation, Angles.predictAngle(tile.worldx(), tile.worldy(), enemy.x, enemy.y, enemy.xvelocity, enemy.yvelocity, bullet.speed - 0.1f), 0.2f); if(Timers.get(tile, reload)){ - new Bullet(bullet, tile.entity, tile.worldx(), tile.worldy(), tile.entity.rotation).add(); + shoot(tile); tile.entity.shots--; } } - } + //} + } + + void shoot(Tile tile){ + vector.set(0, 4).setAngle(tile.entity.rotation); + new Bullet(bullet, tile.entity, tile.worldx()+vector.x, tile.worldy()+vector.y, tile.entity.rotation).add(); + } + + void bullet(Tile tile, float angle){ + new Bullet(bullet, tile.entity, tile.worldx()+vector.x, tile.worldy()+vector.y, angle).add(); } Enemy findTarget(Tile tile, float range){ Entity closest = null; float dst = 0; - Array array = Entities.getNearby(tile.worldx(), tile.worldy(), 100); + Array array = Entities.getNearby(tile.worldx(), tile.worldy(), range*2); for(Entity e : array){ diff --git a/desktop/src/io/anuke/moment/desktop/DesktopLauncher.java b/desktop/src/io/anuke/moment/desktop/DesktopLauncher.java index 3947b1f622..78da4b39f9 100644 --- a/desktop/src/io/anuke/moment/desktop/DesktopLauncher.java +++ b/desktop/src/io/anuke/moment/desktop/DesktopLauncher.java @@ -11,6 +11,7 @@ public class DesktopLauncher { config.setTitle("Moment"); config.setMaximized(true); config.useVsync(false); + config.setWindowedMode(800, 600); new Lwjgl3Application(new Moment(), config); } }