faster jump response, more documentation (ABOUT, MECHANICS)

Former-commit-id: 1392de885f6cbcd48102a20d707f3a9e5a4df9ca
Former-commit-id: e7908894aef53fde4b1cf391e48ac9b7fd3f0a13
This commit is contained in:
Song Minjae
2016-02-24 12:44:32 +09:00
parent 0b6d8ff44d
commit 19630e2147
15 changed files with 250 additions and 210 deletions

4
res/config_default.json Normal file
View File

@@ -0,0 +1,4 @@
{
"smoothlighting" : true,
"imtooyoungtodie" : false
}

View File

@@ -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" "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";"isIC"
"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.";;;;;;;;;;;;;;;"このゲームは、適切に調整したモニターから最高のプレイができます。調整していなかったら、プレイする前に調整して下さい。";;;"본 게임은 적절히 보정된 모니터에서 최상으로 즐길 수 있습니다. 보정하지 않았다면 플레이하기 전에 보정해 주십시오.";;;;;;;"この ゲームは てきせつに ちょうせい した モニターから さいこうの プレイが できます。ちょうせい して いなかったら プレイする まえに ちょうせい して ください。";"Best leikmaður reynsla er getur náðist með rétt kvarðaður skjárinn. Ef þú ekki gerðir, gerðu svo vel að kvarða áður en þú spilar."
"COPYRIGHT_MSG";;"All rights reserved.";"Tous les droits sont réservés.";;;;;;;;;;;;;;;"全著作権所有。";;;"모든 권리 보유.";;;;;;;"ぜん ちょさくけん しょゆう。" "COPYRIGHT_MSG";;"All rights reserved.";"Tous les droits sont réservés.";;;;;;;;;;;;;;;"全著作権所有。";;;"모든 권리 보유.";;;;;;;"ぜん ちょさくけん しょゆう。";"Allur réttur áskilinn."
1 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 isIC
2 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. このゲームは、適切に校正したモニターから最高のプレイができます。校正していなければ、プレイする前に校正して下さい。 このゲームは、適切に調整したモニターから最高のプレイができます。調整していなかったら、プレイする前に調整して下さい。 본 게임은 적절히 보정된 모니터에서 최상으로 즐길 수 있습니다. 보정하지 않았다면 플레이하기 전에 보정해 주십시오. この ゲームは てきせつに こうせい した モニターから さいこうの プレイが できます。こうせい して いなければ プレイする まえに こうせい して ください。 この ゲームは てきせつに ちょうせい した モニターから さいこうの プレイが できます。ちょうせい して いなかったら プレイする まえに ちょうせい して ください。 Best leikmaður reynsla er getur náðist með rétt kvarðaður skjárinn. Ef þú ekki gerðir, gerðu svo vel að kvarða áður en þú spilar.
3 COPYRIGHT_MSG All rights reserved. Tous les droits sont réservés. 全著作権所有。 모든 권리 보유. ぜん ちょさくけん しょゆう。 Allur réttur áskilinn.
4

View File

@@ -17,7 +17,7 @@ public class CSVFetcher {
private static StringBuffer csvString; private static StringBuffer csvString;
public static List<CSVRecord> readCSV(String csvFilePath) throws IOException { public static List<CSVRecord> readCSV(String csvFilePath) throws IOException {
csvString = new StringBuffer(); csvString = new StringBuffer(); // reset buffer every time it called
readCsvFileAsString(csvFilePath); readCsvFileAsString(csvFilePath);
CSVParser csvParser = CSVParser.parse(csvString.toString() CSVParser csvParser = CSVParser.parse(csvString.toString()

View File

@@ -6,6 +6,8 @@ import com.google.gson.JsonParser;
import java.io.IOException; import java.io.IOException;
import java.nio.file.FileSystems; import java.nio.file.FileSystems;
import java.nio.file.Files; import java.nio.file.Files;
import java.util.ArrayList;
import java.util.Iterator;
/** /**
* Created by minjaesong on 16-02-15. * Created by minjaesong on 16-02-15.
@@ -15,7 +17,7 @@ public class JsonFetcher {
private static StringBuffer jsonString; private static StringBuffer jsonString;
public static JsonObject readJson(String jsonFilePath) throws IOException { public static JsonObject readJson(String jsonFilePath) throws IOException {
jsonString = new StringBuffer(); jsonString = new StringBuffer(); // reset buffer every time it called
readJsonFileAsString(jsonFilePath); readJsonFileAsString(jsonFilePath);
JsonParser jsonParser = new JsonParser(); JsonParser jsonParser = new JsonParser();
@@ -24,6 +26,14 @@ public class JsonFetcher {
return jsonObj; return jsonObj;
} }
public static ArrayList<String> readJsonAsString(String jsonFilePath) throws IOException {
ArrayList<String> jsonFileLines = new ArrayList<>();
Files.lines(
FileSystems.getDefault().getPath(jsonFilePath)
).forEach(jsonFileLines::add);
return jsonFileLines;
}
private static void readJsonFileAsString(String path) throws IOException { private static void readJsonFileAsString(String path) throws IOException {
Files.lines( Files.lines(
FileSystems.getDefault().getPath(path) FileSystems.getDefault().getPath(path)

View File

@@ -1,4 +1,5 @@
== CHALLENGING, NOT PUNISHING https://www.youtube.com/watch?v=ea6UuRTjkKs
== CHALLENGING, NOT PUNISHING == https://www.youtube.com/watch?v=ea6UuRTjkKs
1. CONSISTENT RULES 1. CONSISTENT RULES
- No arbitrary unstoppable death - No arbitrary unstoppable death
@@ -19,7 +20,7 @@
- e.g. "One-big-hit didn't worked, may I should've picked up high DPS one" - e.g. "One-big-hit didn't worked, may I should've picked up high DPS one"
== MORE DEPTH, LESS COMPLEXITY https://www.youtube.com/watch?v=jVL4st0blGU == MORE DEPTH, LESS COMPLEXITY == https://www.youtube.com/watch?v=jVL4st0blGU
1. Memorise less! 1. Memorise less!
- Less burden to, even starting the game - Less burden to, even starting the game
@@ -37,22 +38,25 @@
- Dwarf Fortress failed this! - Dwarf Fortress failed this!
== Lots of things players play with (aka don't make them bored) == Lots of things players can play with (aka don't make them bored) ==
- Combat, battle, building, mechanics, adventure, dungeon explore, spelunking - Combat, battle, building, mechanics, adventure, dungeon explore, spelunking
- Not scaled; easy combat, tough combat, tedious combat, etc. - Not scaled; easy combat, tough combat, tedious combat, etc.
== Achieving perfect imbalance https://www.youtube.com/watch?v=e31OSVZF77w == Achieving perfect imbalance == https://www.youtube.com/watch?v=e31OSVZF77w
- Make sure no matter how you skilled, your playable character cannot be good at everything - Make sure no matter how you skilled, your playable character cannot be good at everything
- Give players __wide pool of options__ to solve problem - Give players __wide pool of options__ to solve problem
(kill the boss, defend their adobe, fast transportation, etc.) (kill the boss, defend their adobe, fast transportation, etc.)
##*=- What feeling do you want to convey to the player? -=*## What feeling do you want to convey to the player? ##*=-
== Always think WHY would you want to add _something_ on the game == Always think WHY would you want to add _something_ on the game ==
- e.g. Why you are adding RPG leveling system? - e.g. Why you are adding RPG leveling system?
@@ -60,10 +64,12 @@
See also: See also:
HEARTS, CLUBS, DIAMONDS, SPADES: PLAYERS WHO SUIT MUDS HEARTS, CLUBS, DIAMONDS, SPADES: PLAYERS WHO SUIT MUDS
==================================== ====================================
* Friendlier version of Dwarf Fortress Adventure mode == Friendlier version of Dwarf Fortress Adventure mode ==
- Yet _lots of fun_ - Yet _lots of fun_
- Add Fortress mode features by 'make your own settling' - Add Fortress mode features by 'make your own settling'
- Hard to actually die, but once you die, you're done. - Hard to actually die, but once you die, you're done.
@@ -86,28 +92,25 @@ HEARTS, CLUBS, DIAMONDS, SPADES: PLAYERS WHO SUIT MUDS
* Side view == Side view ==
* Interact menu w/ mouse right == Interact menu w/ mouse right ==
* Pixelated sprites == Pixelated sprites ==
- Use 2x sprites if rotating does not work well - Use 2x sprites if rotating does not work well
== User experience ==
### User experience ###
* Indicative mouse cursor * Indicative mouse cursor
== Game mechanics ==
### Game mechanics ###
* 24 pixels == 1 metre * 24 pixels == 1 metre
== Purpose of the game ==
### Purpose of the game ###
* Boss * Boss
- Will be mentioned/shown as absolute _evil_. - Will be mentioned/shown as absolute _evil_.
@@ -127,37 +130,3 @@ HEARTS, CLUBS, DIAMONDS, SPADES: PLAYERS WHO SUIT MUDS
- Beating boss does not ends the game, but grants an ability to - Beating boss does not ends the game, but grants an ability to
create new character as it. create new character as it.
### Making sprite ###
* Layers
- (Optional) Hair foreground
- Right arm dress
- Right arm body
- Dress
- Boot right
- Boot left
- Body
- (Optional) Hair accessory
- Hair
- Head
- Left arm dress
- Left arm body
- (Optional) SFX
* Size
- Regular sprite 'height' (hitbox height) : 40 px
- Apparent height may vary
### Chargen ###
* Select hair, colours, then compile them into single spritesheet
* NO gender distinction, but have masculine/neutral/feminine designs (in clothing, hairstyles, etc.)
* Colour: 4096 colours (12-bit 0x000 - 0xFFF)
* Base mass: 60 kg

View File

@@ -24,11 +24,11 @@ public class Player extends ActorWithBody implements Controllable, Pocketed, Fac
int jumpCounter = 0; int jumpCounter = 0;
int walkPowerCounter = 0; int walkPowerCounter = 0;
private final int MAX_JUMP_LENGTH = 20; private final int MAX_JUMP_LENGTH = 15;
/** /**
* experimental value. * experimental value.
*/ */
private final float JUMP_ACCELERATION_MOD = 92f / 10000f; private final float JUMP_ACCELERATION_MOD = 180f / 10000f;
private final int WALK_FRAMES_TO_MAX_ACCEL = 6; private final int WALK_FRAMES_TO_MAX_ACCEL = 6;
public float readonly_totalX = 0, readonly_totalY = 0; public float readonly_totalX = 0, readonly_totalY = 0;

View File

@@ -1,39 +1,39 @@
* Weapon tier == Weapon tier ==
Natural / Common Stone -> Copper -> Iron -> Silver -> Titanium Natural / Common Stone -> Copper -> Iron -> Silver -> Titanium
Forging --------------> Steel --------^ Forging --------------> Steel --------^
Exotic ('elven') Glass Aurichalcum Exotic ('elven') Glass Aurichalcum
Special (something 'adamant') ??? (Use material spec of CNT, tensile strength 180 GPa) Special (something 'adamant') ??? (Use material spec of CNT, tensile strength 180 GPa)
= Metal graphics
* Metal graphics - Gold: Hue 43, low Saturation
- Aurichalcum: Hue 43, mid-high Saturation
Gold: Hue 43, low Saturation - Copper: Hue 33,
Aurichalcum: Hue 43, mid-high Saturation - Copper rust: Hue 160
Copper: Hue 33, - Iron rust: Hue 21
Copper rust: Hue 160
Iron rust: Hue 21
* Size variation == Size variation ==
Race base weapon/tool size <- 10 [kg] Race base weapon/tool size <- 10 [kg]
Size tolerance <- (50% * str/1000), or say, 20% Size tolerance <- (50% * str/1000), or say, 20%
If the size is bigger than tolerable, weapon speed severely slows down, tools become unusable If the size is bigger than tolerable, weapon speed severely slows down, tools become unusable
if use time >= 0.75 second, the weapon/tool cannot be equipped. if use time >= 0.75 second, the weapon/tool cannot be equipped.
Small weapons gains no (dis)advantage, tools become unusable Small weapons/tools gains no (dis)advantage
Crafted tool/weapon size is dependent on the baseRaceMass. When drawing: scale by (craftedWeaponSize / baseWeaponSize)
Crafted tool/weapon size is dependent to the baseRaceMass.
* Gemstone tier == Gemstone tier ==
Topaz -> R·G·B -> Diamond·Amethyst Topaz -> R·G·B -> Diamond·Amethyst
* Colouring == Colouring ==
Natural: Use 4096 Natural: Use 4096
Magical/Surreal: Use 24 Bits Magical/Surreal: Use 24 Bits
@@ -43,3 +43,54 @@ Magical/Surreal: Use 24 Bits
- Choose Col(R40, G40, B40) from set of finite cards: - Choose Col(R40, G40, B40) from set of finite cards:
39, 39, 19, 19, 0, 0 39, 39, 19, 19, 0, 0
- MULTIPLY blend chosen colour with white texture - MULTIPLY blend chosen colour with white texture
== Roguelike identity ==
= Randomised things
- E.g. potion
Lime-coloured potion
First play: "Potion (???)"
After drank: "Potion (Healing)" is revealed.
Second (new) play: "Potion (???)"
After drank: "Potion (Neurotoxin)" is revealed.
== Making sprite ==
* Layers
- (Optional) Glow
- (Optional) Hair foreground
- Right arm dress
- Right arm body
- Dress
- Boots
- Body
- (Optional) Hair accessory
- Hair
- Head
- Left arm dress
- Left arm body
- (Optional) SFX
* Size
- Regular sprite 'height' (hitbox height) : 40 px
- Apparent height may vary
== Chargen ==
* Select hair, colours, then compile them into single spritesheet
* NO gender distinction, but have masculine/neutral/feminine looks (in clothing, hairstyles, etc.)
* Colour: 4096 colours (12-bit 0x000 - 0xFFF)
* Base mass: 60 kg
== Custom pattern making ==
- Players can create their own décors (hang on wall), dresses.
- Two looms (216 colour mode, 4096 colour mode)

View File

@@ -1,4 +0,0 @@
* Drawing
- Players can create their own décors (hang on wall), dresses.
- Two looms (216 colour mode, 4096 colour mode)

View File

@@ -184,6 +184,7 @@ public class MapCamera {
int thisTerrainTile = map.getTileFromTerrain(x, y); int thisTerrainTile = map.getTileFromTerrain(x, y);
// draw // draw
try {
if ( if (
( (
@@ -243,6 +244,10 @@ public class MapCamera {
} }
} }
} }
catch (NullPointerException e) {
// do nothing. This exception handling may hide erratic behaviour completely.
}
}
} }
tilesetBook[mode].endUse(); tilesetBook[mode].endUse();

View File

@@ -13,6 +13,8 @@ public class RoguelikeRandomiser {
private static final int[] POTION_PRIMARY_COLSET = {15, 15, 8, 8, 0, 0}; private static final int[] POTION_PRIMARY_COLSET = {15, 15, 8, 8, 0, 0};
private static Hashtable<Integer, Col4096> potionColours; private static Hashtable<Integer, Col4096> potionColours;
private static Hashtable<Col4096, Boolean> coloursDiscovered;
private static ArrayList<Col4096> coloursTaken; private static ArrayList<Col4096> coloursTaken;

View File

@@ -1,13 +1,16 @@
package com.Torvald.Terrarum; package com.Torvald.Terrarum;
import java.io.File; import java.io.File;
import java.io.FileWriter;
import java.io.IOException; import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import com.Torvald.ImageFont.GameFontBase; import com.Torvald.ImageFont.GameFontBase;
import com.Torvald.ImageFont.GameFontWhite; import com.Torvald.ImageFont.GameFontWhite;
import com.Torvald.Terrarum.ConsoleCommand.Authenticator; import com.Torvald.JsonFetcher;
import com.Torvald.Terrarum.LangPack.Lang; import com.Torvald.Terrarum.LangPack.Lang;
import org.lwjgl.input.Controllers; import org.lwjgl.input.Controllers;
import org.newdawn.slick.*; import org.newdawn.slick.*;
@@ -146,14 +149,14 @@ public class Terrarum extends StateBasedGame {
} }
private static void createFiles() throws IOException { private static void createFiles() throws IOException {
File[] files = { File configFile = new File(defaultDir + "/config.json");
new File(defaultDir + "/properties")
};
for (File f : files){ if (!configFile.exists() || configFile.length() == 0) {
if (!f.exists()){ configFile.createNewFile();
f.createNewFile(); ArrayList<String> jsonLines = JsonFetcher.readJsonAsString("./res/config_default.json");
} PrintWriter printWriter = new PrintWriter(configFile);
jsonLines.forEach(printWriter::println);
printWriter.close();
} }
} }
} }