1
0
mirror of https://github.com/veden/Rampant.git synced 2025-01-30 04:30:52 +02:00
This commit is contained in:
Aaron Veden 2018-01-25 21:48:12 -08:00
parent 102b864c36
commit e3f43edc09
14 changed files with 9060 additions and 9072 deletions

View File

@ -1,12 +1,13 @@
---------------------------------------------------------------------------------------------------
Version: 0.16.6
Date: 1. 23. 2018
Major Feature:
Features:
- Generated enemies for a large varity of things to battle
- Evolving bases now get stronger over time and specialize their units
Bugfixes:
- Creates areas clear of biters
Bugfixes:
- Fixed a cause where squads could get stuck on hard to pass terrain
Tweaks:
Tweaks:
- Increased squad movement penalty before removal from 8000 to 10000
---------------------------------------------------------------------------------------------------

View File

@ -64,6 +64,8 @@ local planning = aiPlanning.planning
local rallyUnits = aiAttackWave.rallyUnits
local recycleBases = baseUtils.recycleBases
local deathScent = pheromoneUtils.deathScent
local victoryScent = pheromoneUtils.victoryScent
@ -330,6 +332,8 @@ local function onTick(event)
tick,
surface,
gameRef.connected_players)
recycleBases(natives, tick)
end
if (tick == map.squadTick) then
map.squadTick = map.squadTick + INTERVAL_SQUAD

View File

@ -1,45 +0,0 @@
local baseProcessor = {}
-- imports
-- local nestUtils = require("NestUtils")
-- local tendrilUtils = require("TendrilUtils")
local constants = require("Constants")
-- constants
local BASE_QUEUE_SIZE = constants.BASE_QUEUE_SIZE
-- imported functions
local mMin = math.min
-- local buildOrder = nestUtils.buildOrder
-- local advanceTendrils = tendrilUtils.advanceTendrils
-- module code
function baseProcessor.processBases(map, surface, natives, tick)
local baseIndex = natives.baseIndex
local bases = natives.bases
local endIndex = mMin(baseIndex+BASE_QUEUE_SIZE, #bases)
for index = baseIndex, endIndex do
local base = bases[index]
if base.created then
end
-- buildOrder(map, natives, base, surface, tick)
-- advanceTendrils(map, base, surface, tick, natives)
end
if (endIndex == #bases) then
natives.baseIndex = 1
else
natives.baseIndex = endIndex + 1
end
end
return baseProcessor

View File

@ -4,7 +4,6 @@ local baseUtils = {}
local mathUtils = require("MathUtils")
local constants = require("Constants")
local mapUtils = require("MapUtils")
local chunkPropertyUtils = require("ChunkPropertyUtils")
-- constants
@ -87,7 +86,8 @@ local BASE_DISTANCE_TO_EVO_INDEX = constants.BASE_DISTANCE_TO_EVO_INDEX
local BASE_ALIGNMENT_EVOLUTION_BASELINE = constants.BASE_ALIGNMENT_EVOLUTION_BASELINE
local MAGIC_MAXIMUM_BASE_NUMBER = constants.MAGIC_MAXIMUM_BASE_NUMBER
local BASE_QUEUE_SIZE = constants.BASE_QUEUE_SIZE
local BASE_COLLECTION_THRESHOLD = constants.BASE_COLLECTION_THRESHOLD
local CHUNK_SIZE = constants.CHUNK_SIZE
@ -95,14 +95,11 @@ local BASE_ALIGNMENT_PATHS = constants.BASE_ALIGNMENT_PATHS
local EVOLUTION_INCREMENTS = constants.EVOLUTION_INCREMENTS
local MAGIC_MAXIMUM_NUMBER = constants.MAGIC_MAXIMUM_NUMBER
local SENTINEL_IMPASSABLE_CHUNK = constants.SENTINEL_IMPASSABLE_CHUNK
-- imported functions
local euclideanDistancePoints = mathUtils.euclideanDistancePoints
local mahattenDistancePoints = mathUtils.mahattenDistancePoints
local roundToFloor = mathUtils.roundToFloor
local gaussianRandomRange = mathUtils.gaussianRandomRange
@ -116,6 +113,8 @@ local mMax = math.max
local getChunkBase = chunkPropertyUtils.getChunkBase
local setChunkBase = chunkPropertyUtils.setChunkBase
local tRemove = table.remove
local mRandom = math.random
-- module code
@ -180,6 +179,32 @@ local function findBaseInitialAlignment(evoIndex, natives, evolutionTable)
return nil
end
function baseUtils.recycleBases(natives, tick)
local baseIndex = natives.baseIndex
local bases = natives.bases
local removeMe = {}
local endIndex = mMin(baseIndex+BASE_QUEUE_SIZE, #bases)
for index = baseIndex, endIndex do
local base = bases[index]
if ((tick - base.tick) > BASE_COLLECTION_THRESHOLD) then
removeMe[#removeMe+1] = index
end
end
for i=#removeMe, 1, -1 do
tRemove(bases, i)
end
if (endIndex == #bases) then
natives.baseIndex = 1
else
natives.baseIndex = endIndex + 1
end
end
function baseUtils.upgradeEntity(entity, surface, baseAlignment, natives, evolutionFactor)
local position = entity.position
local entityType = entity.type

View File

@ -102,6 +102,8 @@ constants.AI_MAX_TEMPERAMENT_DURATION = 15
constants.BASE_DEADZONE_TTL = constants.TICKS_A_MINUTE * 20
constants.BASE_COLLECTION_THRESHOLD = constants.TICKS_A_MINUTE * 2
constants.BASE_DISTANCE_TO_EVO_INDEX = 1 / 5480
constants.BASE_SPAWNER_UPGRADE = 300

File diff suppressed because it is too large Load Diff

View File

@ -609,7 +609,7 @@ buildUnitSpawner(
[9] = 0.5,
[10] = 0.5
},
tint = {r=0, g=0.85, b=0.1, a=0.65}
tint = {r=0, g=0.85, b=0.13, a=1}
}
},

View File

@ -55,7 +55,7 @@ buildUnitSpawner(
[9] = 1.3,
[10] = 1.4
},
tint1 = {r=0.56, g=0.46, b=0.42, a=0.65},
tint1 = {r=0.26, g=0.76, b=0.72, a=0.65},
tint2 = {r=1, g=0.63, b=0, a=0.4}
},
@ -76,7 +76,7 @@ buildUnitSpawner(
[9] = 0.5,
[10] = 0.5
},
tint = {r=1.0, g=1.0, b=1.0, a=1.0}
tint = {r=0.26, g=0.76, b=0.72, a=0.65}
}
},
@ -550,7 +550,7 @@ buildUnitSpawner(
[10] = 1.4
},
attackName = "fast-ball",
tint = {r=0.56, g=0.46, b=0.42, a=0.65},
tint = {r=0.26, g=0.76, b=0.72, a=0.65},
pTint = {r=0, g=1, b=1, a=0.5},
sTint = {r=0, g=1, b=1, a=0.5}
},
@ -573,7 +573,7 @@ buildUnitSpawner(
[9] = 0.5,
[10] = 0.5
},
tint = {r=0.99, g=0.09, b=0.09, a=1}
tint = {r=0.26, g=0.76, b=0.72, a=1}
}
},

View File

@ -84,7 +84,7 @@ buildUnitSpawner(
[10] = 1.4
},
attackName = "spitter-inferno",
tint = {r=0.65, g=0, b=0, a=0.65},
tint = {r=0.65, g=0, b=0, a=1},
pTint = {r=1, g=1, b=1, a=0.5},
sTint = {r=1, g=1, b=1, a=0.5}
},

View File

@ -528,7 +528,7 @@ buildUnitSpawner(
[10] = 1.4
},
attackName = "neutral-spitter",
tint = {r=0.56, g=0.46, b=0.42, a=0.65},
tint = {r=0.56, g=0.46, b=0.42, a=1},
pTint = {r=0, g=1, b=1, a=0.5},
sTint = {r=0, g=1, b=1, a=0.5}
},

View File

@ -60,8 +60,8 @@ buildUnitSpawner(
[9] = 1.3,
[10] = 1.4
},
tint1 = {r=0.56, g=0.46, b=0.42, a=0.65},
tint2 = {r=1, g=0.63, b=0, a=0.4}
tint1 = {r=0.76, g=0.76, b=0, a=0.65},
tint2 = {r=0.76, g=0.76, b=0, a=0.65}
},
unitSpawner = {
@ -81,7 +81,7 @@ buildUnitSpawner(
[9] = 0.5,
[10] = 0.5
},
tint = {r=1.0, g=1.0, b=1.0, a=1.0}
tint = {r=0.76, g=0.76, b=0, a=0.65}
}
},
@ -600,7 +600,7 @@ buildWorm(
[10] = 1.4
},
attackName = "nuclear-worm",
tint = {r=0.56, g=0.46, b=0.42, a=0.65},
tint = {r=0.76, g=0.76, b=0, a=0.65},
pTint = {r=0, g=1, b=1, a=0.5},
sTint = {r=0, g=1, b=1, a=0.5}
},

View File

@ -57,8 +57,8 @@ buildUnitSpawner(
[9] = 1.5,
[10] = 1.6
},
tint1 = {r=0.85, g=0.85, b=0.83, a=0.65},
tint2 = {r=0.85, g=0.85, b=0.83, a=0.65}
tint1 = {r=0.1, g=0.1, b=0.1, a=1},
tint2 = {r=0.1, g=0.1, b=0.1, a=1}
},
unitSpawner = {
@ -78,7 +78,7 @@ buildUnitSpawner(
[9] = 0.5,
[10] = 0.5
},
tint = {r=0.85, g=0.85, b=0.83, a=0.65}
tint = {r=0.1, g=0.1, b=0.1, a=1}
}
},

View File

@ -59,8 +59,8 @@ buildUnitSpawner(
[9] = 1.3,
[10] = 1.4
},
tint1 = {r=0.56, g=0.46, b=0.42, a=0.65},
tint2 = {r=1, g=0.63, b=0, a=0.4}
tint1 = {r=0.56, g=0.46, b=0, a=0.65},
tint2 = {r=0.56, g=0.46, b=0, a=0.65}
},
unitSpawner = {
@ -80,7 +80,7 @@ buildUnitSpawner(
[9] = 0.5,
[10] = 0.5
},
tint = {r=1.0, g=1.0, b=1.0, a=1.0}
tint = {r=0.56, g=0.46, b=0, a=0.65}
}
},
@ -626,7 +626,7 @@ buildWorm(
[10] = 1.4
},
attackName = "suicide-worm",
tint = {r=0.56, g=0.46, b=0.42, a=0.65},
tint = {r=0.56, g=0.46, b=0, a=0.65},
pTint = {r=0, g=1, b=1, a=0.5},
sTint = {r=0, g=1, b=1, a=0.5}
},

View File

@ -1,7 +1,8 @@
-- module code
function generateLocal()
local names = {"Alpha", "Beta", "Gamma", "Delta", "Epsilon", "Zeta", "Eta", "Theta", "Iota", "Kappa", "Lambda", "Mu", "Nu", "Xi", "Omicron", "Pi", "Rho", "Sigma", "Tau", "Upsilon", "Phi", "Chi", "Psi", "Omega"}
-- local names = {"Alpha", "Beta", "Gamma", "Delta", "Epsilon", "Zeta", "Eta", "Theta", "Iota", "Kappa", "Lambda", "Mu", "Nu", "Xi", "Omicron", "Pi", "Rho", "Sigma", "Tau", "Upsilon", "Phi", "Chi", "Psi", "Omega"}
local names = {"Neutral", "Acid", "Physical", "Electric", "Suicide", "Nuclear", "Fire", "Inferno", "Troll", "Fast", "Laser", "Mu", "Nu", "Xi", "Omicron", "Pi", "Rho", "Sigma", "Tau", "Upsilon", "Phi", "Chi", "Psi", "Omega"}
local sizes = {"Larva", "Pupae", "Worker", "Grunt", "Soldier", "General", "Overlord", "Titan", "Leviathan", "Juggernaut"}
print("[entity-name]")