From 75e8bbe4c9dceaabd8bb7e7976ad9052cfb0a968 Mon Sep 17 00:00:00 2001 From: fred-boy Date: Mon, 10 Sep 2018 17:58:28 +0700 Subject: [PATCH] Add logic to some blocks and fluids --- android/assets/terrain.png | Bin 33441 -> 35686 bytes .../cavecraft/game/GameInput.java | 9 +- .../cavecraft/game/GamePhysics.java | 44 ++- .../deadsoftware/cavecraft/game/GameProc.java | 282 +++++++++++++++++- .../cavecraft/game/GameRenderer.java | 2 + .../cavecraft/game/GameWorld.java | 13 +- .../ru/deadsoftware/cavecraft/game/Items.java | 92 +++++- .../deadsoftware/cavecraft/game/WorldGen.java | 26 +- .../cavecraft/game/mobs/FallingGravel.java | 45 +++ .../cavecraft/game/mobs/FallingSand.java | 46 +++ .../deadsoftware/cavecraft/game/mobs/Mob.java | 5 +- .../deadsoftware/cavecraft/game/mobs/Pig.java | 8 +- .../cavecraft/game/objects/Block.java | 4 + .../deadsoftware/cavecraft/misc/Assets.java | 2 +- 14 files changed, 551 insertions(+), 27 deletions(-) create mode 100644 core/src/ru/deadsoftware/cavecraft/game/mobs/FallingGravel.java create mode 100644 core/src/ru/deadsoftware/cavecraft/game/mobs/FallingSand.java diff --git a/android/assets/terrain.png b/android/assets/terrain.png index 73cb45ab0f7f2f5a215e3f8d071e3a409e8ceef0..f17c02ae889fdef80eb081494919962b0f28b360 100644 GIT binary patch delta 20158 zcmV)(K#RYjg#zZ50+1sD8C#JhAAeVpWI1w0|FH@#0a`2v4q-Ms;PQDcB1`pjji3$9 z_|cW!Sy_=0?*T5Za6EVZ`)}9%7k_H6(dE*59kqJ?iPQAwz{tL~CmLF#Gp_u#vJqgNU~ zN50-Ge;zycyWssUc7A@no_-C5^Y!Zu^$#)ndOegskKK#V&npT)?)=LytcBr!{_|7p z?%n;~^V!|Zl}J_hwW)7gd4E6gMkAEzeXR1;_`mRTdtZaE&K4Iz-(=JHS}u$biQo-6 z>@dR(=l#9HVu?AP*!Vlf71MjIrxr(CFDY4H;l@T{wj)O|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Rnk&l<2hlW;;SgISJH&l}1Of8UhTz9JP+9V0n__pJj^4pf1&70!WHdNu=N!CIX4 zrN1hFALAxN^3f2RmuPFz&T)Er`kvE(^ReJOA~@Rst+n;Sg!yWvv(A1!Z>;ZC$kXff zh~xONu2*`%_Vxz2jMIUCN**2ECJGaZq9UD6*xi4VXRrJq54Jam!jPn~#DlF(;@I$a ze)z+GVGdyPV4q9NEA{Jd+&tiuAARbPzioPd;Zyw35B(6I``qX1MCKDuJi+PdDPR2J z7rAof3P1kiKTe+eip$^s{om(X-})9Wzx*;vDR#g3yDT>Szj1H&bLTmMfZfw%?JoYyI%wA#rv#CN=`s^?lmC|M%`KQMz>>lA3!TEBb%AeaBw1(8Mz`M=j*A=IH}VG;UhR zU7LF-b5{Mu*}1xVrDpxw_oVWlhlKt4=N8Z9DmR_?Zmr&XZ}&CM8td!Et65aaUWBon z`Zejk2lF*`#^1BD46F;6OE0Kydy~*&^6z^p$ApD%7~X2xe+}0P;93*Uy%Y=t%yk5~I^!!dTFXOqk_lF;DSof$pU8T@$%KY%3XY14D<(^k9o-XNIvslLW zPkYY)2WF?efG*H-^&LN5YA0J;j#nrxf<98eR zf@?r#{Ey4}`(NKX+n$;JJ{UMEJf-~G*2*K_-^TsV-v2Fo)yI|lyz3V9cO8@qU9s(u zT;!(peF62n9{;k$=N#knD)E23X7MeZ6x{{^Cl19HIuZ4BvkALJ^>p$lcH0G<>ggBM gFef|`{IB1*%wox+?CEg~+zbp1p00i_>zopr07qQS0RR91 diff --git a/core/src/ru/deadsoftware/cavecraft/game/GameInput.java b/core/src/ru/deadsoftware/cavecraft/game/GameInput.java index e44e005..d151ec6 100644 --- a/core/src/ru/deadsoftware/cavecraft/game/GameInput.java +++ b/core/src/ru/deadsoftware/cavecraft/game/GameInput.java @@ -4,6 +4,7 @@ import com.badlogic.gdx.Input; import com.badlogic.gdx.utils.TimeUtils; import ru.deadsoftware.cavecraft.CaveGame; import ru.deadsoftware.cavecraft.GameScreen; +import ru.deadsoftware.cavecraft.game.mobs.FallingSand; import ru.deadsoftware.cavecraft.game.mobs.Pig; import ru.deadsoftware.cavecraft.misc.AppState; import ru.deadsoftware.cavecraft.misc.Assets; @@ -61,7 +62,10 @@ public class GameInput { break; case Input.Keys.SPACE: - if (gameProc.player.canJump) { + if (Items.isFluid(gameProc.world.getForeMap((int)(gameProc.player.position.x+gameProc.player.width/2)/16, + (int)(gameProc.player.position.y+gameProc.player.height/4*3)/16))) { + gameProc.swim = true; + } else if (gameProc.player.canJump) { gameProc.player.moveY.add(0, -7); } else if (!gameProc.player.flyMode) { gameProc.player.flyMode = true; @@ -102,6 +106,7 @@ public class GameInput { case Input.Keys.SPACE: case Input.Keys.CONTROL_LEFT: if (gameProc.player.flyMode) gameProc.player.moveY.setZero(); + gameProc.swim = false; break; } } @@ -118,7 +123,7 @@ public class GameInput { } public void touchUp(int screenX, int screenY, int button) { - if (gameProc.isKeyDown) { + if (CaveGame.TOUCH && gameProc.isKeyDown) { keyUp(gameProc.keyDownCode); gameProc.isKeyDown = false; } diff --git a/core/src/ru/deadsoftware/cavecraft/game/GamePhysics.java b/core/src/ru/deadsoftware/cavecraft/game/GamePhysics.java index c335908..244875d 100644 --- a/core/src/ru/deadsoftware/cavecraft/game/GamePhysics.java +++ b/core/src/ru/deadsoftware/cavecraft/game/GamePhysics.java @@ -1,5 +1,6 @@ package ru.deadsoftware.cavecraft.game; +import com.badlogic.gdx.Gdx; import com.badlogic.gdx.math.Intersector; import com.badlogic.gdx.math.MathUtils; import com.badlogic.gdx.math.Rectangle; @@ -8,6 +9,8 @@ import ru.deadsoftware.cavecraft.CaveGame; import ru.deadsoftware.cavecraft.game.mobs.Mob; import ru.deadsoftware.cavecraft.game.objects.Player; +import java.util.Iterator; + public class GamePhysics { public static final int PL_SPEED = 2; @@ -26,16 +29,17 @@ public class GamePhysics { switch (dir) { case 0: bl = gameProc.world.getForeMap((int)((rect.x-8)/16),(int)((rect.y+rect.height-8)/16)); - if (checkColl(new Rectangle(rect.x-16, rect.y-18, rect.width, rect.height))) bl=0; + if (checkColl(new Rectangle(rect.x+rect.width/2, rect.y-18, rect.width, rect.height))) bl=0; break; case 1: bl = gameProc.world.getForeMap((int)((rect.x+rect.width+8)/16),(int)((rect.y+rect.height-8)/16)); - if (checkColl(new Rectangle(rect.x+16, rect.y-18, rect.width, rect.height))) bl=0; + if (checkColl(new Rectangle(rect.x+rect.width/2, rect.y-18, rect.width, rect.height))) bl=0; break; default: bl=0; } - return (bl>0 && Items.BLOCKS.getValueAt(bl).collision); + return (bl>0 && Items.BLOCKS.getValueAt(bl).toJump() && + (rect.y+rect.height)-Items.BLOCKS.getValueAt(bl).getRect((int)((rect.x-8)/16),(int)((rect.y+rect.height-8)/16)).y>8); } private boolean checkColl(Rectangle rect) { @@ -59,6 +63,10 @@ public class GamePhysics { return false; } + private int getBlock(Rectangle rect) { + return gameProc.world.getForeMap((int)(rect.x+rect.width/2)/16, (int)(rect.y+rect.height/8*7)/16); + } + private void playerPhy(Player pl) { pl.position.add(pl.moveY); if (checkColl(pl.getRect())) { @@ -74,7 +82,17 @@ public class GamePhysics { } else { pl.canJump = false; } - if (!pl.flyMode && pl.moveY.y<18) pl.moveY.add(gravity); + + if (Items.isFluid(getBlock(pl.getRect()))) { + if (!gameProc.swim) { + if (!pl.flyMode && pl.moveY.y < 9) pl.moveY.add(gravity.x / 2, gravity.y / 2); + if (!pl.flyMode && pl.moveY.y > 9) pl.moveY.add(0, -.9f); + } else { + pl.moveY.add(0, -.5f); + if (pl.moveY.y<-3) pl.moveY.y = -3; + } + } else if (!pl.flyMode && pl.moveY.y<18) pl.moveY.add(gravity); + pl.position.add(pl.moveX); if (checkColl(pl.getRect())) { if (pl.canJump && !pl.flyMode) pl.position.y-=8; @@ -107,10 +125,21 @@ public class GamePhysics { mob.position.y = MathUtils.round(mob.position.y); while (checkColl(mob.getRect())) mob.position.y+=d; mob.moveY.setZero(); + if (mob.getType() > 0) { + gameProc.world.setForeMap((int)mob.position.x/16, (int)mob.position.y/16, mob.getType()); + mob.position.y = -1; + mob.dead = true; + } } else { mob.canJump = false; } - if (mob.moveY.y<18) mob.moveY.add(gravity); + + if (mob.getType()==0 && Items.isFluid(getBlock(mob.getRect()))) { + if (mob.moveY.y > 9) mob.moveY.add(0, -.9f); + mob.moveY.add(0, -.5f); + if (mob.moveY.y<-3) mob.moveY.y = -3; + } else if (mob.moveY.y<18) mob.moveY.add(gravity); + mob.position.add(mob.moveX); if (checkColl(mob.getRect())) { if (mob.canJump) { @@ -142,6 +171,11 @@ public class GamePhysics { mob.ai(); mobPhy(mob); } + for (Iterator it = gameProc.mobs.iterator(); it.hasNext();) { + Mob m = it.next(); + if (m.dead) + it.remove(); + } playerPhy(gameProc.player); gameProc.renderer.camera.position.set( diff --git a/core/src/ru/deadsoftware/cavecraft/game/GameProc.java b/core/src/ru/deadsoftware/cavecraft/game/GameProc.java index 4b841bd..5d20e62 100644 --- a/core/src/ru/deadsoftware/cavecraft/game/GameProc.java +++ b/core/src/ru/deadsoftware/cavecraft/game/GameProc.java @@ -5,6 +5,8 @@ import com.badlogic.gdx.Input; import com.badlogic.gdx.utils.TimeUtils; import ru.deadsoftware.cavecraft.CaveGame; import ru.deadsoftware.cavecraft.GameScreen; +import ru.deadsoftware.cavecraft.game.mobs.FallingGravel; +import ru.deadsoftware.cavecraft.game.mobs.FallingSand; import ru.deadsoftware.cavecraft.game.mobs.Mob; import ru.deadsoftware.cavecraft.game.mobs.Pig; import ru.deadsoftware.cavecraft.game.objects.Player; @@ -18,6 +20,10 @@ public class GameProc implements Serializable{ public static double RUN_TIME = 0; + public static boolean DO_UPD = false; + public static int UPD_X = -1, UPD_Y = -1; + public static int FUPD_X, FUPD_Y; + public Player player; public ArrayList mobs; @@ -31,7 +37,7 @@ public class GameProc implements Serializable{ public int ctrlMode; public int creativeScroll, maxCreativeScroll; - public boolean isTouchDown, isKeyDown; + public boolean isTouchDown, isKeyDown, swim; public int touchDownX, touchDownY, keyDownCode; public int touchDownButton; public long touchDownTime; @@ -110,9 +116,283 @@ public class GameProc implements Serializable{ } } + private void updateFluids(int x, int y) { + if (Items.isWater(world.getForeMap(x, y)) && world.getForeMap(x, y)!=8) { + if ((!Items.isWater(world.getForeMap(x-1,y)) || + (Items.isWater(world.getForeMap(x,y)) && world.getForeMap(x-1, y)>=world.getForeMap(x, y))) && + (!Items.isWater(world.getForeMap(x+1,y)) || + (Items.isWater(world.getForeMap(x,y)) && world.getForeMap(x+1, y)>=world.getForeMap(x, y)))){ + world.setForeMap(x, y, world.getForeMap(x, y)+1); + if (world.getForeMap(x, y)>62) world.setForeMap(x, y, 0); + } + } + + if (world.getForeMap(x, y) == 8) { + if (world.getForeMap(x, y+1)==0 || (world.getForeMap(x, y+1)>=60 && world.getForeMap(x, y+1)<=62) || + (!Items.BLOCKS.getValueAt(world.getForeMap(x, y+1)).collision && !Items.isFluid(world.getForeMap(x, y+1)))) { + world.setForeMap(x,y+1,8); + updateBlock(x, y+2); + } else if (Items.isLava(world.getForeMap(x, y+1))) { + if (world.getForeMap(x, y+1)>9) world.setForeMap(x, y+1, 4); + else world.setForeMap(x, y+1, 66); + } else if (Items.BLOCKS.getValueAt(world.getForeMap(x, y+1)).collision) { + if (world.getForeMap(x+1, y)==0 || + (!Items.BLOCKS.getValueAt(world.getForeMap(x+1, y)).collision && !Items.isFluid(world.getForeMap(x+1, y))) || + (Items.isWater(world.getForeMap(x+1, y)) && world.getForeMap(x+1, y)>60)) { + world.setForeMap(x+1,y,60); + updateBlock(x+1, y+1); + } else if (Items.isLava(world.getForeMap(x+1, y))) { + if (world.getForeMap(x+1, y)>9) world.setForeMap(x+1, y, 4); + else world.setForeMap(x+1, y, 66); + } else if (world.getForeMap(x+1, y)==60 && world.getForeMap(x+2, y)==8) world.setForeMap(x+1, y, 8); + + if (world.getForeMap(x-1, y)==0 || + (!Items.BLOCKS.getValueAt(world.getForeMap(x-1, y)).collision && !Items.isFluid(world.getForeMap(x-1, y))) || + (Items.isWater(world.getForeMap(x-1, y)) && world.getForeMap(x-1, y)>60)) { + world.setForeMap(x-1,y,60); + updateBlock(x-1, y+1); + } else if (Items.isLava(world.getForeMap(x-1, y))) { + if (world.getForeMap(x-1, y)>9) world.setForeMap(x-1, y, 4); + else world.setForeMap(x-1, y, 66); + } else if (world.getForeMap(x-1, y)==60 && world.getForeMap(x-2, y)==8) world.setForeMap(x-1, y, 8); + } + return; + } + if (world.getForeMap(x, y) == 60) { + if (world.getForeMap(x, y+1)==0 || (world.getForeMap(x, y+1)>=60 && world.getForeMap(x, y+1)<=62) || + (!Items.BLOCKS.getValueAt(world.getForeMap(x, y+1)).collision && !Items.isFluid(world.getForeMap(x, y+1)))) { + world.setForeMap(x,y+1,8); + updateBlock(x, y+2); + } else if (Items.isLava(world.getForeMap(x, y+1))) { + if (world.getForeMap(x, y+1)>9) world.setForeMap(x, y+1, 4); + else world.setForeMap(x, y+1, 66); + } else if (Items.BLOCKS.getValueAt(world.getForeMap(x, y+1)).collision) { + if (world.getForeMap(x+1, y)==0 || + (!Items.BLOCKS.getValueAt(world.getForeMap(x+1, y)).collision && !Items.isFluid(world.getForeMap(x+1, y))) || + (Items.isWater(world.getForeMap(x+1, y)) && world.getForeMap(x+1, y)>61)){ + world.setForeMap(x+1,y,61); + updateBlock(x+1, y+1); + } else if (Items.isLava(world.getForeMap(x+1, y))) { + if (world.getForeMap(x+1, y)>9) world.setForeMap(x+1, y, 4); + else world.setForeMap(x+1, y, 66); + } + + if (world.getForeMap(x-1, y)==0 || + (!Items.BLOCKS.getValueAt(world.getForeMap(x-1, y)).collision && !Items.isFluid(world.getForeMap(x-1, y))) || + (Items.isWater(world.getForeMap(x-1, y)) && world.getForeMap(x-1, y)>61)){ + world.setForeMap(x-1,y,61); + updateBlock(x-1, y+1); + } else if (Items.isLava(world.getForeMap(x-1, y))) { + if (world.getForeMap(x-1, y)>9) world.setForeMap(x-1, y, 4); + else world.setForeMap(x-1, y, 66); + } + } + return; + } + if (world.getForeMap(x, y) == 61) { + if (world.getForeMap(x, y+1)==0 || (world.getForeMap(x, y+1)>=60 && world.getForeMap(x, y+1)<=62) || + (!Items.BLOCKS.getValueAt(world.getForeMap(x, y+1)).collision && !Items.isFluid(world.getForeMap(x, y+1)))) { + world.setForeMap(x,y+1,8); + updateBlock(x, y+2); + } else if (Items.isLava(world.getForeMap(x, y+1))) { + if (world.getForeMap(x, y+1)>9) world.setForeMap(x, y+1, 4); + else world.setForeMap(x, y+1, 66); + } else if (Items.BLOCKS.getValueAt(world.getForeMap(x, y+1)).collision) { + if (world.getForeMap(x+1, y)==0 || + (!Items.BLOCKS.getValueAt(world.getForeMap(x+1, y)).collision && !Items.isFluid(world.getForeMap(x+1, y))) ){ + world.setForeMap(x+1,y,62); + updateBlock(x+1, y+1); + } else if (Items.isLava(world.getForeMap(x+1, y))) { + if (world.getForeMap(x+1, y)>9) world.setForeMap(x+1, y, 4); + else world.setForeMap(x+1, y, 66); + } + + if (world.getForeMap(x-1, y)==0 || + (!Items.BLOCKS.getValueAt(world.getForeMap(x-1, y)).collision && !Items.isFluid(world.getForeMap(x-1, y))) ){ + world.setForeMap(x-1,y,62); + updateBlock(x-1, y+1); + } else if (Items.isLava(world.getForeMap(x-1, y))) { + if (world.getForeMap(x-1, y)>9) world.setForeMap(x-1, y, 4); + else world.setForeMap(x-1, y, 66); + } + } + return; + } + if (world.getForeMap(x, y) == 62) { + if (world.getForeMap(x, y+1)==0 || (world.getForeMap(x, y+1)>=60 && world.getForeMap(x, y+1)<=62) || + (!Items.BLOCKS.getValueAt(world.getForeMap(x, y+1)).collision && !Items.isFluid(world.getForeMap(x, y+1)))) { + world.setForeMap(x,y+1,8); + updateBlock(x, y+2); + } else if (Items.isLava(world.getForeMap(x, y+1))) { + if (world.getForeMap(x, y+1)>9) world.setForeMap(x, y+1, 4); + else world.setForeMap(x, y+1, 66); + } + return; + } + + if (Items.isLava(world.getForeMap(x, y)) && world.getForeMap(x, y)!=9) { + if ((!Items.isLava(world.getForeMap(x-1,y)) || + (Items.isLava(world.getForeMap(x,y)) && world.getForeMap(x-1, y)>=world.getForeMap(x, y))) && + (!Items.isLava(world.getForeMap(x+1,y)) || + (Items.isLava(world.getForeMap(x,y)) && world.getForeMap(x+1, y)>=world.getForeMap(x, y)))){ + world.setForeMap(x, y, world.getForeMap(x, y)+1); + if (world.getForeMap(x, y)>65) world.setForeMap(x, y, 0); + } + } + + if (world.getForeMap(x, y) == 9) { + if (world.getForeMap(x, y+1)==0 || (world.getForeMap(x, y+1)>=63 && world.getForeMap(x, y+1)<=65) || + (!Items.BLOCKS.getValueAt(world.getForeMap(x, y+1)).collision && !Items.isFluid(world.getForeMap(x, y+1)))) { + world.setForeMap(x,y+1,9); + updateBlock(x, y+2); + } else if (Items.isWater(world.getForeMap(x, y+1))) { + world.setForeMap(x, y+1, 1); + } else if (Items.BLOCKS.getValueAt(world.getForeMap(x, y+1)).collision) { + if (world.getForeMap(x+1, y)==0 || + (!Items.BLOCKS.getValueAt(world.getForeMap(x+1, y)).collision && !Items.isFluid(world.getForeMap(x+1, y))) || + (Items.isLava(world.getForeMap(x+1, y)) && world.getForeMap(x+1, y)>63)) { + world.setForeMap(x+1,y,63); + updateBlock(x+1, y+1); + } else if (Items.isWater(world.getForeMap(x+1, y))) { + world.setForeMap(x+1, y, 1); + } + + if (world.getForeMap(x-1, y)==0 || + (!Items.BLOCKS.getValueAt(world.getForeMap(x-1, y)).collision && !Items.isFluid(world.getForeMap(x-1, y))) || + (Items.isLava(world.getForeMap(x-1, y)) && world.getForeMap(x-1, y)>63)) { + world.setForeMap(x-1,y,63); + updateBlock(x-1, y+1); + } else if (Items.isWater(world.getForeMap(x-1, y))) { + world.setForeMap(x-1, y, 1); + } + } + return; + } + if (world.getForeMap(x, y) == 63) { + if (world.getForeMap(x, y+1)==0 || (world.getForeMap(x, y+1)>=63 && world.getForeMap(x, y+1)<=65) || + (!Items.BLOCKS.getValueAt(world.getForeMap(x, y+1)).collision && !Items.isFluid(world.getForeMap(x, y+1)))) { + world.setForeMap(x,y+1,9); + updateBlock(x, y+2); + } else if (Items.isWater(world.getForeMap(x, y+1))) { + world.setForeMap(x, y+1, 1); + } else if (Items.BLOCKS.getValueAt(world.getForeMap(x, y+1)).collision) { + if (world.getForeMap(x+1, y)==0 || + (!Items.BLOCKS.getValueAt(world.getForeMap(x+1, y)).collision && !Items.isFluid(world.getForeMap(x+1, y))) || + (Items.isLava(world.getForeMap(x+1, y)) && world.getForeMap(x+1, y)>64)){ + world.setForeMap(x+1,y,64); + updateBlock(x+1, y+1); + } else if (Items.isWater(world.getForeMap(x+1, y))) { + world.setForeMap(x+1, y, 1); + } + + if (world.getForeMap(x-1, y)==0 || + (!Items.BLOCKS.getValueAt(world.getForeMap(x-1, y)).collision && !Items.isFluid(world.getForeMap(x-1, y))) || + (Items.isLava(world.getForeMap(x-1, y)) && world.getForeMap(x-1, y)>64)){ + world.setForeMap(x-1,y,64); + updateBlock(x-1, y+1); + } else if (Items.isWater(world.getForeMap(x-1, y))) { + world.setForeMap(x-1, y, 1); + } + } + return; + } + if (world.getForeMap(x, y) == 64) { + if (world.getForeMap(x, y+1)==0 || (world.getForeMap(x, y+1)>=63 && world.getForeMap(x, y+1)<=65) || + (!Items.BLOCKS.getValueAt(world.getForeMap(x, y+1)).collision && !Items.isFluid(world.getForeMap(x, y+1)))) { + world.setForeMap(x,y+1,9); + updateBlock(x, y+2); + } else if (Items.isWater(world.getForeMap(x, y+1))) { + world.setForeMap(x, y+1, 1); + } else if (Items.BLOCKS.getValueAt(world.getForeMap(x, y+1)).collision) { + if (world.getForeMap(x+1, y)==0 || + (!Items.BLOCKS.getValueAt(world.getForeMap(x+1, y)).collision && !Items.isFluid(world.getForeMap(x+1, y))) ){ + world.setForeMap(x+1,y,65); + updateBlock(x+1, y+1); + } else if (Items.isWater(world.getForeMap(x+1, y))) { + world.setForeMap(x+1, y, 1); + } + + if (world.getForeMap(x-1, y)==0 || + (!Items.BLOCKS.getValueAt(world.getForeMap(x-1, y)).collision && !Items.isFluid(world.getForeMap(x-1, y))) ){ + world.setForeMap(x-1,y,65); + updateBlock(x-1, y+1); + } else if (Items.isWater(world.getForeMap(x-1, y))) { + world.setForeMap(x-1, y, 1); + } + } + return; + } + if (world.getForeMap(x, y) == 65) { + if (world.getForeMap(x, y+1)==0 || (world.getForeMap(x, y+1)>=63 && world.getForeMap(x, y+1)<=65) || + (!Items.BLOCKS.getValueAt(world.getForeMap(x, y+1)).collision && !Items.isFluid(world.getForeMap(x, y+1)))) { + world.setForeMap(x,y+1,9); + updateBlock(x, y+2); + } else if (Items.isWater(world.getForeMap(x, y+1))) { + world.setForeMap(x, y+1, 1); + } + return; + } + } + + private void updateBlock(int x, int y) { + if (world.getForeMap(x, y) == 10) { + if (world.getForeMap(x, y+1)==0 || !Items.BLOCKS.getValueAt(world.getForeMap(x,y+1)).collision) { + world.setForeMap(x, y, 0); + mobs.add(new FallingSand(x*16, y*16)); + updateBlock(x, y-1); + } + } + + if (world.getForeMap(x, y) == 11) { + if (world.getForeMap(x, y+1)==0 || !Items.BLOCKS.getValueAt(world.getForeMap(x,y+1)).collision) { + world.setForeMap(x, y, 0); + mobs.add(new FallingGravel(x*16, y*16)); + updateBlock(x, y-1); + } + } + + if (world.getForeMap(x, y) == 59) { + if (world.getForeMap(x, y+1)==0 || !Items.BLOCKS.getValueAt(world.getForeMap(x, y+1)).collision) { + world.setForeMap(x,y,0); + updateBlock(x, y-1); + } + } + + if (world.getForeMap(x, y) == 2) { + if (world.getForeMap(x, y-1)>0 && (Items.BLOCKS.getValueAt(world.getForeMap(x, y-1)).collision || + Items.isFluid(world.getForeMap(x, y-1)))) { + world.setForeMap(x, y, 3); + } + } + } + public void update(float delta) { RUN_TIME += delta; + if (DO_UPD) { + for (int y=UPD_Y; y=(int)(renderer.camera.position.x+renderer.camera.viewportWidth)/16+1) { + FUPD_X = (int) renderer.camera.position.x / 16 - 1; + FUPD_Y++; + if (FUPD_Y>=(int)(renderer.camera.position.y+renderer.camera.viewportHeight)/16+1) { + FUPD_Y = (int) renderer.camera.position.y / 16 - 1; + } + } + physics.update(delta); moveCursor(); checkCursorBounds(); diff --git a/core/src/ru/deadsoftware/cavecraft/game/GameRenderer.java b/core/src/ru/deadsoftware/cavecraft/game/GameRenderer.java index 58564bf..fac4ba2 100644 --- a/core/src/ru/deadsoftware/cavecraft/game/GameRenderer.java +++ b/core/src/ru/deadsoftware/cavecraft/game/GameRenderer.java @@ -1,7 +1,9 @@ package ru.deadsoftware.cavecraft.game; import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.GL20; +import com.badlogic.gdx.graphics.glutils.ShapeRenderer; import com.badlogic.gdx.math.Vector2; import ru.deadsoftware.cavecraft.CaveGame; import ru.deadsoftware.cavecraft.GameScreen; diff --git a/core/src/ru/deadsoftware/cavecraft/game/GameWorld.java b/core/src/ru/deadsoftware/cavecraft/game/GameWorld.java index 65c9d03..42050e2 100644 --- a/core/src/ru/deadsoftware/cavecraft/game/GameWorld.java +++ b/core/src/ru/deadsoftware/cavecraft/game/GameWorld.java @@ -37,7 +37,7 @@ public class GameWorld { x = transformX(x); map = foreMap[x][y]; } catch (ArrayIndexOutOfBoundsException e) { - Gdx.app.error("GameWorld",e.toString()); + //Gdx.app.error("GameWorld",e.toString()); } return map; } @@ -47,7 +47,7 @@ public class GameWorld { x = transformX(x); foreMap[x][y] = value; } catch (ArrayIndexOutOfBoundsException e) { - Gdx.app.error("GameWorld", e.toString()); + //Gdx.app.error("GameWorld", e.toString()); } } @@ -57,7 +57,7 @@ public class GameWorld { x = transformX(x); map = backMap[x][y]; } catch (ArrayIndexOutOfBoundsException e) { - Gdx.app.error("GameWorld",e.toString()); + //Gdx.app.error("GameWorld",e.toString()); } return map; } @@ -67,13 +67,16 @@ public class GameWorld { x = transformX(x); backMap[x][y] = value; } catch (ArrayIndexOutOfBoundsException e) { - Gdx.app.error("GameWorld", e.toString()); + //Gdx.app.error("GameWorld", e.toString()); } } public void placeToForeground(int x, int y, int value) { - if (getForeMap(x,y) == 0 || value == 0) { + if (getForeMap(x,y) == 0 || value == 0 || !Items.BLOCKS.getValueAt(getForeMap(x, y)).collision) { setForeMap(x, y, value); + GameProc.UPD_X = x-8; + GameProc.UPD_Y = y-8; + GameProc.DO_UPD = true; } } diff --git a/core/src/ru/deadsoftware/cavecraft/game/Items.java b/core/src/ru/deadsoftware/cavecraft/game/Items.java index ca0c949..9987cbe 100644 --- a/core/src/ru/deadsoftware/cavecraft/game/Items.java +++ b/core/src/ru/deadsoftware/cavecraft/game/Items.java @@ -7,67 +7,153 @@ public class Items { public static ArrayMap BLOCKS = new ArrayMap(); + public static boolean isFluid(int bl) { + return (bl == 8 || bl == 9 || bl == 60 || bl == 61 || bl == 62 || bl == 63 || bl == 64 || bl == 65); + } + + public static boolean isWater(int bl) { + return (bl == 8 || bl == 60 || bl == 61 || bl == 62); + } + + public static boolean isLava(int bl) { + return (bl == 9 || bl == 63 || bl == 64 || bl == 65); + } + public static void loadBlocks() { + //0 BLOCKS.put("none", null); + //1 BLOCKS.put("stone", new Block(0)); + //2 BLOCKS.put("grass", new Block(1)); + //3 BLOCKS.put("dirt", new Block(2)); + //4 BLOCKS.put("cobblestone", new Block(3)); + //5 BLOCKS.put("planks", new Block(4)); + //6 BLOCKS.put("sapling", new Block(5,false,false,true)); + //7 BLOCKS.put("bedrock", new Block(6)); + //8 BLOCKS.put("water", new Block(7,false,false,true)); + //9 BLOCKS.put("lava", new Block(8,false,false,false)); + //10 BLOCKS.put("sand", new Block(9)); + //11 BLOCKS.put("gravel", new Block(10)); + //12 BLOCKS.put("gold_ore", new Block(11)); + //13 BLOCKS.put("iron_ore", new Block(12)); + //14 BLOCKS.put("coal_ore", new Block(13)); + //15 BLOCKS.put("log", new Block(14)); + //16 BLOCKS.put("leaves", new Block(15)); + //17 BLOCKS.put("sponge", new Block(16)); + //18 BLOCKS.put("glass", new Block(17,true,false,true)); + //19 BLOCKS.put("lapis_ore", new Block(18)); + //20 BLOCKS.put("lapis_block", new Block(19)); + //21 BLOCKS.put("sandstone", new Block(20)); + //22 BLOCKS.put("noteblock", new Block(21)); + //23 BLOCKS.put("bed_l", new Block(22,false,true,true)); + //24 BLOCKS.put("bed_r", new Block(23, false,true, true)); + //25 BLOCKS.put("cobweb", new Block(24,false,false,true)); + //26 BLOCKS.put("tallgrass", new Block(25,false,false,true)); + //27 BLOCKS.put("deadbush", new Block(26,false,false,true)); + //28 BLOCKS.put("brick_block", new Block(27)); + //29 BLOCKS.put("dandelion", new Block(28,false,false,true)); + //30 BLOCKS.put("rose", new Block(29,false,false,true)); + //31 BLOCKS.put("brown_mushroom", new Block(30,false,false,true)); + //32 BLOCKS.put("red_mushroom", new Block(31,false,false,true)); + //33 BLOCKS.put("wool_while", new Block(32,true,false,false)); + //34 BLOCKS.put("wool_orange", new Block(33,true,false,false)); + //35 BLOCKS.put("wool_magenta", new Block(34,true,false,false)); + //36 BLOCKS.put("wool_lightblue", new Block(35,true,false,false)); + //37 BLOCKS.put("wool_yellow", new Block(36,true,false,false)); + //38 BLOCKS.put("wool_lime", new Block(37,true,false,false)); + //39 BLOCKS.put("wool_pink", new Block(38,true,false,false)); + //40 BLOCKS.put("wool_gray", new Block(39,true,false,false)); + //41 BLOCKS.put("wool_lightgray", new Block(40,true,false,false)); + //42 BLOCKS.put("wool_cyan", new Block(41,true,false,false)); + //43 BLOCKS.put("wool_purple", new Block(42,true,false,false)); + //44 BLOCKS.put("wool_blue", new Block(43,true,false,false)); + //45 BLOCKS.put("wool_brown", new Block(44,true,false,false)); + //46 BLOCKS.put("wool_green", new Block(45,true,false,false)); + //47 BLOCKS.put("wool_red", new Block(46,true,false,false)); + //48 BLOCKS.put("wool_black", new Block(47,true,false,false)); + //49 BLOCKS.put("gold_block", new Block(48)); + //50 BLOCKS.put("iron_block", new Block(49)); + //51 BLOCKS.put("stone_slab", new Block(0, 8, 16,8, 50, true, false, true)); + //52 BLOCKS.put("double_stone_slab", new Block(51)); + //53 BLOCKS.put("sandstone_slab", new Block(0, 8, 16,8, 52, true, false, true)); + //54 BLOCKS.put("wooden_slab", new Block(0, 8, 16,8, 53, true, false, true)); + //55 BLOCKS.put("cobblestone_slab", new Block(0, 8, 16,8, 54, true, false, true)); + //56 BLOCKS.put("brick_slab", new Block(0, 8, 16,8, 55, true, false, true)); - BLOCKS.put("stonebrick", new Block(56)); - BLOCKS.put("stone_brick_slab", new Block(0, 8, 16,8, 57, true, false, true)); - BLOCKS.put("cactus", new Block(1, 0, 14, 16, 58, true, false, true)); + //57 + BLOCKS.put("stonebrick", new Block(64)); + //58 + BLOCKS.put("stone_brick_slab", new Block(0, 8, 16,8, 56, true, false, true)); + //59 + BLOCKS.put("cactus", new Block(1, 0, 14, 16, 57, true, false, true)); + //60 + BLOCKS.put("water_12", new Block(58,false,false,true)); + //61 + BLOCKS.put("water_8", new Block(59,false,false,true)); + //62 + BLOCKS.put("water_4", new Block(60,false,false,true)); + //63 + BLOCKS.put("lava_12", new Block(61,false,false,true)); + //64 + BLOCKS.put("lava_8", new Block(62,false,false,true)); + //65 + BLOCKS.put("lava_4", new Block(63,false,false,true)); + //66 + BLOCKS.put("obsidian", new Block(65)); } public static void load() { diff --git a/core/src/ru/deadsoftware/cavecraft/game/WorldGen.java b/core/src/ru/deadsoftware/cavecraft/game/WorldGen.java index 8c0f4ca..97b5481 100644 --- a/core/src/ru/deadsoftware/cavecraft/game/WorldGen.java +++ b/core/src/ru/deadsoftware/cavecraft/game/WorldGen.java @@ -23,7 +23,6 @@ public class WorldGen { int t; res[0] = mid; for (int i=1; i-3 && t<3) t=0; else t/=Math.abs(t); if (i>width-(max-min)) { @@ -33,6 +32,12 @@ public class WorldGen { res[i] = res[i-1] + t; if (res[i]max) res[i] = max; + if (i>=width/2) { + bMap [i] = 1; + if (res[i] < 60) res[i] = 60; + } else { + bMap[i] = 0; + } } return res; } @@ -73,7 +78,7 @@ public class WorldGen { rand = new RandomXS128(seed); foreMap = new int[width][height]; backMap = new int[width][height]; - hMap = genLandscape(width, height/8*3, height/8, height/2); + hMap = genLandscape(width, height/4, height/8, height/2); for (int x=0; x