MeteHun 24 Posted 4 hours ago First of all, despite optimization issues, it's one of the best strategy games available on mobile devices. As for mods, they're a complete disaster. It would be great if Steam Workshop mods were hosted elsewhere and downloadable with a single click from within the game (for iOS and Android). The overall gameplay is quite illogical. Even with the most basic knowledge of economics, you can conquer Russia as Norway by balancing your economic, administrative, and military expenditures with strategic investments. (The AI fails miserably at diplomacy, investment, and establishing a solid defense line.) However, when mods that fix these issues (available only on PC) are installed, they cause a significant drop in performance. In fact, the divide-and-conquer algorithms are used quite efficiently for "Lukasz, the one-man army," but can cause lag and even crashes on a mid-range Android device. (Even loading the game takes about 1.3 minutes.) Therefore, I think some changes need to be made to the files, at least for the mobile version. First of all, modding is a big priority for a strategy game, but will everything be moddable? If so, I think using in-game tools instead of plain text files would be more efficient. 1-) Regarding plain text files, let's consider configurations that are a mix of JSON and JSON5. Actually, the LibGdx game engine is efficient in terms of ease of development, but I can't say the same for performance. Sure, technology, units, and leaderboards are fine, but ProvincePoints Province is a bit excessive, isn't it? Who will fix these JSONs? If anyone can do it, congratulations! INFO: JSON is an efficient file format for holding nested hierarchical data, but it's not efficient for explicitly repeating patterns or sequential integer sequences. Let's consider an example. { pX:[9017,9013,9009,9006,9005,9001,8998,8996,8998,8999,8996,8992,8990,8987,8984,8980,8977,8976,8971,8972,8977,8979,8984,8985,8987,8988,8989,8990,8991,8991,8992,8992,8993,8995,8995,8996,8998,8999,9000,9000,9004,9007,9007,9008,9008,9009,9011,9011,9012,9012,9013,9014,9014,9015,9015,9016,9016,9017], pY:[2588,2589,2591,2592,2596,2598,2597,2593,2588,2584,2579,2581,2578,2576,2577,2579,2574,2571,2568,2566,2565,2566,2564,2561,2560,2557,2556,2556,2557,2558,2558,2559,2559,2560,2561,2561,2562,2563,2563,2564,2564,2565,2566,2567,2568,2568,2569,2571,2573,2575,2576,2579,2580,2581,2584,2585,2586,2587] }, I think it should be in binary format because nobody's going to manually change it anyway (it's already made clear by the map editor), so the processor doesn't need to constantly convert these short numbers unnecessarily. For example, in my sample file I have 2576 = 0xA10. If it were a Java-compatible bytecode, the maps would load more smoothly. Let's continue with JSON. I definitely agree about the gameValues folder; JSON5 is the correct format because it contains constant values and arrays. However, buildings, technology units, or hierarchical data like map/data/ProvinceDetails.json and ProvinceNamePoints.json don't exist. It would be better if these were CSV instead of JSON. It would be easier to edit with Office applications, offer smaller file sizes in larger formats, and be easier to modify during any updates. example json: "pid:0,co:2,re:0,tr:5,lp:-1,rs:12,gr:26.243998,bd:22,sx:0,sy:0}, {pid:1,co:2,re:0,tr:5,lp:-1,rs:12,gr:27.702,bd:24,sx:2,sy:-1}, {pid:2,co:2,re:0,tr:5,lp:-1,rs:20,gr:18.225,bd:19,sx:0,sy:1}, {pid:3,co:2,re:0,tr:1,lp:-1,rs:17,gr:16.766998,bd:23,sx:-1,sy:1}," example csv: "pid,co,re,tr,lp,rs,gr,bd,sx,sy 0,2,0,5,-1,12,26.243998,22,0,0 1,2,0,5,-1,12,27.702,24,2,-1 2,2,0,5,-1,20,18.225,19,0,1 3,2,0,1,-1,17,16.766998,23,-1,1" Also, I don't understand why the fields in the buildings.json file are arrays. I think Lukasz initially designed a level system but then abandoned it. "Name,ImageID,GroupID,CostGold,MaintenanceCost,ConstructionTime,ProductionEfficiency,IncomeProduction,LocalGrowthRate,IncreaseGrowthRateCost,Economy,RequiredResource,RequiredTechID,SeaAccessRequired,AI,MaximumManpower,MonthlyLegacy,IncreaseTaxEfficiencyCost,LocalTaxEfficiency,ResearchPoints,InvestInEconomyCost,IncreaseManpowerCost,ConstructionCost,MonthlyIncome,MaxInfrastructure,DevelopInfrastructureCost,DiseaseDeathRate GrainFarm,26,2,75,0.0,365,50,10,6,-0.05,2.2,0,4,false,5,,,,,,,,,,,, RiceFarm,27,2,75,0.0,365,50,10,6,-0.05,2.2,1,4,false,5,,,,,,,,,,,, Fishery,6,2,75,0.0,365,50,10,4,-0.05,3.6,2,3,false,5,,,,,,,,,,,, Ranch,25,2,75,0.0,365,50,10,3,-0.05,2.6,3,12,false,5,50,,,,,,,,,,, CropFarm,28,2,75,0.0,365,50,10,4,-0.05,2.3,4,4,false,5,,,,,,,,,,,, SpicePlantation,29,2,75,0.0,365,50,10,2,-0.05,3.1,5,30,false,5,,0.1,,,,,,,,,, HuntingGround,30,2,75,0.0,365,50,10,2,,3.5,6,5,false,5,,,,,,,,,,,, Vineyard,31,2,75,0.0,365,50,10,3,,2.8,7,14,false,5,,0.05,-0.05,,,,,,,,, CoffeePlantation,32,2,75,0.0,365,50,10,3,,3.1,8,30,false,5,,,,6.0,,,,,,,, CocoaPlantation,33,2,75,0.0,365,50,10,3,,3.1,9,41,false,5,,,,,0.1,,,,,,, TeaPlantation,34,2,75,0.0,365,50,10,3,,2.8,10,30,false,5,,,,,,-0.04,,,,,, SugarPlantation,35,2,75,0.0,365,50,10,2,,3.9,11,28,false,5,,,,,,-0.05,,,,,, SaltMine,37,2,75,0.0,365,50,10,2,,4.2,12,19,false,5,,,,,,-0.05,,,,,, TobaccoPlantation,38,2,75,0.0,365,50,10,2,,3.2,13,31,false,5,,,,,,,-0.05,,,,, SheepFarm,39,2,75,0.0,365,50,10,4,-0.04,2.8,14,7,false,5,,,,,,,-0.05,,,,, CottonPlantation,40,2,75,0.0,365,50,10,2,,3.6,15,37,false,5,,,,,,,-0.05,,,,, DyePlantation,41,2,75,0.0,365,50,10,3,-0.05,3.8,16,36,false,5,,,,,,,,,,,, SilkPlantation,42,2,75,0.0,365,50,10,3,-0.05,3.8,17,32,false,5,,,,,,,,,,,, LoggingCamp,22,2,75,0.0,365,50,10,,,3.8,18,9,false,5,,,,,,-0.05,,-0.1,,,, Mine,36,2,75,0.0,365,50,10,,,4.3,19,19,false,5,,,,,,-0.05,,,,,, Mine,36,2,75,0.0,365,50,10,,,4.4,20,19,false,5,,,,,,-0.05,,,,,, SilverMine,24,2,75,0.0,365,50,10,,,4.6,21,19,false,5,,,,,,,,,0.2,,, GoldMine,23,2,75,0.0,365,50,10,,,4.8,22,19,false,5,,,,,,,,,0.35,,, Ivory,43,2,75,0.0,365,50,10,,-0.05,3.6,23,24,false,5,,0.15,,,,,,,,,, DiamondMine,44,2,75,0.0,365,50,10,,,3.9,24,42,false,5,,0.1,,,,,,,0.2,,, Mine,36,2,75,0.0,365,50,10,,,4.1,25,75,false,5,,,,,,-0.05,,,,,, OilRig,45,2,75,0.0,365,50,10,,,6.4,26,60,false,5,,,,,,,,,0.2,,, Mine,44,2,75,0.0,365,50,10,,,4.4,27,75,false,5,,,,,,-0.05,,,,,, MarbleQuarry,46,2,75,0.0,365,50,10,,,4.6,28,24,false,5,,0.15,,,,,,,0.1,,, PorcelainWorkshop,47,2,75,0.0,365,50,10,,,3.8,29,18,false,5,,,-0.05,,,,,,0.1,,, OpiumPlantation,48,2,75,0.0,365,50,10,1,,3.7,30,42,false,5,,,,,,,-0.05,,,,, FurnitureWorkshop,49,2,75,0.0,365,50,10,,,4.5,31,36,false,5,,,,,,-0.05,,,0.1,2,, LoggingCamp,50,2,75,0.0,365,50,10,,,4.3,32,9,false,5,,,,,,,,-0.1,0.1,,, PaperMill,51,2,75,0.0,365,50,10,,,4.4,33,22,false,5,,0.1,-0.05,,,,,,0.1,,-0.05, TextileMill,52,2,75,0.0,365,50,10,,-0.05,4.9,34,32,false,5,,,,,,,,,0.1,,, Mine,44,2,75,0.0,365,50,10,,,4.3,35,60,false,5,,,,,,-0.05,,,,,, SteelMill,53,2,75,0.0,365,50,10,,,5.9,36,60,false,5,,,,,,-0.075,,,0.1,,, VanillaPlantation,54,2,75,0.0,365,50,10,3,,3.8,37,42,false,5,,,-0.05,,,,,,,,, CinnamonPlantation,55,2,75,0.0,365,50,10,2,,3.6,38,42,false,5,,,-0.05,,,,,,,,, SaffronFarm,56,2,75,0.0,365,50,10,2,,3.4,39,45,false,5,,,,,,,,,0.3,,,-0.1 TomatoPlantation,57,2,75,0.0,365,50,10,4,,3.2,40,44,false,5,,,,,,,,,,,, BananaPlantation,58,2,75,0.0,365,50,10,3,,3.5,41,44,false,5,,,,,,,,,,,, Glassworks,59,2,75,0.0,365,50,10,,,4.8,42,23,false,5,,,,2.2,,,,,0.15,,, HopPlantation,60,2,75,0.0,365,50,10,3,,3.6,43,29,false,5,,,,,,,,,,,, Brewery,61,2,75,0.0,365,50,10,,,4.1,44,29,false,5,100,,,,,,-0.05,,,,, Creamery,62,2,75,0.0,365,50,10,,,3.4,45,36,false,5,,,,,,,,,0.1,,, LimeFarm,63,2,75,0.0,365,50,10,3,,3.2,46,45,false,5,,,,,,,,,,,, OliveFarm,92,2,75,0.0,365,50,10,3,,3.4,47,4,false,5,,0.05,,,,,,,,,, Dates,93,2,75,0.0,365,50,10,4,,3.4,48,45,false,5,,,-0.05,,,,,,,,," ---This is more efficient.--- 2) In the game settings, under the "Optimize Flags" option, there are over 3500 flags in XH, while under the "Flags" option there are approximately 2000 flags, most of which are from Era 2. At the very least, with resizing, all H X S flags should have the same number and be the same as the existing flags, and the flags shouldn't be generated by AI. I have an example zip file. This is important because when you lower the graphics, even if you're looking for 27x18 files, most end up being 154x100, so you won't see much improvement in performance. 3) Now let's move on to graphics. PNG is a universal standard; it can be opened and edited on any device. Classic 2D drawing files are, of course, important for the modding community. However, PNG is a RAM-intensive format. It's best to avoid this format in games. LIBGDX supports KTX v1 by default, and the open-source plugin GDX-Basis-Universal supports KTX2 (KTX1 in my example). This can significantly increase both loading and gameplay speed. To avoid deterring modders, adding a converter tool to the game means there will be no need to strain the CPU for graphics, and modding will not be compromised. I believe the game will run more smoothly with these suggestions. Example: https://www.mediafire.com/file/b2gg1l1vzcnk522/examples.zip/file Quote Share this post Link to post Share on other sites More sharing options...