From 19630e2147c3f4d97a8adc55054f6364691c843d Mon Sep 17 00:00:00 2001 From: Song Minjae Date: Wed, 24 Feb 2016 12:44:32 +0900 Subject: [PATCH] faster jump response, more documentation (ABOUT, MECHANICS) Former-commit-id: 1392de885f6cbcd48102a20d707f3a9e5a4df9ca Former-commit-id: e7908894aef53fde4b1cf391e48ac9b7fd3f0a13 --- .../com/Torvald/JsonFetcher.class | Bin 2201 -> 2756 bytes .../com/Torvald/Terrarum/Actors/Player.class | Bin 10305 -> 10305 bytes .../Terrarum/MapDrawer/MapCamera.class | Bin 10021 -> 10118 bytes .../com/Torvald/Terrarum/Terrarum.class | Bin 4888 -> 6006 bytes res/config_default.json | 4 + res/locales/usermsg.csv | 6 +- src/com/Torvald/CSVFetcher.java | 2 +- src/com/Torvald/JsonFetcher.java | 12 +- src/com/Torvald/Terrarum/ABOUT | 197 ++++++++---------- src/com/Torvald/Terrarum/Actors/Player.java | 4 +- src/com/Torvald/Terrarum/MECHNANICS | 109 +++++++--- src/com/Torvald/Terrarum/MISC_FEATURES | 4 - .../Torvald/Terrarum/MapDrawer/MapCamera.java | 101 ++++----- .../Torvald/Terrarum/RoguelikeRandomiser.java | 2 + src/com/Torvald/Terrarum/Terrarum.java | 19 +- 15 files changed, 250 insertions(+), 210 deletions(-) create mode 100644 res/config_default.json delete mode 100644 src/com/Torvald/Terrarum/MISC_FEATURES diff --git a/out/production/Terrarum_renewed/com/Torvald/JsonFetcher.class b/out/production/Terrarum_renewed/com/Torvald/JsonFetcher.class index e6693e4b28fb7cb342d24c59c21aee19390babff..cdabb73956334ed6b4428a149654a961acb06452 100644 GIT binary patch delta 1132 zcmZuxTTc^F5dKbYE88tCEnO}}q=HaDtqNGBTm%&r3#cGBFSxV|wAQw^3yLB|{R5JH z^1;7gL=!}eKKW!!eDKA;;2-eOIHzq=iA|F^-%{Q}?zO4A-j(`2L`x!tdo{NwX z5O7L_0f92OaattPEg&euf&h2-aMUZJ5B&nph_G_^00sq|6>$#dMGWBr=e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1W8KaXf z(MyZMu}bWgevNc`WM2M6pe&ti#U^y_QP*dGMekC-NAx2#bGtNT_eF>=G!{ZsJ;y}{ xaaSikQ{u5hwpRUja-!m)y3eLh_#sZRB-s@Y1y)#;`>#kHTzyqsTw|2${{VHZTblp? 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 31f977b61054cfd9fb3b355563b57d60df878d4c..f8370387f07779a16d12da600e755f78971d59b6 100644 GIT binary patch delta 35 qcmX>Ya4=wk0`ugOJsXuLFftZw-onVk$jHC>Ak#WQAXOl8Q5XR6{tQ$A delta 35 qcmX>Ya4=wk0<+lenH!ZSFfuOKyoHg6kx^vxL8f(rK&n9GqA&pLU<@?? diff --git a/out/production/Terrarum_renewed/com/Torvald/Terrarum/MapDrawer/MapCamera.class b/out/production/Terrarum_renewed/com/Torvald/Terrarum/MapDrawer/MapCamera.class index 5f968dc3c94cfd4a3c2f91ecb31dd55651ce1574..559cc37059743e534246ba8ab448b5ea8977e72c 100644 GIT binary patch delta 5009 zcmai133wIN75>lL=4IX_x!Lyx2oMpBfrv;1WRpc?7sNGevKRZ{jrY>HCs%|8w6t|2_A=%goz4cI`O( znIn(v22dlnm>7qzQ;>>-1`fsXjfRI!gwdwakvNXB6~sk!8`36hNF)VHqNc>eFeDxs zwg^a}lVXY~2_0iahSji-DAklSNjF7FhAEknl_J?<=a~E^SAU(Szsc8~1==mtUleIm ztWAkFrP`EfQ*JV@lQx~T>B2gt!j!JkO}pK7NTn$!NDqxp)TXC4y|g(=n<_(2W|A${ zI-$2Nw~r>N(dHCW`pT(c`{>c5I<}u7r|Gu8HnqCA(@hy515J#TK?ylS2J5~d+6*;h zn2F&sT$?ks8KDIlY04-Wog!z+7?b8~L&h31&XDmfO|mmA6Iyykr?U9jg7Pu*r!Sjc zRX=^+8oi%v-o*cH{6BGiNVaGOuA_t+P7zRAeHncSad?@?^`sMu~)ajB(Pf z%C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6^Ijm^EdA4AiVBa>D4nW15~~Xr#+xc9(R3#ix7MuN??NRHZ9RqU zC$PQw6gqZQK7`Jem8*75qO0d5c7WA(ubM>9I6Y*r0n?m5jzvtTim9w&GV5>;xpXgC z^*(grJ}+&}>2+90$@|%qIyU=0d?3!G7E$~`8Ur8VzwTI4?ZZ6jnh4}MR2le4*$laT z1nHyGkg@?9d%!B(Ie}g26Uf!siI<(l0ATxkbefKj@tlT_iykT#M6Q}Id*x~ri*5)b L3tJ;T$rR&d5IL;I delta 1911 zcmZWp2~?F;5dP*Z-2eSt5FP?PO%ydXEGWf1W_HZ1MDwAck-7EKr(p>A0GBe!)Y8l} z|16iXvPE08^c9++R`^}gOackVKWClsEv(YzsbgDJXEA#UL*W3IGo&;n1J^je$NCL=Z*@r)5$jHol> zStGV8Y_stkp11J=wg>PcUNY9p7GAOODqb^XUbnEr=r?Ta#4ZbO8vT}qw~g~1g?DXq z!)gofnT+>sM7rSv3m+QqMZu*l*#0g-{y7p-%Vi1Uz)zHGM-f;b-;xB%6RXbUgTK1{(><^!3ShUwJC zx|Zk!*U?Ucr=F=Eg&7LhLlkEEP{R*C26W*64VY!Fr{@rs1gE>225S~Hh>XqXe3)7h0f$GkF1?d&U&-m3%Sh$`6RKLt+fB3}Prm3U0QY)3AVYF_~D08K~vx>o60$IqZEL z%n{6$W^B*^)VwQ1&u#8T8CXe3IF5d#D?c?mCyUVd8w9Tz#-j8B7e`AZFm67{S%~(` z?81<gn*-^Fp7(9sCnEnt7DVW}6?mlbf)Pi|J?R z0N+*=4ENSi)S=t(O~~H}eNHWU1P4*nqNlSqy4 readCSV(String csvFilePath) throws IOException { - csvString = new StringBuffer(); + csvString = new StringBuffer(); // reset buffer every time it called readCsvFileAsString(csvFilePath); CSVParser csvParser = CSVParser.parse(csvString.toString() diff --git a/src/com/Torvald/JsonFetcher.java b/src/com/Torvald/JsonFetcher.java index 7623b63bb..c8829538a 100644 --- a/src/com/Torvald/JsonFetcher.java +++ b/src/com/Torvald/JsonFetcher.java @@ -6,6 +6,8 @@ import com.google.gson.JsonParser; import java.io.IOException; import java.nio.file.FileSystems; import java.nio.file.Files; +import java.util.ArrayList; +import java.util.Iterator; /** * Created by minjaesong on 16-02-15. @@ -15,7 +17,7 @@ public class JsonFetcher { private static StringBuffer jsonString; public static JsonObject readJson(String jsonFilePath) throws IOException { - jsonString = new StringBuffer(); + jsonString = new StringBuffer(); // reset buffer every time it called readJsonFileAsString(jsonFilePath); JsonParser jsonParser = new JsonParser(); @@ -24,6 +26,14 @@ public class JsonFetcher { return jsonObj; } + public static ArrayList readJsonAsString(String jsonFilePath) throws IOException { + ArrayList jsonFileLines = new ArrayList<>(); + Files.lines( + FileSystems.getDefault().getPath(jsonFilePath) + ).forEach(jsonFileLines::add); + return jsonFileLines; + } + private static void readJsonFileAsString(String path) throws IOException { Files.lines( FileSystems.getDefault().getPath(path) diff --git a/src/com/Torvald/Terrarum/ABOUT b/src/com/Torvald/Terrarum/ABOUT index bdef43298..66265535a 100644 --- a/src/com/Torvald/Terrarum/ABOUT +++ b/src/com/Torvald/Terrarum/ABOUT @@ -1,58 +1,62 @@ -== CHALLENGING, NOT PUNISHING https://www.youtube.com/watch?v=ea6UuRTjkKs -1. CONSISTENT RULES - - No arbitrary unstoppable death +== CHALLENGING, NOT PUNISHING == https://www.youtube.com/watch?v=ea6UuRTjkKs -2. Player's skill involved - - Can play around, not restart + 1. CONSISTENT RULES + - No arbitrary unstoppable death -3. Usability of in-game tools - - Players should be able to 'regret' their strategy and adjust. + 2. Player's skill involved + - Can play around, not restart -4. Comfortable control + 3. Usability of in-game tools + - Players should be able to 'regret' their strategy and adjust. -5. Make players overcome the challenge, not defeating them + 4. Comfortable control -6. Let players have "aha" moment when they failed. - - Make them hungry to retry with new strategies. - - Some small things they've could done differently - - e.g. "One-big-hit didn't worked, may I should've picked up high DPS one" + 5. Make players overcome the challenge, not defeating them + + 6. Let players have "aha" moment when they failed. + - Make them hungry to retry with new strategies. + - Some small things they've could done differently + - 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! - - Less burden to, even starting the game - - Start with gentle learning curve, getting slowly steep - - Intuitive UX (UI, control, ...) - - Good tutorial = lessens complexity + 1. Memorise less! + - Less burden to, even starting the game + - Start with gentle learning curve, getting slowly steep + - Intuitive UX (UI, control, ...) + - Good tutorial = lessens complexity -2. Intuitive! + 2. Intuitive! -3. Calculations per second - - reduce! + 3. Calculations per second + - reduce! -4. Players have to know everything to even begin the play == FAIL (irreducible complexity) - - Make them get familiar with rules of the game - - Dwarf Fortress failed this! + 4. Players have to know everything to even begin the play == FAIL (irreducible complexity) + - Make them get familiar with rules of the game + - 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 - 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 - Give players __wide pool of options__ to solve problem (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? @@ -60,104 +64,69 @@ See also: HEARTS, CLUBS, DIAMONDS, SPADES: PLAYERS WHO SUIT MUDS + ==================================== -* Friendlier version of Dwarf Fortress Adventure mode -- Yet _lots of fun_ -- Add Fortress mode features by 'make your own settling' -- Hard to actually die, but once you die, you're done. - + Config: imtooyoungtodie for easy mode +== Friendlier version of Dwarf Fortress Adventure mode == -- Genre: Adventure, Open world (towns in RPG, building, town managing (conquer existing one or - you build one and persuade existing people to move in) -> See Dwarf Fortress and Animal Crossing) + - Yet _lots of fun_ + - Add Fortress mode features by 'make your own settling' + - Hard to actually die, but once you die, you're done. + + Config: imtooyoungtodie for easy mode + + - Genre: Adventure, Open world (towns in RPG, building, town managing (conquer existing one or + you build one and persuade existing people to move in) -> See Dwarf Fortress and Animal Crossing) + + * Adventure: adventure this vast—5,5 km wide—world, discover new (and good/horrible) things + + * Open world: + - Building: building your own houses, structures, etc. + - Town managing: + 1. Build your own little hamlet and manage it + or- + 2. Conquer existing one and become a ruler + The town is a special hamlet that can be tailored for your taste + - Survival: + mobs will trying to attack your assets (yourself, your hamlet, your people) + + + +== Side view == - * Adventure: adventure this vast—5,5 km wide—world, discover new (and good/horrible) things +== Interact menu w/ mouse right == - * Open world: - - Building: building your own houses, structures, etc. - - Town managing: - 1. Build your own little hamlet and manage it - or- - 2. Conquer existing one and become a ruler - The town is a special hamlet that can be tailored for your taste - - Survival: - mobs will trying to attack your assets (yourself, your hamlet, your people) - - - -* Side view - -* Interact menu w/ mouse right - -* Pixelated sprites +== Pixelated sprites == - 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 - - Will be mentioned/shown as absolute _evil_. - - But actually is not. - -* Theme - - Is an evil really really is what we think? - - Is there a thing as 'absolute evil'? - -* Boss character - - From debugger character - - Name key: "Sigriðr hinn Dróttningin" (can be changed) - * Little setting - - A ruler, hated by people - -* Mechanics - - Beating boss does not ends the game, but grants an ability to - 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 + * Boss + - Will be mentioned/shown as absolute _evil_. + - But actually is not. + + * Theme + - Is an evil really really is what we think? + - Is there a thing as 'absolute evil'? + + * Boss character + - From debugger character + - Name key: "Sigriðr hinn Dróttningin" (can be changed) + * Little setting + - A ruler, hated by people + + * Mechanics + - Beating boss does not ends the game, but grants an ability to + create new character as it. + \ No newline at end of file diff --git a/src/com/Torvald/Terrarum/Actors/Player.java b/src/com/Torvald/Terrarum/Actors/Player.java index 38917dd3b..d820857d0 100644 --- a/src/com/Torvald/Terrarum/Actors/Player.java +++ b/src/com/Torvald/Terrarum/Actors/Player.java @@ -24,11 +24,11 @@ public class Player extends ActorWithBody implements Controllable, Pocketed, Fac int jumpCounter = 0; int walkPowerCounter = 0; - private final int MAX_JUMP_LENGTH = 20; + private final int MAX_JUMP_LENGTH = 15; /** * 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; public float readonly_totalX = 0, readonly_totalY = 0; diff --git a/src/com/Torvald/Terrarum/MECHNANICS b/src/com/Torvald/Terrarum/MECHNANICS index afde37c2c..29f9f4fbf 100644 --- a/src/com/Torvald/Terrarum/MECHNANICS +++ b/src/com/Torvald/Terrarum/MECHNANICS @@ -1,45 +1,96 @@ -* Weapon tier +== Weapon tier == -Natural / Common Stone -> Copper -> Iron -> Silver -> Titanium -Forging --------------> Steel --------^ -Exotic ('elven') Glass Aurichalcum -Special (something 'adamant') ??? (Use material spec of CNT, tensile strength 180 GPa) + Natural / Common Stone -> Copper -> Iron -> Silver -> Titanium + Forging --------------> Steel --------^ + Exotic ('elven') Glass Aurichalcum + Special (something 'adamant') ??? (Use material spec of CNT, tensile strength 180 GPa) + + = Metal graphics + - Gold: Hue 43, low Saturation + - Aurichalcum: Hue 43, mid-high Saturation + - Copper: Hue 33, + - Copper rust: Hue 160 + - Iron rust: Hue 21 -* Metal graphics +== Size variation == -Gold: Hue 43, low Saturation -Aurichalcum: Hue 43, mid-high Saturation -Copper: Hue 33, -Copper rust: Hue 160 -Iron rust: Hue 21 + Race base weapon/tool size <- 10 [kg] + Size tolerance <- (50% * str/1000), or say, 20% + + 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. + Small weapons/tools gains no (dis)advantage + + When drawing: scale by (craftedWeaponSize / baseWeaponSize) + + Crafted tool/weapon size is dependent to the baseRaceMass. -* Size variation +== Gemstone tier == -Race base weapon/tool size <- 10 [kg] -Size tolerance <- (50% * str/1000), or say, 20% - -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. -Small weapons gains no (dis)advantage, tools become unusable - -Crafted tool/weapon size is dependent on the baseRaceMass. + Topaz -> R·G·B -> Diamond·Amethyst -* Gemstone tier +== Colouring == -Topaz -> R·G·B -> Diamond·Amethyst - - -* Colouring - -Natural: Use 4096 -Magical/Surreal: Use 24 Bits + Natural: Use 4096 + 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 + - 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) \ No newline at end of file diff --git a/src/com/Torvald/Terrarum/MISC_FEATURES b/src/com/Torvald/Terrarum/MISC_FEATURES deleted file mode 100644 index 67fd5594b..000000000 --- a/src/com/Torvald/Terrarum/MISC_FEATURES +++ /dev/null @@ -1,4 +0,0 @@ -* Drawing - -- Players can create their own décors (hang on wall), dresses. -- Two looms (216 colour mode, 4096 colour mode) \ No newline at end of file diff --git a/src/com/Torvald/Terrarum/MapDrawer/MapCamera.java b/src/com/Torvald/Terrarum/MapDrawer/MapCamera.java index 29ee03631..0fa1f9e52 100644 --- a/src/com/Torvald/Terrarum/MapDrawer/MapCamera.java +++ b/src/com/Torvald/Terrarum/MapDrawer/MapCamera.java @@ -184,63 +184,68 @@ public class MapCamera { int thisTerrainTile = map.getTileFromTerrain(x, y); // draw - if ( + try { + if ( - ( - ( // wall and not blocked - (mode == WALL) && isWallThatBeDrawn(x, y) - ) - || - (mode == TERRAIN) - ) // not an air tile - && (thisTile > 0) - && - // check if light level of upper tile is zero and - // that of this tile is also zero - (((y > 0) - && !((LightmapRenderer.getValueFromMap(x, y) == 0) - && (LightmapRenderer.getValueFromMap(x, y - 1) == 0)) - ) - || - // check if light level of this tile is zero, for y = 0 - ((y == 0) - && (LightmapRenderer.getValueFromMap(x, y) > 0) - ))) { + ( + ( // wall and not blocked + (mode == WALL) && isWallThatBeDrawn(x, y) + ) + || + (mode == TERRAIN) + ) // not an air tile + && (thisTile > 0) + && + // check if light level of upper tile is zero and + // that of this tile is also zero + (((y > 0) + && !((LightmapRenderer.getValueFromMap(x, y) == 0) + && (LightmapRenderer.getValueFromMap(x, y - 1) == 0)) + ) + || + // check if light level of this tile is zero, for y = 0 + ((y == 0) + && (LightmapRenderer.getValueFromMap(x, y) > 0) + ))) { - int nearbyTilesInfo; - //if (thisTile == DIRT) { - // nearbyTilesInfo = getGrassInfo(x, y, GRASS); - //} - //else { - // nearbyTilesInfo = getNearbyTilesInfo(x, y, AIR); - //} + int nearbyTilesInfo; + //if (thisTile == DIRT) { + // nearbyTilesInfo = getGrassInfo(x, y, GRASS); + //} + //else { + // nearbyTilesInfo = getNearbyTilesInfo(x, y, AIR); + //} - if (isDarkenAir((byte) thisTile)) { - nearbyTilesInfo = getNearbyTilesInfo(x, y, mode, AIR); - } - else if (isConnectSelf((byte) thisTile)) { - nearbyTilesInfo = getNearbyTilesInfo(x, y, mode, thisTile); - } - else { - nearbyTilesInfo = 0; - } + if (isDarkenAir((byte) thisTile)) { + nearbyTilesInfo = getNearbyTilesInfo(x, y, mode, AIR); + } + else if (isConnectSelf((byte) thisTile)) { + nearbyTilesInfo = getNearbyTilesInfo(x, y, mode, thisTile); + } + else { + nearbyTilesInfo = 0; + } - int thisTileX = nearbyTilesInfo; - int thisTileY = thisTile; + int thisTileX = nearbyTilesInfo; + int thisTileY = thisTile; - if (drawModeTilesBlendMul) { - if (isBlendMul((byte) thisTile)) { + if (drawModeTilesBlendMul) { + if (isBlendMul((byte) thisTile)) { + drawTile(mode, x, y, thisTileX, thisTileY); + } + } + else { + // currently it draws all the transparent tile and colour mixes + // on top of the previously drawn tile + // TODO check wether it works as intended when skybox is dark + // add instruction "if (!isBlendMul((byte) thisTile))" drawTile(mode, x, y, thisTileX, thisTileY); } } - else { - // currently it draws all the transparent tile and colour mixes - // on top of the previously drawn tile - // TODO check wether it works as intended when skybox is dark - // add instruction "if (!isBlendMul((byte) thisTile))" - drawTile(mode, x, y, thisTileX, thisTileY); - } + } + catch (NullPointerException e) { + // do nothing. This exception handling may hide erratic behaviour completely. } } } diff --git a/src/com/Torvald/Terrarum/RoguelikeRandomiser.java b/src/com/Torvald/Terrarum/RoguelikeRandomiser.java index 89e6fff24..106f63855 100644 --- a/src/com/Torvald/Terrarum/RoguelikeRandomiser.java +++ b/src/com/Torvald/Terrarum/RoguelikeRandomiser.java @@ -13,6 +13,8 @@ public class RoguelikeRandomiser { private static final int[] POTION_PRIMARY_COLSET = {15, 15, 8, 8, 0, 0}; private static Hashtable potionColours; + private static Hashtable coloursDiscovered; + private static ArrayList coloursTaken; diff --git a/src/com/Torvald/Terrarum/Terrarum.java b/src/com/Torvald/Terrarum/Terrarum.java index 3ee72ddee..3afbe09cc 100644 --- a/src/com/Torvald/Terrarum/Terrarum.java +++ b/src/com/Torvald/Terrarum/Terrarum.java @@ -1,13 +1,16 @@ package com.Torvald.Terrarum; import java.io.File; +import java.io.FileWriter; import java.io.IOException; +import java.io.PrintWriter; +import java.util.ArrayList; import java.util.logging.Level; import java.util.logging.Logger; import com.Torvald.ImageFont.GameFontBase; import com.Torvald.ImageFont.GameFontWhite; -import com.Torvald.Terrarum.ConsoleCommand.Authenticator; +import com.Torvald.JsonFetcher; import com.Torvald.Terrarum.LangPack.Lang; import org.lwjgl.input.Controllers; import org.newdawn.slick.*; @@ -146,14 +149,14 @@ public class Terrarum extends StateBasedGame { } private static void createFiles() throws IOException { - File[] files = { - new File(defaultDir + "/properties") - }; + File configFile = new File(defaultDir + "/config.json"); - for (File f : files){ - if (!f.exists()){ - f.createNewFile(); - } + if (!configFile.exists() || configFile.length() == 0) { + configFile.createNewFile(); + ArrayList jsonLines = JsonFetcher.readJsonAsString("./res/config_default.json"); + PrintWriter printWriter = new PrintWriter(configFile); + jsonLines.forEach(printWriter::println); + printWriter.close(); } } }