use drawRect instead of putimagedata for units (25% cpu usage reduction)

This commit is contained in:
Evan
2024-11-26 13:16:23 -08:00
parent 8abc5e4aed
commit 982caa3b23
4 changed files with 14 additions and 61 deletions
+2 -2
View File
@@ -5,7 +5,7 @@ export const devConfig = new class extends DefaultConfig {
unitInfo(type: UnitType): UnitInfo {
const info = super.unitInfo(type)
const oldCost = info.cost
info.cost = (p: Player) => oldCost(p) / 10000
info.cost = (p: Player) => 0 * oldCost(p) / 10000
return info
}
@@ -13,7 +13,7 @@ export const devConfig = new class extends DefaultConfig {
return 95
}
numSpawnPhaseTurns(): number {
return 80
return 40
}
gameCreationRate(): number {
return 20 * 1000