diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/PBFSigrid.class b/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/PBFSigrid.class index 428349629..40ed0e3d4 100644 Binary files a/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/PBFSigrid.class and b/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/PBFSigrid.class differ diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/Player.class b/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/Player.class index 8ebc1ac31..31f977b61 100644 Binary files a/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/Player.class and b/out/production/Terrarum_renewed/com/Torvald/Terrarum/Actors/Player.class differ diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/MECHNANICS b/out/production/Terrarum_renewed/com/Torvald/Terrarum/MECHNANICS index efeaef346..afde37c2c 100644 --- a/out/production/Terrarum_renewed/com/Torvald/Terrarum/MECHNANICS +++ b/out/production/Terrarum_renewed/com/Torvald/Terrarum/MECHNANICS @@ -36,4 +36,10 @@ Topaz -> R·G·B -> Diamond·Amethyst * Colouring Natural: Use 4096 -Magical/Surreal: Use 24 Bits \ No newline at end of file +Magical/Surreal: Use 24 Bits + + = Colouring of potion + - Randomised, roguelike fashion + - Choose Col(R40, G40, B40) from set of finite cards: + 39, 39, 19, 19, 0, 0 + - MULTIPLY blend chosen colour with white texture \ No newline at end of file diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/MapGenerator/MapGenerator.class b/out/production/Terrarum_renewed/com/Torvald/Terrarum/MapGenerator/MapGenerator.class index 490962d2b..59379d0e1 100644 Binary files a/out/production/Terrarum_renewed/com/Torvald/Terrarum/MapGenerator/MapGenerator.class and b/out/production/Terrarum_renewed/com/Torvald/Terrarum/MapGenerator/MapGenerator.class differ diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/RoguelikeRandomiser.class b/out/production/Terrarum_renewed/com/Torvald/Terrarum/RoguelikeRandomiser.class new file mode 100644 index 000000000..3a585a500 Binary files /dev/null and b/out/production/Terrarum_renewed/com/Torvald/Terrarum/RoguelikeRandomiser.class differ diff --git a/res/locales/usermsg.csv b/res/locales/usermsg.csv index af408135b..1b7f23c24 100644 --- a/res/locales/usermsg.csv +++ b/res/locales/usermsg.csv @@ -1,4 +1,4 @@ "STRING_ID";"IETF language tag(s) without dash";"enUS";"frFR";"esES";"deDE";"itIT";"ptBR";"ptPT";"ruRU";"elGR";"trTR";"daDK";"noNB";"svSE";"nlNL";"plPL";"fiFI";"jaJP";"zhCN";"zhTW";"koKR";"csCZ";"huHU";"roRO";"thTH";"bgBG";"heIL";"jakanaJP" -"APP_CALIBRATE_YOUR_MONITOR";;"Best player experience can be achieved with properly calibrated monitor. If you have not, please do it before you play.";"Meilleure expérience de joueur peut être réalisé avec écran correctement calibré. Si vous ne l'avez pas, s.v.p. le calibrez avant de jouer.";;;;;;;;;;;;;;;"このゲームは適切に校正したモニターから最高のプレイができます。校正していなければプレイする前に校正して下さい。";;;"본 게임은 적절히 보정된 모니터에서 최상으로 즐길 수 있습니다. 보정하지 않았다면 플레이하기 전에 보정해 주십시오.";;;;;;;"この ゲームは てきせつに こうせい した モニターから さいこうの プレイが できます。こうせい して いなければ プレイする まえに こうせい して ください。" +"APP_CALIBRATE_YOUR_MONITOR";;"Best player experience can be achieved with properly calibrated monitor. If you have not, please do it before you play.";"Meilleure expérience de joueur peut être réalisé avec écran correctement calibré. Si vous ne l'avez pas, s.v.p. le calibrez avant de jouer.";;;;;;;;;;;;;;;"このゲームは、適切に校正したモニターから最高のプレイができます。校正していなければ、プレイする前に校正して下さい。";;;"본 게임은 적절히 보정된 모니터에서 최상으로 즐길 수 있습니다. 보정하지 않았다면 플레이하기 전에 보정해 주십시오.";;;;;;;"この ゲームは てきせつに こうせい した モニターから さいこうの プレイが できます。こうせい して いなければ プレイする まえに こうせい して ください。" "COPYRIGHT_MSG";;"All rights reserved.";"Tous les droits sont réservés.";;;;;;;;;;;;;;;"全著作権所有。";;;"모든 권리 보유.";;;;;;;"ぜん ちょさくけん しょゆう。" \ No newline at end of file diff --git a/res/raw/CreatureHuman.json b/res/raw/CreatureHuman.json index faea38224..5f9d9af9c 100644 --- a/res/raw/CreatureHuman.json +++ b/res/raw/CreatureHuman.json @@ -12,7 +12,7 @@ "speed" : 3.0, "speedvariable" : [100,100,100,100,100,100,100], - "jumppower" : 5.5, + "jumppower" : 5, "jumppowervariable" : [100,100,100,100,100,100,100], "scale" : 1, diff --git a/src/com/Torvald/Terrarum/Actors/PBFSigrid.java b/src/com/Torvald/Terrarum/Actors/PBFSigrid.java index 69a39270c..3eec0c09d 100644 --- a/src/com/Torvald/Terrarum/Actors/PBFSigrid.java +++ b/src/com/Torvald/Terrarum/Actors/PBFSigrid.java @@ -44,9 +44,7 @@ public class PBFSigrid { p.actorValue.set("accel", Player.WALK_ACCEL_BASE); p.actorValue.set("accelmult", 1.0f); - p.actorValue.set("jumppower", 6.5f); - // in frames - p.actorValue.set("jumplength", 30f); + p.actorValue.set("jumppower", 5f); p.actorValue.set("basemass", 80f); diff --git a/src/com/Torvald/Terrarum/Actors/Player.java b/src/com/Torvald/Terrarum/Actors/Player.java index ab6fe7494..38917dd3b 100644 --- a/src/com/Torvald/Terrarum/Actors/Player.java +++ b/src/com/Torvald/Terrarum/Actors/Player.java @@ -3,8 +3,6 @@ package com.Torvald.Terrarum.Actors; import com.Torvald.Terrarum.Actors.Faction.Faction; import com.Torvald.Terrarum.GameControl.EnumKeyFunc; import com.Torvald.Terrarum.GameControl.KeyMap; -import com.Torvald.Terrarum.MapDrawer.LightmapRenderer; -import com.Torvald.Terrarum.MapDrawer.MapCamera; import com.Torvald.Terrarum.MapDrawer.MapDrawer; import com.Torvald.Terrarum.Terrarum; import com.Torvald.spriteAnimation.SpriteAnimation; @@ -15,7 +13,6 @@ import org.lwjgl.input.Controller; import org.lwjgl.input.Controllers; import org.newdawn.slick.*; -import java.io.Serializable; import java.util.HashSet; /** @@ -25,8 +22,13 @@ public class Player extends ActorWithBody implements Controllable, Pocketed, Fac @Nullable public Controllable vehicleRiding; - int jumpPowerCounter = 0; + int jumpCounter = 0; int walkPowerCounter = 0; + private final int MAX_JUMP_LENGTH = 20; + /** + * experimental value. + */ + private final float JUMP_ACCELERATION_MOD = 92f / 10000f; private final int WALK_FRAMES_TO_MAX_ACCEL = 6; public float readonly_totalX = 0, readonly_totalY = 0; @@ -402,8 +404,8 @@ public class Player extends ActorWithBody implements Controllable, Pocketed, Fac if (!noClip) { if (super.isGrounded()) { jumping = true; - jump(); } + jump(); } else { walkVertical(true, AXIS_POSMAX); @@ -411,7 +413,7 @@ public class Player extends ActorWithBody implements Controllable, Pocketed, Fac } else { jumping = false; - jumpPowerCounter = 0; + jumpCounter = 0; } } @@ -420,43 +422,43 @@ public class Player extends ActorWithBody implements Controllable, Pocketed, Fac } + /** + * See ./work_files/Jump\ power\ by\ pressing\ time.gcx + */ private void jump() { - float len = actorValue.getAsFloat("jumplength"); - float pwr = actorValue.getAsFloat("jumppower"); + if (jumping) { + float len = MAX_JUMP_LENGTH; + float pwr = actorValue.getAsFloat("jumppower"); - //if (jumping) { - // // Limit increment of jumpPowerCounter - // if (jumpPowerCounter < len) { - // jumpPowerCounter += 1; -// - // /** - // * Limit jumping - // */ - // //super.veloY = jumpFuncSqu(pwr, len); - // super.veloY += jumpFuncLin(pwr, len); - // //super.veloY = jumpFuncExp(pwr, len); -// - // System.out.println(jumpFuncLin(pwr, len)); - // } -// - // super.grounded = false; - //} + // increment jump counter + if (jumpCounter < len) jumpCounter += 1; - // At least this works, though. Useful if it were AI-controlled. - super.setVeloY(super.getVeloY() - - - pwr * FastMath.sqrt(super.getScale()) - ); + float sumT = (jumpCounter * (jumpCounter + 1)) / 2f; + float timedJumpCharge = ((len + 1) / 2f) - (sumT / len); + if (timedJumpCharge < 0) timedJumpCharge = 0; + + float jumpAcc = pwr * timedJumpCharge * JUMP_ACCELERATION_MOD; + + super.setVeloY(super.getVeloY() + - jumpAcc + ); + } + + // for mob AI: + //super.setVeloY(super.getVeloY() + // - + // pwr * FastMath.sqrt(super.getScale()) + //); } private float jumpFuncLin(float pwr, float len) { - return -(pwr / len) * jumpPowerCounter; + return -(pwr / len) * jumpCounter; } private float jumpFuncSqu(float pwr, float len) { return (pwr / (len * len)) - * (jumpPowerCounter - len) - * (jumpPowerCounter - len) // square + * (jumpCounter - len) + * (jumpCounter - len) // square - pwr; } diff --git a/src/com/Torvald/Terrarum/MECHNANICS b/src/com/Torvald/Terrarum/MECHNANICS index efeaef346..afde37c2c 100644 --- a/src/com/Torvald/Terrarum/MECHNANICS +++ b/src/com/Torvald/Terrarum/MECHNANICS @@ -36,4 +36,10 @@ Topaz -> R·G·B -> Diamond·Amethyst * Colouring Natural: Use 4096 -Magical/Surreal: Use 24 Bits \ No newline at end of file +Magical/Surreal: Use 24 Bits + + = Colouring of potion + - Randomised, roguelike fashion + - Choose Col(R40, G40, B40) from set of finite cards: + 39, 39, 19, 19, 0, 0 + - MULTIPLY blend chosen colour with white texture \ No newline at end of file diff --git a/src/com/Torvald/Terrarum/MapGenerator/MapGenerator.java b/src/com/Torvald/Terrarum/MapGenerator/MapGenerator.java index 9e07580a7..f54ef854c 100644 --- a/src/com/Torvald/Terrarum/MapGenerator/MapGenerator.java +++ b/src/com/Torvald/Terrarum/MapGenerator/MapGenerator.java @@ -35,7 +35,7 @@ public class MapGenerator { private static int SHORE_WIDTH = 120; private static int MAX_OCEAN_DEPTH = 200; - private static final int TERRAIN_PERTURB_OFFSETMAX = 32; // [-val , val] + private static final int TERRAIN_PERTURB_OFFSETMAX = 0; // [-val , val] private static final int TERRAIN_PERTURB_LARGESTFEATURE = 256; private static final float TERRAIN_PERTURB_RATE = 0.5f; diff --git a/src/com/Torvald/Terrarum/RoguelikeRandomiser.java b/src/com/Torvald/Terrarum/RoguelikeRandomiser.java new file mode 100644 index 000000000..89e6fff24 --- /dev/null +++ b/src/com/Torvald/Terrarum/RoguelikeRandomiser.java @@ -0,0 +1,33 @@ +package com.Torvald.Terrarum; + +import com.Torvald.ColourUtil.Col4096; + +import java.util.ArrayList; +import java.util.Hashtable; + +/** + * Created by minjaesong on 16-02-23. + */ +public class RoguelikeRandomiser { + + private static final int[] POTION_PRIMARY_COLSET = {15, 15, 8, 8, 0, 0}; + + private static Hashtable potionColours; + private static ArrayList coloursTaken; + + + private static final int POTION_HEAL_TIER1 = 0x00; + private static final int POTION_HEAL_TIRE2 = 0x01; + + private static final int POTION_MAGIC_REGEN_TIER1 = 0x10; + + private static final int POTION_BERSERK_TIER1 = 0x20; + + public RoguelikeRandomiser() { + potionColours = new Hashtable<>(); + coloursTaken = new ArrayList<>(); + } + + + +} diff --git a/work_files/Jump power by pressing time.gcx b/work_files/Jump power by pressing time.gcx index 415331866..6feb1906a 100755 Binary files a/work_files/Jump power by pressing time.gcx and b/work_files/Jump power by pressing time.gcx differ