Balancing / Bugfixes

This commit is contained in:
Anuken
2020-07-22 11:03:38 -04:00
parent 43ca3ca210
commit 988da3b8e9
17 changed files with 30 additions and 17 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 590 KiB

After

Width:  |  Height:  |  Size: 608 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1023 KiB

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 KiB

After

Width:  |  Height:  |  Size: 187 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 300 KiB

After

Width:  |  Height:  |  Size: 307 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 376 KiB

After

Width:  |  Height:  |  Size: 386 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 KiB

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 294 KiB

After

Width:  |  Height:  |  Size: 302 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 380 KiB

After

Width:  |  Height:  |  Size: 391 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

+12 -12
View File
@@ -1014,7 +1014,7 @@ public class Blocks implements ContentList{
thermalPump = new Pump("thermal-pump"){{
requirements(Category.liquid, with(Items.copper, 80, Items.metaglass, 90, Items.silicon, 30, Items.titanium, 40, Items.thorium, 35));
pumpAmount = 0.22f;
consumes.power(1f);
consumes.power(1.3f);
liquidCapacity = 40f;
hasPower = true;
size = 3;
@@ -1687,11 +1687,11 @@ public class Blocks implements ContentList{
//region units
groundFactory = new UnitFactory("ground-factory"){{
requirements(Category.units, with(Items.copper, 30, Items.lead, 70));
requirements(Category.units, with(Items.copper, 50, Items.lead, 120, Items.silicon, 80));
plans = new UnitPlan[]{
new UnitPlan(UnitTypes.dagger, 200f, with(Items.silicon, 10, Items.lead, 10)),
new UnitPlan(UnitTypes.crawler, 200f, with(Items.silicon, 10, Items.blastCompound, 10)),
new UnitPlan(UnitTypes.nova, 200f, with(Items.silicon, 20, Items.lead, 20, Items.titanium, 20)),
new UnitPlan(UnitTypes.dagger, 60f * 20, with(Items.silicon, 10, Items.lead, 10)),
new UnitPlan(UnitTypes.crawler, 60f * 15, with(Items.silicon, 10, Items.blastCompound, 10)),
new UnitPlan(UnitTypes.nova, 60f * 40, with(Items.silicon, 30, Items.lead, 20, Items.titanium, 20)),
};
size = 3;
consumes.power(1.2f);
@@ -1700,8 +1700,8 @@ public class Blocks implements ContentList{
airFactory = new UnitFactory("air-factory"){{
requirements(Category.units, with(Items.copper, 30, Items.lead, 70));
plans = new UnitPlan[]{
new UnitPlan(UnitTypes.flare, 200f, with(Items.silicon, 10)),
new UnitPlan(UnitTypes.mono, 200f, with(Items.silicon, 15, Items.lead, 15)),
new UnitPlan(UnitTypes.flare, 60f * 15, with(Items.silicon, 10)),
new UnitPlan(UnitTypes.mono, 60f * 35, with(Items.silicon, 30, Items.lead, 15)),
};
size = 3;
consumes.power(1.2f);
@@ -1710,7 +1710,7 @@ public class Blocks implements ContentList{
navalFactory = new UnitFactory("naval-factory"){{
requirements(Category.units, with(Items.copper, 30, Items.lead, 70));
plans = new UnitPlan[]{
new UnitPlan(UnitTypes.risse, 200f, with(Items.silicon, 20, Items.metaglass, 25)),
new UnitPlan(UnitTypes.risse, 60f * 30f, with(Items.silicon, 20, Items.metaglass, 25)),
};
size = 3;
requiresWater = true;
@@ -1724,7 +1724,7 @@ public class Blocks implements ContentList{
consumes.power(3f);
consumes.items(with(Items.silicon, 40, Items.graphite, 40));
constructTime = 60f * 5f;
constructTime = 60f * 10f;
upgrades = new UnitType[][]{
{UnitTypes.nova, UnitTypes.quasar},
@@ -1743,7 +1743,7 @@ public class Blocks implements ContentList{
consumes.power(6f);
consumes.items(with(Items.silicon, 130, Items.titanium, 80, Items.metaglass, 30));
constructTime = 60f * 15f;
constructTime = 60f * 30f;
upgrades = new UnitType[][]{
{UnitTypes.horizon, UnitTypes.zenith},
@@ -1763,7 +1763,7 @@ public class Blocks implements ContentList{
consumes.items(with(Items.silicon, 200, Items.titanium, 200, Items.surgealloy, 240));
consumes.liquid(Liquids.cryofluid, 1f);
constructTime = 60f * 60f;
constructTime = 60f * 60f * 1.5f;
upgrades = new UnitType[][]{
{UnitTypes.zenith, UnitTypes.antumbra},
@@ -1778,7 +1778,7 @@ public class Blocks implements ContentList{
consumes.items(with(Items.silicon, 300, Items.plastanium, 300, Items.surgealloy, 300, Items.phasefabric, 250));
consumes.liquid(Liquids.cryofluid, 3f);
constructTime = 60f * 60f * 3;
constructTime = 60f * 60f * 4;
upgrades = new UnitType[][]{
{UnitTypes.antumbra, UnitTypes.eclipse},
+3 -1
View File
@@ -569,6 +569,8 @@ public class UnitTypes implements ContentList{
mineTier = 1;
mineSpeed = 2.5f;
//no weapon, mining only
/*
weapons.add(new Weapon(){{
y = 1.5f;
x = 0f;
@@ -582,7 +584,7 @@ public class UnitTypes implements ContentList{
bullet = new HealBulletType(5.2f, 10){{
healPercent = 4f;
}};
}});
}});*/
}};
poly = new UnitType("poly"){{
@@ -72,7 +72,7 @@ public class ItemModule extends BlockModule{
cacheSums[i] = 0;
if(updateFlow){
displayFlow[i] = flow[i].hasEnoughData() ? flow[i].mean() : -1;
displayFlow[i] = flow[i].hasEnoughData() ? flow[i].mean() / Time.delta : -1;
}
}
}else{
@@ -88,7 +88,7 @@ public class ItemModule extends BlockModule{
public float getFlowRate(Item item){
if(flow == null) return -1f;
return displayFlow[item.id] * 60 / Time.delta;
return displayFlow[item.id] * 60;
}
public boolean hasFlowItem(Item item){
@@ -29,7 +29,7 @@ public class LiquidModule extends BlockModule{
flow.add(lastAdded);
lastAdded = 0;
if(currentFlowRate < 0 || flowTimer.get(updateInterval)){
currentFlowRate = flow.hasEnoughData() ? flow.mean() : -1f;
currentFlowRate = flow.hasEnoughData() ? flow.mean() / Time.delta : -1f;
}
}else{
currentFlowRate = -1f;
@@ -39,7 +39,7 @@ public class LiquidModule extends BlockModule{
/** @return current liquid's flow rate in u/s; any value < 0 means 'not ready'. */
public float getFlowRate(){
return currentFlowRate * 60 / Time.delta;
return currentFlowRate * 60;
}
public float smoothAmount(){
+11
View File
@@ -16,6 +16,9 @@ import java.util.concurrent.TimeUnit
def genFolder = "../core/assets-raw/sprites_out/generated/"
def doAntialias = !project.hasProperty("disableAntialias")
def colorMap = new IntMap<List<Color>>(), colorIndexMap = new IntIntMap()
//on my machine, I have a native Nim AA implementation that is ~10x faster
//it's not compiled for other platforms so they don't get it
def useFastAA = System.getProperty("user.name") == "anuke"
def transformColors = { List<List<String>> list ->
list.each{ colors ->
@@ -38,6 +41,11 @@ transformColors([["a387ea", "8a73c6", "5c5e9f"], ["6e7080", "989aa4", "b0bac0"],
def antialias = { File file ->
if(!doAntialias) return
if(useFastAA){
"antialias ${file.absolutePath}".execute().waitFor()
return
}
def image = ImageIO.read(file)
def out = ImageIO.read(file)
def getRGB = { int ix, int iy ->
@@ -354,6 +362,7 @@ task pack(dependsOn: classes){
}
ExecutorService executor = Executors.newFixedThreadPool(16)
long ms = System.currentTimeMillis()
//antialias everything except UI elements
fileTree(dir: '../core/assets-raw/sprites_out/', include: "**/*.png").visit{ file ->
@@ -371,6 +380,8 @@ task pack(dependsOn: classes){
e.printStackTrace()
}
println "Time taken for AA: ${(System.currentTimeMillis() - ms) / 1000f}"
println("\n\nPacking normal 4096 sprites...\n\n")
//pack normal sprites