Compare commits
6 Commits
testing
...
3fcc7211ce
| Author | SHA1 | Date | |
|---|---|---|---|
| 3fcc7211ce | |||
| 6ee66a627d | |||
| e48d4bbe88 | |||
| 6f6a1be3bd | |||
| 9e13c8bbe3 | |||
| b6c683298b |
+39
-73
@@ -2,6 +2,7 @@ extends Node
|
|||||||
const E = preload("res://world/owniverse/math/exact.gd")
|
const E = preload("res://world/owniverse/math/exact.gd")
|
||||||
|
|
||||||
const SPEED_LIMIT: int = 6
|
const SPEED_LIMIT: int = 6
|
||||||
|
const SUPPORTED_LOCALES: PackedStringArray = ["en", "ru"]
|
||||||
|
|
||||||
# Write a readable diagnostic copy next to the encrypted save. Never used for loading.
|
# Write a readable diagnostic copy next to the encrypted save. Never used for loading.
|
||||||
var save_plaintext_copy: bool = true
|
var save_plaintext_copy: bool = true
|
||||||
@@ -9,27 +10,43 @@ var save_plaintext_copy: bool = true
|
|||||||
var Settings: Dictionary = {
|
var Settings: Dictionary = {
|
||||||
"filename": "save-0001",
|
"filename": "save-0001",
|
||||||
"sound_volume": 1.0,
|
"sound_volume": 1.0,
|
||||||
|
"music_volume": 1.0,
|
||||||
|
"sound_enabled": true,
|
||||||
|
"music_enabled": true,
|
||||||
"language": "en",
|
"language": "en",
|
||||||
}
|
}
|
||||||
|
|
||||||
# TODO getter setter for locale
|
#var Locales: Dictionary = {}
|
||||||
|
var _locale: String = "en"
|
||||||
var Locales: Dictionary = {}
|
var Locale: String:
|
||||||
var Locale = "en"
|
get:
|
||||||
|
return _locale
|
||||||
|
set(value):
|
||||||
|
set_locale(value)
|
||||||
|
|
||||||
var OwniverseEntities: Dictionary = {}
|
var OwniverseEntities: Dictionary = {}
|
||||||
var OwniverseItems: Dictionary = {}
|
var OwniverseItems: Dictionary = {}
|
||||||
var Templates: Dictionary = {}
|
var Templates: Dictionary = {}
|
||||||
var LifeRules: Dictionary = {}
|
var LifeRules: Dictionary = {}
|
||||||
var CivilizationRules: Dictionary = {}
|
var CivilizationRules: Dictionary = {}
|
||||||
|
var ExtraParams: Dictionary = {}
|
||||||
|
|
||||||
var batch_count: float = 40.0 # must be even not odd
|
var Music: Dictionary = {}
|
||||||
|
var Effects: Dictionary = {}
|
||||||
|
|
||||||
|
var batch_count: int = 40 # number of age groups per lifespan
|
||||||
|
|
||||||
|
|
||||||
func get_localized_item_description(item_id: String, item: String) -> String:
|
func set_locale(locale: String) -> void:
|
||||||
if Locales[Locale].has(item_id):
|
_locale = locale if SUPPORTED_LOCALES.has(locale) else "en"
|
||||||
return Locales[Locale][item_id][item]
|
Settings.language = _locale
|
||||||
return ""
|
TranslationServer.set_locale(_locale)
|
||||||
|
|
||||||
|
|
||||||
|
#func get_localized_item_description(item_id: String, item: String) -> String:
|
||||||
|
#if Locales[Locale].has(item_id):
|
||||||
|
#return Locales[Locale][item_id][item]
|
||||||
|
#return ""
|
||||||
|
|
||||||
|
|
||||||
# Russian templates include the class; legacy English keys omit it.
|
# Russian templates include the class; legacy English keys omit it.
|
||||||
@@ -62,73 +79,22 @@ func format_number(value, digits: int = 0) -> String:
|
|||||||
return E.grouped(value, digits)
|
return E.grouped(value, digits)
|
||||||
|
|
||||||
|
|
||||||
|
func _init() -> void:
|
||||||
|
# Stage constructs its world before autoload _ready callbacks run.
|
||||||
|
ExtraParams = preload("res://data/owniverse_extra_param_loader.gd").get_data()
|
||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
CivilizationRules.clear()
|
set_locale(str(Settings.language))
|
||||||
for row: Dictionary in _read_from_csv("res://data/civilization_rules.txt").values():
|
|
||||||
if not CivilizationRules.has(row.stage):
|
|
||||||
CivilizationRules[row.stage] = {"home": row.home, "span": E.of(row.span), "stars": E.of(row.stars), "ethics": {},
|
|
||||||
"colonizes": row.colonizes == "1", "fights": row.fights == "1", "diplomacy": row.diplomacy == "1", "worships": row.worships == "1"}
|
|
||||||
CivilizationRules[row.stage].ethics[row.ethic] = row
|
|
||||||
var stages: Array = CivilizationRules.keys()
|
|
||||||
stages.sort()
|
|
||||||
for i in stages.size():
|
|
||||||
CivilizationRules[stages[i]].next = stages[i + 1] if i + 1 < stages.size() else "Ct"
|
|
||||||
CivilizationRules[stages[i]].previous = stages[i - 1] if i > 0 else "C0.1"
|
|
||||||
CivilizationRules[stages[i]].colony = stages[maxi(0, i - 2)]
|
|
||||||
CivilizationRules.Ct = {"home": "", "span": 0.0, "stars": 0.0, "ethics": {}, "next": "Ct", "previous": "C4.4", "colonizes": false, "fights": false, "diplomacy": false, "worships": false}
|
|
||||||
LifeRules = _read_from_csv("res://data/life_rules.txt")
|
|
||||||
OwniverseEntities = _read_from_csv("res://data/owniverse_entities.txt")
|
|
||||||
OwniverseItems = _read_from_csv("res://data/owniverse_items.txt")
|
|
||||||
|
|
||||||
Locales["en"] = _read_from_csv("res://data/locale.en.txt")
|
LifeRules = OwniverseLifeRuleLoader.get_data()
|
||||||
Locales["ru"] = _read_from_csv("res://data/locale.ru.txt")
|
OwniverseEntities = OwniverseEntityLoader.get_data()
|
||||||
|
OwniverseItems = OwniverseItemLoader.get_data()
|
||||||
|
Templates = OwniverseTemplateLoader.get_data()
|
||||||
|
CivilizationRules = OwniverseCivilizationRuleLoader.get_data()
|
||||||
|
|
||||||
|
Music = OwniverseAudioLoader.get_music()
|
||||||
Templates = OwniverseTemplate.get_data()
|
Effects = OwniverseAudioLoader.get_effects()
|
||||||
|
|
||||||
|
|
||||||
func _read_from_csv(file_path: String) -> Dictionary:
|
|
||||||
if not FileAccess.file_exists(file_path):
|
|
||||||
printerr("File not found: " + file_path)
|
|
||||||
return {}
|
|
||||||
|
|
||||||
var file = FileAccess.open(file_path, FileAccess.READ)
|
|
||||||
if file == null:
|
|
||||||
printerr("File can not be opened:" + file_path)
|
|
||||||
return {}
|
|
||||||
|
|
||||||
var headers: PackedStringArray = []
|
|
||||||
var data: Array = []
|
|
||||||
|
|
||||||
if not file.eof_reached():
|
|
||||||
headers = PackedStringArray()
|
|
||||||
for val in file.get_csv_line("|"):
|
|
||||||
headers.append(val.strip_edges())
|
|
||||||
|
|
||||||
while not file.eof_reached():
|
|
||||||
var raw_row = file.get_csv_line("|")
|
|
||||||
if raw_row.is_empty(): # пропускаем пустые строки
|
|
||||||
continue
|
|
||||||
|
|
||||||
var trimmed_row: PackedStringArray = []
|
|
||||||
for val in raw_row:
|
|
||||||
trimmed_row.append(val.strip_edges())
|
|
||||||
|
|
||||||
data.append(trimmed_row)
|
|
||||||
|
|
||||||
file.close()
|
|
||||||
|
|
||||||
var dict_data: Dictionary = {}
|
|
||||||
for row in data:
|
|
||||||
if row.size() < 2: continue
|
|
||||||
|
|
||||||
if row.size() == headers.size():
|
|
||||||
var dict: Dictionary = {}
|
|
||||||
for i in headers.size():
|
|
||||||
dict[headers[i]] = row[i]
|
|
||||||
dict_data[row[0]] = dict
|
|
||||||
|
|
||||||
return dict_data
|
|
||||||
|
|
||||||
|
|
||||||
func _read_folder_list(folder_name: String) -> void:
|
func _read_folder_list(folder_name: String) -> void:
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ const E = preload("res://world/owniverse/math/exact.gd")
|
|||||||
const SETTING_SECTION = "Settings"
|
const SETTING_SECTION = "Settings"
|
||||||
const SAVE_PATH = "user://settings.cfg"
|
const SAVE_PATH = "user://settings.cfg"
|
||||||
|
|
||||||
const FORMAT_VERSION : int = 5
|
const FORMAT_VERSION : int = 6
|
||||||
const SimulationTime = preload("res://world/owniverse/simulation_time.gd")
|
const SimulationTime = preload("res://world/owniverse/simulation_time.gd")
|
||||||
const WorldParameters = preload("res://world/owniverse/world_parameters.gd")
|
const WorldParameters = preload("res://world/owniverse/world_parameters.gd")
|
||||||
const STATE_VERSION : String = SimulationTime.STATE_VERSION
|
const STATE_VERSION : String = SimulationTime.STATE_VERSION
|
||||||
@@ -178,6 +178,30 @@ func load_data(filename: String, password: String) -> Dictionary:
|
|||||||
return E.decode(data)
|
return E.decode(data)
|
||||||
|
|
||||||
|
|
||||||
|
## Preserve a structurally readable but game-incompatible save, then allow the
|
||||||
|
## already initialized fresh session to use the original filename.
|
||||||
|
func archive_incompatible_save(filename: String) -> bool:
|
||||||
|
flush_saves()
|
||||||
|
var path: String = save_directory.path_join(E.add(filename, ".adventure"))
|
||||||
|
if not FileAccess.file_exists(path):
|
||||||
|
blocked_saves.erase(filename)
|
||||||
|
last_error = ""
|
||||||
|
return true
|
||||||
|
var archive: String = E.add(path, ".incompatible.bak")
|
||||||
|
var index: int = 0
|
||||||
|
while FileAccess.file_exists(archive):
|
||||||
|
index = E.add(index, 1)
|
||||||
|
archive = E.add(E.add(path, ".incompatible.bak."), str(index))
|
||||||
|
var error: Error = DirAccess.rename_absolute(path, archive)
|
||||||
|
if E.ne(error, OK):
|
||||||
|
blocked_saves[filename] = true
|
||||||
|
return _fail(E.add("Cannot archive incompatible save: ", error_string(error)))
|
||||||
|
blocked_saves.erase(filename)
|
||||||
|
last_error = ""
|
||||||
|
push_warning(E.add(E.add("Incompatible save preserved at ", archive), "; starting a new game."))
|
||||||
|
return true
|
||||||
|
|
||||||
|
|
||||||
static func _number(value: Variant, whole: bool = false, nonnegative: bool = true) -> bool:
|
static func _number(value: Variant, whole: bool = false, nonnegative: bool = true) -> bool:
|
||||||
return E.numeric(value) and E.finite(value) and (not value is float or absf(value) < 1e28) and (not whole or E.eq(value, E.floor_value(value))) and (not nonnegative or E.ge(value, 0))
|
return E.numeric(value) and E.finite(value) and (not value is float or absf(value) < 1e28) and (not whole or E.eq(value, E.floor_value(value))) and (not nonnegative or E.ge(value, 0))
|
||||||
|
|
||||||
@@ -324,11 +348,19 @@ static func _validate_payload(data: Variant, speed_limit: int, stages: Array, en
|
|||||||
if ((not (saved.ethics is Dictionary)) or (not (saved.civilization_homes is Dictionary))):
|
if ((not (saved.ethics is Dictionary)) or (not (saved.civilization_homes is Dictionary))):
|
||||||
return "invalid civilization state"
|
return "invalid civilization state"
|
||||||
for id in saved.ethics:
|
for id in saved.ethics:
|
||||||
if (not E.contains(stages, id) or (not _number_map(saved.ethics[id], true))):
|
if (not E.contains(stages, id) or (not (saved.ethics[id] is Dictionary))):
|
||||||
return E.add("invalid state.ethics.", str(id))
|
return E.add("invalid state.ethics.", str(id))
|
||||||
|
if E.ne(saved.ethics[id].keys().size(), 6):
|
||||||
|
return E.add("invalid ethic profile size for ", str(id))
|
||||||
|
var share_sum: float = 0.0
|
||||||
for ethic in saved.ethics[id]:
|
for ethic in saved.ethics[id]:
|
||||||
if not E.contains(["m", "l", "w", "d", "c", "b"], ethic):
|
var share: Variant = saved.ethics[id][ethic]
|
||||||
|
var share_value: float = 0.0 + share if share is int or share is float else -1.0
|
||||||
|
if not E.contains(["m", "l", "w", "d", "c", "b"], ethic) or not is_finite(share_value) or share_value < 0.0 or share_value > 1.0:
|
||||||
return E.add("invalid ethic ", str(ethic))
|
return E.add("invalid ethic ", str(ethic))
|
||||||
|
share_sum += share_value
|
||||||
|
if absf(share_sum - 1.0) > 0.000001:
|
||||||
|
return E.add("invalid ethic profile total for ", str(id))
|
||||||
for id in saved.civilization_homes:
|
for id in saved.civilization_homes:
|
||||||
if (not _number_map(saved.civilization_homes[id], true)):
|
if (not _number_map(saved.civilization_homes[id], true)):
|
||||||
return "invalid civilization homes"
|
return "invalid civilization homes"
|
||||||
@@ -350,8 +382,10 @@ func load_settings():
|
|||||||
var config = ConfigFile.new()
|
var config = ConfigFile.new()
|
||||||
var err = config.load(SAVE_PATH)
|
var err = config.load(SAVE_PATH)
|
||||||
if E.ne(err, OK):
|
if E.ne(err, OK):
|
||||||
|
Global.set_locale(str(Global.Settings.language))
|
||||||
return false
|
return false
|
||||||
for item in Global.Settings:
|
for item in Global.Settings:
|
||||||
Global.Settings[item] = config.get_value(SETTING_SECTION, item, Global.Settings[item])
|
Global.Settings[item] = config.get_value(SETTING_SECTION, item, Global.Settings[item])
|
||||||
|
Global.set_locale(str(Global.Settings.language))
|
||||||
return true
|
return true
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@@ -1,318 +0,0 @@
|
|||||||
Civ|Stars|Home|Fall|ScaleLevel|Description|EthL|Lev|Eth|Wor|Pro|Deg|Col|War|Dip|WorC|ProC|DegC|ColC|WarC|DipC|Span|Ret
|
|
||||||
RP|||||Каменистая планета. Все умерли.||0|||||||||||||||
|
|
||||||
HP|||RP:1||Обитаемая планета. Абиогенез.||0|||1|1|||||0.00025|0.0025||||5E+06|5E-05
|
|
||||||
LP|||||На этой планете есть жизнь!||0|||||||||||||||
|
|
||||||
EON1|||HP:100^RP:1||Архей. Не сразу бросается в глаза, но на таких планетах полно археев и цианобактерий.||1|||1|1|||||0.00025|0.0025||||1E+07|1E-06
|
|
||||||
EON2|||EON1:1||Протерозой. Помимо вездесущих амёб, здесь присутствуют водоросли, губки и даже моллюски.||1|||1|1|||||0.00025|0.0025||||1E+07|1E-06
|
|
||||||
EON3|||EON2:1000^EON1:1||Палеозой. Папоротники, черви, трилобиты и рыбы.||1|||1|1|||||0.00025|0.0025||||1E+06|1E-05
|
|
||||||
EON4|||EON3:1000^EON1:1||Мезозой. Голосеменные, ящеры, динозавры и терапсиды.||1|||1|1|||||0.00025|0.0025||||1E+06|1E-05
|
|
||||||
EON5|||EON4:2000^EON1:1||Кайнозой. Покрытосеменные и разнообразные млекопитающие, из них некоторые проявляют признаки интеллекта.||1|||1|1|||||0.00025|0.0025||||5E+05|5E-04
|
|
||||||
C0|||||Докосмическая эпоха — от племени до федерации.||0|||||||||||||||
|
|
||||||
C0.0|||EON5:1||Нижний палеолит. Приручение огня, каменные орудия.||1|0|0|1|1|||||0.0175|0.025||||2E+03|1
|
|
||||||
C0.1|||C0.0:1||Средний палеолит. Развитые каменные орудия.||1|0|0|1|1|||||0.0175|0.025||||2E+03|1
|
|
||||||
C0.2|||||Верхний палеолит. Сложные каменные орудия, искусство.||1|1|1|1|1||||||||||2E+03|1
|
|
||||||
C0.2m|||C0.1:1||Мистики|m|2||||||||1.6|0.0084|0.01|0.0000625|0.001024|||
|
|
||||||
C0.2b|||C0.1:1||Строители|b|2||||||||1|0.01859375|0.02|0.00003125|0.0025|||
|
|
||||||
C0.2d|||C0.1:1||Дипломаты|d|2||||||||1|0.0112|0.01538461538|0.0005|0.00015625|||
|
|
||||||
C0.2l|||C0.1:1||Логики|l|2||||||||0.5|0.0504|0.03571428571|0.0005|0.0025|||
|
|
||||||
C0.2c|||C0.1:1||Колонисты|c|2||||||||0.8|0.021|0.02604166667|0.004096|0.006103515625|||
|
|
||||||
C0.2w|||C0.1:1||Воины|w|2||||||||1.25|0.02625|0.03125|0.0005|0.016384|||
|
|
||||||
C0.3|||||Мезолит. Лук и стрелы, рыболовство, лодки.||1|1|1|1|1||||||||||2E+03|1
|
|
||||||
C0.3m|||C0.2:1||Мистики|m|2||||||||1.6|0.0084|0.01|0.0000625|0.001024|||
|
|
||||||
C0.3b|||C0.2:1||Строители|b|2||||||||1|0.01859375|0.02|0.00003125|0.0025|||
|
|
||||||
C0.3d|||C0.2:1||Дипломаты|d|2||||||||1|0.0112|0.01538461538|0.0005|0.00015625|||
|
|
||||||
C0.3l|||C0.2:1||Логики|l|2||||||||0.5|0.0504|0.03571428571|0.0005|0.0025|||
|
|
||||||
C0.3c|||C0.2:1||Колонисты|c|2||||||||0.8|0.021|0.02604166667|0.004096|0.006103515625|||
|
|
||||||
C0.3w|||C0.2:1||Воины|w|2||||||||1.25|0.02625|0.03125|0.0005|0.016384|||
|
|
||||||
C0.4|||||Ранний неолит. Земледелие.||1|1|1|1|1||||||||||2E+03|1
|
|
||||||
C0.4m|||C0.3:1||Мистики|m|2||||||||1.6|0.0084|0.01|0.0000625|0.001024|||
|
|
||||||
C0.4b|||C0.3:1||Строители|b|2||||||||1|0.01859375|0.02|0.00003125|0.0025|||
|
|
||||||
C0.4d|||C0.3:1||Дипломаты|d|2||||||||1|0.0112|0.01538461538|0.0005|0.00015625|||
|
|
||||||
C0.4l|||C0.3:1||Логики|l|2||||||||0.5|0.0504|0.03571428571|0.0005|0.0025|||
|
|
||||||
C0.4c|||C0.3:1||Колонисты|c|2||||||||0.8|0.021|0.02604166667|0.004096|0.006103515625|||
|
|
||||||
C0.4w|||C0.3:1||Воины|w|2||||||||1.25|0.02625|0.03125|0.0005|0.016384|||
|
|
||||||
C0.5|||||Средний неолит. Скотоводство, керамика.||1|1|1|1|1||||||||||2E+03|1
|
|
||||||
C0.5m|||C0.4:1||Мистики|m|2||||||||1.6|0.0084|0.01|0.0000625|0.001024|||
|
|
||||||
C0.5b|||C0.4:1||Строители|b|2||||||||1|0.01859375|0.02|0.00003125|0.0025|||
|
|
||||||
C0.5d|||C0.4:1||Дипломаты|d|2||||||||1|0.0112|0.01538461538|0.0005|0.00015625|||
|
|
||||||
C0.5l|||C0.4:1||Логики|l|2||||||||0.5|0.0504|0.03571428571|0.0005|0.0025|||
|
|
||||||
C0.5c|||C0.4:1||Колонисты|c|2||||||||0.8|0.021|0.02604166667|0.004096|0.006103515625|||
|
|
||||||
C0.5w|||C0.4:1||Воины|w|2||||||||1.25|0.02625|0.03125|0.0005|0.016384|||
|
|
||||||
C0.6|||||Поздний неолит. Крупные поселения.||1|1|1|1|1||||||||||2E+03|1
|
|
||||||
C0.6m|||C0.5:1||Мистики|m|2||||||||1.6|0.0084|0.01|0.0000625|0.001024|||
|
|
||||||
C0.6b|||C0.5:1||Строители|b|2||||||||1|0.01859375|0.02|0.00003125|0.0025|||
|
|
||||||
C0.6d|||C0.5:1||Дипломаты|d|2||||||||1|0.0112|0.01538461538|0.0005|0.00015625|||
|
|
||||||
C0.6l|||C0.5:1||Логики|l|2||||||||0.5|0.0504|0.03571428571|0.0005|0.0025|||
|
|
||||||
C0.6c|||C0.5:1||Колонисты|c|2||||||||0.8|0.021|0.02604166667|0.004096|0.006103515625|||
|
|
||||||
C0.6w|||C0.5:1||Воины|w|2||||||||1.25|0.02625|0.03125|0.0005|0.016384|||
|
|
||||||
C0.7|||||Первые царства медного и бронзового века. Колесо.||1|1|1|1|1||||||||||2E+03|1
|
|
||||||
C0.7m|||C0.6:1||Мистики|m|2||||||||1.6|0.0084|0.01|0.0000625|0.001024|||
|
|
||||||
C0.7b|||C0.6:1||Строители|b|2||||||||1|0.01859375|0.02|0.00003125|0.0025|||
|
|
||||||
C0.7d|||C0.6:1||Дипломаты|d|2||||||||1|0.0112|0.01538461538|0.0005|0.00015625|||
|
|
||||||
C0.7l|||C0.6:1||Логики|l|2||||||||0.5|0.0504|0.03571428571|0.0005|0.0025|||
|
|
||||||
C0.7c|||C0.6:1||Колонисты|c|2||||||||0.8|0.021|0.02604166667|0.004096|0.006103515625|||
|
|
||||||
C0.7w|||C0.6:1||Воины|w|2||||||||1.25|0.02625|0.03125|0.0005|0.016384|||
|
|
||||||
C0.8|||||Античные империи железного века. Философия.||1|1|1|1|1||||||||||2E+03|1
|
|
||||||
C0.8m|||C0.7:1||Мистики|m|2||||||||1.6|0.0084|0.01|0.0000625|0.001024|||
|
|
||||||
C0.8b|||C0.7:1||Строители|b|2||||||||1|0.01859375|0.02|0.00003125|0.0025|||
|
|
||||||
C0.8d|||C0.7:1||Дипломаты|d|2||||||||1|0.0112|0.01538461538|0.0005|0.00015625|||
|
|
||||||
C0.8l|||C0.7:1||Логики|l|2||||||||0.5|0.0504|0.03571428571|0.0005|0.0025|||
|
|
||||||
C0.8c|||C0.7:1||Колонисты|c|2||||||||0.8|0.021|0.02604166667|0.004096|0.006103515625|||
|
|
||||||
C0.8w|||C0.7:1||Воины|w|2||||||||1.25|0.02625|0.03125|0.0005|0.016384|||
|
|
||||||
C0.9|||||Промышленная эпоха. Электричество.||1|1|1|1|1||||||||||2E+03|1
|
|
||||||
C0.9m|||C0.8:512^C0.7:256^EON5:21^EON1:6||Мистики|m|2||||||||1.6|0.0084|0.01|0.0000625|0.001024|||
|
|
||||||
C0.9b|||C0.8:512^C0.7:256^EON5:43^EON1:9||Строители|b|2||||||||1|0.01859375|0.02|0.00003125|0.0025|||
|
|
||||||
C0.9d|||C0.8:512^C0.7:256^EON5:7^EON1:3||Дипломаты|d|2||||||||1|0.0112|0.01538461538|0.0005|0.00015625|||
|
|
||||||
C0.9l|||C0.8:512^C0.7:256^EON5:60^EON1:11||Логики|l|2||||||||0.5|0.0504|0.03571428571|0.0005|0.0025|||
|
|
||||||
C0.9c|||C0.8:512^C0.7:256^EON5:252^EON1:19||Колонисты|c|2||||||||0.8|0.021|0.02604166667|0.004096|0.006103515625|||
|
|
||||||
C0.9w|||C0.8:512^C0.7:256^EON5:260^EON1:26||Воины|w|2||||||||1.25|0.02625|0.03125|0.0005|0.016384|||
|
|
||||||
C1|||||Цивилизации, осваивающие родную солнечную систему.||0|||||||||||||||
|
|
||||||
C1.0|||||Цивилизация, освоившая родную планету. Сверхпроводимость, управляемый термоядерный синтез.||1|1|1|1|1||||||||||5E+03|1
|
|
||||||
C1.0m|||C0.9:1024^EON5:21^EON1:6||Мистики|m|2||||||||1.6|0.009|0.01|0.0000625|0.001024|||
|
|
||||||
C1.0b|||C0.9:1024^EON5:43^EON1:9||Строители|b|2||||||||1|0.019921875|0.02|0.00003125|0.0025|||
|
|
||||||
C1.0d|||C0.9:1024^EON5:7^EON1:3||Дипломаты|d|2||||||||1|0.012|0.01538461538|0.0005|0.00015625|||
|
|
||||||
C1.0l|||C0.9:1024^EON5:60^EON1:11||Логики|l|2||||||||0.5|0.054|0.03571428571|0.0005|0.0025|||
|
|
||||||
C1.0c|||C0.9:1024^EON5:152^EON1:19||Колонисты|c|2||||||||0.8|0.0225|0.02604166667|0.004096|0.006103515625|||
|
|
||||||
C1.0w|||C0.9:1024^EON5:260^EON1:26||Воины|w|2||||||||1.25|0.028125|0.03125|0.0005|0.016384|||
|
|
||||||
C1.1|||||Научные базы на других телах родной системы. Пусковая петля, космический лифт.||1|1|1|1|1||||||||||5E+03|1
|
|
||||||
C1.1m|||C1.0:1024^C0.9:256^EON5:21^EON1:6||Мистики|m|2||||||||1.6|0.009|0.01|0.0000625|0.001024|||
|
|
||||||
C1.1b|||C1.0:1024^C0.9:256^EON5:43^EON1:9||Строители|b|2||||||||1|0.019921875|0.02|0.00003125|0.0025|||
|
|
||||||
C1.1d|||C1.0:1024^C0.9:256^EON5:7^EON1:3||Дипломаты|d|2||||||||1|0.012|0.01538461538|0.0005|0.00015625|||
|
|
||||||
C1.1l|||C1.0:1024^C0.9:256^EON5:60^EON1:11||Логики|l|2||||||||0.5|0.054|0.03571428571|0.0005|0.0025|||
|
|
||||||
C1.1c|||C1.0:1024^C0.9:256^EON5:152^EON1:19||Колонисты|c|2||||||||0.8|0.0225|0.02604166667|0.004096|0.006103515625|||
|
|
||||||
C1.1w|||C1.0:1024^C0.9:256^EON5:260^EON1:26||Воины|w|2||||||||1.25|0.028125|0.03125|0.0005|0.016384|||
|
|
||||||
C1.2|||||Полное управление генетикой. Киборгизация.||1|1|1|1|1||||||||||5E+03|1
|
|
||||||
C1.2m|||C1.1:256^C1.0:1024^C0.9:256^EON5:21^EON1:6||Мистики|m|2||||||||1.6|0.009|0.01|0.0000625|0.001024|||
|
|
||||||
C1.2b|||C1.1:256^C1.0:1024^C0.9:256^EON5:43^EON1:9||Строители|b|2||||||||1|0.019921875|0.02|0.00003125|0.0025|||
|
|
||||||
C1.2d|||C1.1:256^C1.0:1024^C0.9:256^EON5:7^EON1:3||Дипломаты|d|2||||||||1|0.012|0.01538461538|0.0005|0.00015625|||
|
|
||||||
C1.2l|||C1.1:256^C1.0:1024^C0.9:256^EON5:60^EON1:11||Логики|l|2||||||||0.5|0.054|0.03571428571|0.0005|0.0025|||
|
|
||||||
C1.2c|||C1.1:256^C1.0:1024^C0.9:256^EON5:152^EON1:19||Колонисты|c|2||||||||0.8|0.0225|0.02604166667|0.004096|0.006103515625|||
|
|
||||||
C1.2w|||C1.1:256^C1.0:1024^C0.9:256^EON5:260^EON1:26||Воины|w|2||||||||1.25|0.028125|0.03125|0.0005|0.016384|||
|
|
||||||
C1.3|||||Промышленная добыча астероидов. Колонии на других планетах родной системы.||1|1|1|1|1||||||||||5E+03|1
|
|
||||||
C1.3m|||C1.2:256^C1.0:1024^C0.9:64^EON5:13^EON1:13||Мистики|m|2||||||||1.6|0.009|0.01|0.0000625|0.001024|||
|
|
||||||
C1.3b|||C1.2:256^C1.0:1024^C0.9:64^EON5:22^EON1:22||Строители|b|2||||||||1|0.019921875|0.02|0.00003125|0.0025|||
|
|
||||||
C1.3d|||C1.2:256^C1.0:1024^C0.9:64^EON5:5^EON1:5||Дипломаты|d|2||||||||1|0.012|0.01538461538|0.0005|0.00015625|||
|
|
||||||
C1.3l|||C1.2:256^C1.0:1024^C0.9:64^EON5:30^EON1:30||Логики|l|2||||||||0.5|0.054|0.03571428571|0.0005|0.0025|||
|
|
||||||
C1.3c|||C1.2:256^C1.0:1024^C0.9:64^EON5:64^EON1:64||Колонисты|c|2||||||||0.8|0.0225|0.02604166667|0.004096|0.006103515625|||
|
|
||||||
C1.3w|||C1.2:256^C1.0:1024^C0.9:64^EON5:100^EON1:100||Воины|w|2||||||||1.25|0.028125|0.03125|0.0005|0.016384|||
|
|
||||||
C1.4|||||Сбор вещества из атмосфер газовых гигантов.||1|1|1|1|1||||||||||5E+03|1
|
|
||||||
C1.4m|||C1.3:384^C1.0:896^EON5:6^EON1:21||Мистики|m|2||||||||1.6|0.009|0.01|0.0000625|0.001024|||
|
|
||||||
C1.4b|||C1.3:384^C1.0:896^EON5:9^EON1:43||Строители|b|2||||||||1|0.019921875|0.02|0.00003125|0.0025|||
|
|
||||||
C1.4d|||C1.3:384^C1.0:896^EON5:3^EON1:7||Дипломаты|d|2||||||||1|0.012|0.01538461538|0.0005|0.00015625|||
|
|
||||||
C1.4l|||C1.3:384^C1.0:896^EON5:11^EON1:60||Логики|l|2||||||||0.5|0.054|0.03571428571|0.0005|0.0025|||
|
|
||||||
C1.4c|||C1.3:384^C1.0:896^EON5:19^EON1:152||Колонисты|c|2||||||||0.8|0.0225|0.02604166667|0.004096|0.006103515625|||
|
|
||||||
C1.4w|||C1.3:384^C1.0:896^EON5:26^EON1:260||Воины|w|2||||||||1.25|0.028125|0.03125|0.0005|0.016384|||
|
|
||||||
C1.5|||||Космические города. Пикотехнологии: управление отдельными атомами.||1|1|1|1|1||||||||||5E+03|1
|
|
||||||
C1.5m|||C1.4:512^C1.0:768^EON5:6^EON1:21||Мистики|m|2||||||||1.6|0.009|0.01|0.0000625|0.001024|||
|
|
||||||
C1.5b|||C1.4:512^C1.0:768^EON5:9^EON1:43||Строители|b|2||||||||1|0.019921875|0.02|0.00003125|0.0025|||
|
|
||||||
C1.5d|||C1.4:512^C1.0:768^EON5:3^EON1:7||Дипломаты|d|2||||||||1|0.012|0.01538461538|0.0005|0.00015625|||
|
|
||||||
C1.5l|||C1.4:512^C1.0:768^EON5:11^EON1:60||Логики|l|2||||||||0.5|0.054|0.03571428571|0.0005|0.0025|||
|
|
||||||
C1.5c|||C1.4:512^C1.0:768^EON5:19^EON1:152||Колонисты|c|2||||||||0.8|0.0225|0.02604166667|0.004096|0.006103515625|||
|
|
||||||
C1.5w|||C1.4:512^C1.0:768^EON5:26^EON1:260||Воины|w|2||||||||1.25|0.028125|0.03125|0.0005|0.016384|||
|
|
||||||
C1.6|||||Промышленное производство антивещества. Первые звездолёты.||1|1|1|1|1|1|||||||||5E+03|1
|
|
||||||
C1.6m|||C1.5:768^C1.0:512^EON5:6^RP:21||Мистики|m|2||||||||1.6|0.009|0.01|0.0000625|0.001024|||
|
|
||||||
C1.6b|||C1.5:768^C1.0:512^EON5:9^RP:43||Строители|b|2||||||||1|0.019921875|0.02|0.00003125|0.0025|||
|
|
||||||
C1.6d|||C1.5:768^C1.0:512^EON5:3^RP:7||Дипломаты|d|2||||||||1|0.012|0.01538461538|0.0005|0.00015625|||
|
|
||||||
C1.6l|||C1.5:768^C1.0:512^EON5:11^RP:60||Логики|l|2||||||||0.5|0.054|0.03571428571|0.0005|0.0025|||
|
|
||||||
C1.6c|||C1.5:768^C1.0:512^EON5:19^RP:152||Колонисты|c|2||||||||0.8|0.0225|0.02604166667|0.004096|0.006103515625|||
|
|
||||||
C1.6w|||C1.5:768^C1.0:512^EON5:26^RP:260||Воины|w|2||||||||1.25|0.028125|0.03125|0.0005|0.016384|||
|
|
||||||
C1.7|||||Терраформинг. Гамма-лазеры.||1|1|1|1|1|1|||||||||5E+03|1
|
|
||||||
C1.7m|||C1.6:896^C1.0:384^EON5:6^RP:21||Мистики|m|2||||||||1.6|0.009|0.01|0.0000625|0.001024|||
|
|
||||||
C1.7b|||C1.6:896^C1.0:384^EON5:9^RP:43||Строители|b|2||||||||1|0.019921875|0.02|0.00003125|0.0025|||
|
|
||||||
C1.7d|||C1.6:896^C1.0:384^EON5:3^RP:7||Дипломаты|d|2||||||||1|0.012|0.01538461538|0.0005|0.00015625|||
|
|
||||||
C1.7l|||C1.6:896^C1.0:384^EON5:11^RP:60||Логики|l|2||||||||0.5|0.054|0.03571428571|0.0005|0.0025|||
|
|
||||||
C1.7c|||C1.6:896^C1.0:384^EON5:19^RP:152||Колонисты|c|2||||||||0.8|0.0225|0.02604166667|0.004096|0.006103515625|||
|
|
||||||
C1.7w|||C1.6:896^C1.0:384^EON5:26^RP:260||Воины|w|2||||||||1.25|0.028125|0.03125|0.0005|0.016384|||
|
|
||||||
C1.8|||||Космические станции континентального масштаба.||1|1|1|1|1|1|||||||||5E+03|1
|
|
||||||
C1.8m|||C1.7:1024^C1.0:256^EON5:6^RP:21||Мистики|m|2||||||||1.6|0.009|0.01|0.0000625|0.001024|||
|
|
||||||
C1.8b|||C1.7:1024^C1.0:256^EON5:9^RP:43||Строители|b|2||||||||1|0.019921875|0.02|0.00003125|0.0025|||
|
|
||||||
C1.8d|||C1.7:1024^C1.0:256^EON5:3^RP:7||Дипломаты|d|2||||||||1|0.012|0.01538461538|0.0005|0.00015625|||
|
|
||||||
C1.8l|||C1.7:1024^C1.0:256^EON5:11^RP:60||Логики|l|2||||||||0.5|0.054|0.03571428571|0.0005|0.0025|||
|
|
||||||
C1.8c|||C1.7:1024^C1.0:256^EON5:19^RP:152||Колонисты|c|2||||||||0.8|0.0225|0.02604166667|0.004096|0.006103515625|||
|
|
||||||
C1.8w|||C1.7:1024^C1.0:256^EON5:26^RP:260||Воины|w|2||||||||1.25|0.028125|0.03125|0.0005|0.016384|||
|
|
||||||
C1.9|||||Частичный рой Дайсона.||1|1|1|1|1|1|||||||||5E+03|1
|
|
||||||
C1.9m|||C1.8:1024^C1.0:128^EON5:6^RP:21||Мистики|m|2||||||||1.6|0.009|0.01|0.0000625|0.001024|||
|
|
||||||
C1.9b|||C1.8:1024^C1.0:128^EON5:9^RP:43||Строители|b|2||||||||1|0.019921875|0.02|0.00003125|0.0025|||
|
|
||||||
C1.9d|||C1.8:1024^C1.0:128^EON5:3^RP:7||Дипломаты|d|2||||||||1|0.012|0.01538461538|0.0005|0.00015625|||
|
|
||||||
C1.9l|||C1.8:1024^C1.0:128^EON5:11^RP:60||Логики|l|2||||||||0.5|0.054|0.03571428571|0.0005|0.0025|||
|
|
||||||
C1.9c|||C1.8:1024^C1.0:128^EON5:19^RP:152||Колонисты|c|2||||||||0.8|0.0225|0.02604166667|0.004096|0.006103515625|||
|
|
||||||
C1.9w|||C1.8:1024^C1.0:128^EON5:26^RP:260||Воины|w|2||||||||1.25|0.028125|0.03125|0.0005|0.016384|||
|
|
||||||
C2|||||Цивилизации, ведущие экспансию к иным звёздам.||0|||||||||||||||
|
|
||||||
C2.0|1E+00|DwStar||Звезда|Цивилизация, освоившая энергию родного солнца.||1|1|1|1|1|1|1|1|||||||5E+03|1
|
|
||||||
C2.0m|||C1.9:1024^C1.0:128^RP:28||Мистики|m|2||||||||1.6|0.006|0.01|0.0005|0.00128|1||
|
|
||||||
C2.0b|||C1.9:1024^C1.0:128^EON5:9^RP:59||Строители|b|2||||||||1|0.02125|0.015625|0.00003125|0.0025|0.64||
|
|
||||||
C2.0d|||C1.9:1024^C1.0:128^EON5:3^RP:8||Дипломаты|d|2||||||||1|0.0128|0.01923076923|0.0009765625|0.0003125|2.56||
|
|
||||||
C2.0l|||C1.9:1024^C1.0:128^EON5:11^RP:85||Логики|l|2||||||||0.5|0.0576|0.04464285714|0.0005|0.0025|1.5625||
|
|
||||||
C2.0c|||C1.9:1024^C1.0:128^EON5:19^RP:235||Колонисты|c|2||||||||0.8|0.024|0.04166666667|0.004096|0.006103515625|1||
|
|
||||||
C2.0w|||C1.9:1024^C1.0:128^EON5:26^RP:419||Воины|w|2||||||||1.25|0.03|0.025|0.000256|0.03072|0.25||
|
|
||||||
C2.1|1E+01|DwStar|||Изменение планетарных орбит.||1|1|1|1|1|1|1|1|||||||5E+03|5.62E-01
|
|
||||||
C2.1m|||C2.0:1||Мистики|m|2||||||||1.6|0.006|0.01|0.0005|0.00128|1||
|
|
||||||
C2.1b|||C2.0:1||Строители|b|2||||||||1|0.02125|0.015625|0.00003125|0.0025|0.64||
|
|
||||||
C2.1d|||C2.0:1||Дипломаты|d|2||||||||1|0.0128|0.01923076923|0.0009765625|0.0003125|2.56||
|
|
||||||
C2.1l|||C2.0:1||Логики|l|2||||||||0.5|0.0576|0.04464285714|0.0005|0.0025|1.5625||
|
|
||||||
C2.1c|||C2.0:1||Колонисты|c|2||||||||0.8|0.024|0.04166666667|0.004096|0.006103515625|1||
|
|
||||||
C2.1w|||C2.0:1||Воины|w|2||||||||1.25|0.03|0.025|0.000256|0.03072|0.25||
|
|
||||||
C2.2|1E+02|DwStar|||Управление инерцией.||1|1|1|1|1|1|1|1|||||||1E+04|3.16E-01
|
|
||||||
C2.2m|||C2.1:1024^C2.0:6||Мистики|m|2||||||||1.6|0.006|0.01|0.0005|0.00128|1||
|
|
||||||
C2.2b|||C2.1:1024^C2.0:9||Строители|b|2||||||||1|0.02125|0.015625|0.00003125|0.0025|0.64||
|
|
||||||
C2.2d|||C2.1:1024^C2.0:3||Дипломаты|d|2||||||||1|0.0128|0.01923076923|0.0009765625|0.0003125|2.56||
|
|
||||||
C2.2l|||C2.1:1024^C2.0:11||Логики|l|2||||||||0.5|0.0576|0.04464285714|0.0005|0.0025|1.5625||
|
|
||||||
C2.2c|||C2.1:1024^C2.0:19||Колонисты|c|2||||||||0.8|0.024|0.04166666667|0.004096|0.006103515625|1||
|
|
||||||
C2.2w|||C2.1:1024^C2.0:26||Воины|w|2||||||||1.25|0.03|0.025|0.000256|0.03072|0.25||
|
|
||||||
C2.3|1E+03|DwStar||Рассеянное звёздное скопление|Сбор вещества со звёзд.||1|1|1|1|1|1|1|1|||||||2E+04|1.78E-01
|
|
||||||
C2.3m|||C2.2:1024^C2.1:6||Мистики|m|2||||||||1.6|0.006|0.01|0.0005|0.00128|1||
|
|
||||||
C2.3b|||C2.2:1024^C2.1:9||Строители|b|2||||||||1|0.02125|0.015625|0.00003125|0.0025|0.64||
|
|
||||||
C2.3d|||C2.2:1024^C2.1:3||Дипломаты|d|2||||||||1|0.0128|0.01923076923|0.0009765625|0.0003125|2.56||
|
|
||||||
C2.3l|||C2.2:1024^C2.1:11||Логики|l|2||||||||0.5|0.0576|0.04464285714|0.0005|0.0025|1.5625||
|
|
||||||
C2.3c|||C2.2:1024^C2.1:19||Колонисты|c|2||||||||0.8|0.024|0.04166666667|0.004096|0.006103515625|1||
|
|
||||||
C2.3w|||C2.2:1024^C2.1:26||Воины|w|2||||||||1.25|0.03|0.025|0.000256|0.03072|0.25||
|
|
||||||
C2.4|1E+04|DwStar||Малое звёздное скопление|Фемтотехнологии: управление отдельными фермионами.||1|1|1|1|1|1|1|1|||||||2E+04|1.00E-01
|
|
||||||
C2.4m|||C2.3:1024^C2.2:6||Мистики|m|2||||||||1.6|0.006|0.01|0.0005|0.00128|1||
|
|
||||||
C2.4b|||C2.3:1024^C2.2:9||Строители|b|2||||||||1|0.02125|0.015625|0.00003125|0.0025|0.64||
|
|
||||||
C2.4d|||C2.3:1024^C2.2:3||Дипломаты|d|2||||||||1|0.0128|0.01923076923|0.0009765625|0.0003125|2.56||
|
|
||||||
C2.4l|||C2.3:1024^C2.2:11||Логики|l|2||||||||0.5|0.0576|0.04464285714|0.0005|0.0025|1.5625||
|
|
||||||
C2.4c|||C2.3:1024^C2.2:19||Колонисты|c|2||||||||0.8|0.024|0.04166666667|0.004096|0.006103515625|1||
|
|
||||||
C2.4w|||C2.3:1024^C2.2:26||Воины|w|2||||||||1.25|0.03|0.025|0.000256|0.03072|0.25||
|
|
||||||
C2.5|1E+05|DwStar||Звёздное скопление|Деконструкция и сборка планет.||1|1|1|1|1|1|1|1|||||||3E+04|5.62E-02
|
|
||||||
C2.5m|||C2.4:1024^C2.3:6||Мистики|m|2||||||||1.6|0.006|0.01|0.0005|0.00128|1||
|
|
||||||
C2.5b|||C2.4:1024^C2.3:9||Строители|b|2||||||||1|0.02125|0.015625|0.00003125|0.0025|0.64||
|
|
||||||
C2.5d|||C2.4:1024^C2.3:3||Дипломаты|d|2||||||||1|0.0128|0.01923076923|0.0009765625|0.0003125|2.56||
|
|
||||||
C2.5l|||C2.4:1024^C2.3:11||Логики|l|2||||||||0.5|0.0576|0.04464285714|0.0005|0.0025|1.5625||
|
|
||||||
C2.5c|||C2.4:1024^C2.3:19||Колонисты|c|2||||||||0.8|0.024|0.04166666667|0.004096|0.006103515625|1||
|
|
||||||
C2.5w|||C2.4:1024^C2.3:26||Воины|w|2||||||||1.25|0.03|0.025|0.000256|0.03072|0.25||
|
|
||||||
C2.6|1E+06|DwStar||Большое звёздное скопление|Астроархитектурная доминанта.||1|1|1|1|1|1|1|1|||||||3E+04|3.16E-02
|
|
||||||
C2.6m|||C2.5:1024^C2.4:6||Мистики|m|2||||||||1.6|0.006|0.01|0.0005|0.00128|1||
|
|
||||||
C2.6b|||C2.5:1024^C2.4:9||Строители|b|2||||||||1|0.02125|0.015625|0.00003125|0.0025|0.64||
|
|
||||||
C2.6d|||C2.5:1024^C2.4:3||Дипломаты|d|2||||||||1|0.0128|0.01923076923|0.0009765625|0.0003125|2.56||
|
|
||||||
C2.6l|||C2.5:1024^C2.4:11||Логики|l|2||||||||0.5|0.0576|0.04464285714|0.0005|0.0025|1.5625||
|
|
||||||
C2.6c|||C2.5:1024^C2.4:19||Колонисты|c|2||||||||0.8|0.024|0.04166666667|0.004096|0.006103515625|1||
|
|
||||||
C2.6w|||C2.5:1024^C2.4:26||Воины|w|2||||||||1.25|0.03|0.025|0.000256|0.03072|0.25||
|
|
||||||
C2.7|1E+07|GiStar||Гигантское звёздное скопление|Освоение ресурсов звёзд-гигантов.||1|1|1|1|1|1|1|1|||||||4E+04|1.78E-02
|
|
||||||
C2.7m|||C2.6:1024^C2.5:6||Мистики|m|2||||||||1.6|0.006|0.01|0.0005|0.00128|1||
|
|
||||||
C2.7b|||C2.6:1024^C2.5:9||Строители|b|2||||||||1|0.02125|0.015625|0.00003125|0.0025|0.64||
|
|
||||||
C2.7d|||C2.6:1024^C2.5:3||Дипломаты|d|2||||||||1|0.0128|0.01923076923|0.0009765625|0.0003125|2.56||
|
|
||||||
C2.7l|||C2.6:1024^C2.5:11||Логики|l|2||||||||0.5|0.0576|0.04464285714|0.0005|0.0025|1.5625||
|
|
||||||
C2.7c|||C2.6:1024^C2.5:19||Колонисты|c|2||||||||0.8|0.024|0.04166666667|0.004096|0.006103515625|1||
|
|
||||||
C2.7w|||C2.6:1024^C2.5:26||Воины|w|2||||||||1.25|0.03|0.025|0.000256|0.03072|0.25||
|
|
||||||
C2.8|1E+08|GiStar|||Управление гравитацией.||1|1|1|1|1|1|1|1|||||||4E+04|1.00E-02
|
|
||||||
C2.8m|||C2.7:1024^C2.6:6||Мистики|m|2||||||||1.6|0.006|0.01|0.0005|0.00128|1||
|
|
||||||
C2.8b|||C2.7:1024^C2.6:9||Строители|b|2||||||||1|0.02125|0.015625|0.00003125|0.0025|0.64||
|
|
||||||
C2.8d|||C2.7:1024^C2.6:3||Дипломаты|d|2||||||||1|0.0128|0.01923076923|0.0009765625|0.0003125|2.56||
|
|
||||||
C2.8l|||C2.7:1024^C2.6:11||Логики|l|2||||||||0.5|0.0576|0.04464285714|0.0005|0.0025|1.5625||
|
|
||||||
C2.8c|||C2.7:1024^C2.6:19||Колонисты|c|2||||||||0.8|0.024|0.04166666667|0.004096|0.006103515625|1||
|
|
||||||
C2.8w|||C2.7:1024^C2.6:26||Воины|w|2||||||||1.25|0.03|0.025|0.000256|0.03072|0.25||
|
|
||||||
C2.9|1E+09|GiStar||Карликовая галактика|Перемещение звёзд.||1|1|1|1|1|1|1|1|||||||5E+04|5.62E-03
|
|
||||||
C2.9m|||C2.8:1024^C2.7:6||Мистики|m|2||||||||1.6|0.006|0.01|0.0005|0.00128|1||
|
|
||||||
C2.9b|||C2.8:1024^C2.7:9||Строители|b|2||||||||1|0.02125|0.015625|0.00003125|0.0025|0.64||
|
|
||||||
C2.9d|||C2.8:1024^C2.7:3||Дипломаты|d|2||||||||1|0.0128|0.01923076923|0.0009765625|0.0003125|2.56||
|
|
||||||
C2.9l|||C2.8:1024^C2.7:11||Логики|l|2||||||||0.5|0.0576|0.04464285714|0.0005|0.0025|1.5625||
|
|
||||||
C2.9c|||C2.8:1024^C2.7:19||Колонисты|c|2||||||||0.8|0.024|0.04166666667|0.004096|0.006103515625|1||
|
|
||||||
C2.9w|||C2.8:1024^C2.7:26||Воины|w|2||||||||1.25|0.03|0.025|0.000256|0.03072|0.25||
|
|
||||||
C3|||||Цивилизации галактического масштаба.||0|||||||||||||||
|
|
||||||
C3.0|1E+10|GiStar||Малая галактика|Экспансия в группу галактик.||1|1|1|1|1|1|1|1|||||||1E+05|3.16E-03
|
|
||||||
C3.0m|||C2.9:1024^C2.8:6||Мистики|m|2||||||||1.6|0.006375|0.01|0.0005|0.00128|1||
|
|
||||||
C3.0b|||C2.9:1024^C2.8:9||Строители|b|2||||||||1|0.022578125|0.015625|0.00003125|0.0025|0.64||
|
|
||||||
C3.0d|||C2.9:1024^C2.8:3||Дипломаты|d|2||||||||1|0.0136|0.01923076923|0.0009765625|0.0003125|2.56||
|
|
||||||
C3.0l|||C2.9:1024^C2.8:11||Логики|l|2||||||||0.5|0.0612|0.04464285714|0.0005|0.0025|1.5625||
|
|
||||||
C3.0c|||C2.9:1024^C2.8:19||Колонисты|c|2||||||||0.8|0.0255|0.04166666667|0.004096|0.006103515625|1||
|
|
||||||
C3.0w|||C2.9:1024^C2.8:26||Воины|w|2||||||||1.25|0.031875|0.025|0.000256|0.03072|0.25||
|
|
||||||
C3.1|1E+11|GiStar||Средняя галактика|Создание звёзд.||1|1|1|1|1|1|1|1|||||||1E+05|1.78E-03
|
|
||||||
C3.1m|||C3.0:1024^C2.9:6||Мистики|m|2||||||||1.6|0.006375|0.01|0.0005|0.00128|1||
|
|
||||||
C3.1b|||C3.0:1024^C2.9:9||Строители|b|2||||||||1|0.022578125|0.015625|0.00003125|0.0025|0.64||
|
|
||||||
C3.1d|||C3.0:1024^C2.9:3||Дипломаты|d|2||||||||1|0.0136|0.01923076923|0.0009765625|0.0003125|2.56||
|
|
||||||
C3.1l|||C3.0:1024^C2.9:11||Логики|l|2||||||||0.5|0.0612|0.04464285714|0.0005|0.0025|1.5625||
|
|
||||||
C3.1c|||C3.0:1024^C2.9:19||Колонисты|c|2||||||||0.8|0.0255|0.04166666667|0.004096|0.006103515625|1||
|
|
||||||
C3.1w|||C3.0:1024^C2.9:26||Воины|w|2||||||||1.25|0.031875|0.025|0.000256|0.03072|0.25||
|
|
||||||
C3.2|1E+12|WD||Большая галактика|Использование белых карликов.||1|1|1|1|1|1|1|1|||||||2E+05|1.00E-03
|
|
||||||
C3.2m|||C3.1:1024^C3.0:6||Мистики|m|2||||||||1.6|0.006375|0.01|0.0005|0.00128|1||
|
|
||||||
C3.2b|||C3.1:1024^C3.0:9||Строители|b|2||||||||1|0.022578125|0.015625|0.00003125|0.0025|0.64||
|
|
||||||
C3.2d|||C3.1:1024^C3.0:3||Дипломаты|d|2||||||||1|0.0136|0.01923076923|0.0009765625|0.0003125|2.56||
|
|
||||||
C3.2l|||C3.1:1024^C3.0:11||Логики|l|2||||||||0.5|0.0612|0.04464285714|0.0005|0.0025|1.5625||
|
|
||||||
C3.2c|||C3.1:1024^C3.0:19||Колонисты|c|2||||||||0.8|0.0255|0.04166666667|0.004096|0.006103515625|1||
|
|
||||||
C3.2w|||C3.1:1024^C3.0:26||Воины|w|2||||||||1.25|0.031875|0.025|0.000256|0.03072|0.25||
|
|
||||||
C3.3|1E+13|WD||Гигантская галактика|Создание чёрных дыр из концентрированного излучения.||1|1|1|1|1|1|1|1|||||||3E+05|5.62E-04
|
|
||||||
C3.3m|||C3.2:1024^C3.1:6||Мистики|m|2||||||||1.6|0.006375|0.01|0.0005|0.00128|1||
|
|
||||||
C3.3b|||C3.2:1024^C3.1:9||Строители|b|2||||||||1|0.022578125|0.015625|0.00003125|0.0025|0.64||
|
|
||||||
C3.3d|||C3.2:1024^C3.1:3||Дипломаты|d|2||||||||1|0.0136|0.01923076923|0.0009765625|0.0003125|2.56||
|
|
||||||
C3.3l|||C3.2:1024^C3.1:11||Логики|l|2||||||||0.5|0.0612|0.04464285714|0.0005|0.0025|1.5625||
|
|
||||||
C3.3c|||C3.2:1024^C3.1:19||Колонисты|c|2||||||||0.8|0.0255|0.04166666667|0.004096|0.006103515625|1||
|
|
||||||
C3.3w|||C3.2:1024^C3.1:26||Воины|w|2||||||||1.25|0.031875|0.025|0.000256|0.03072|0.25||
|
|
||||||
C3.4|1E+14|WD||Группа галактик|Экспансия в сверхскопление.||1|1|1|1|1|1|1|1|||||||4E+05|3.16E-04
|
|
||||||
C3.4m|||C3.3:1024^C3.2:6||Мистики|m|2||||||||1.6|0.006375|0.01|0.0005|0.00128|1||
|
|
||||||
C3.4b|||C3.3:1024^C3.2:9||Строители|b|2||||||||1|0.022578125|0.015625|0.00003125|0.0025|0.64||
|
|
||||||
C3.4d|||C3.3:1024^C3.2:3||Дипломаты|d|2||||||||1|0.0136|0.01923076923|0.0009765625|0.0003125|2.56||
|
|
||||||
C3.4l|||C3.3:1024^C3.2:11||Логики|l|2||||||||0.5|0.0612|0.04464285714|0.0005|0.0025|1.5625||
|
|
||||||
C3.4c|||C3.3:1024^C3.2:19||Колонисты|c|2||||||||0.8|0.0255|0.04166666667|0.004096|0.006103515625|1||
|
|
||||||
C3.4w|||C3.3:1024^C3.2:26||Воины|w|2||||||||1.25|0.031875|0.025|0.000256|0.03072|0.25||
|
|
||||||
C3.5|1E+15|NS|||Использование нейтронных звёзд.||1|1|1|1|1|1|1|1|||||||5E+05|1.78E-04
|
|
||||||
C3.5m|||C3.4:1024^C3.3:6||Мистики|m|2||||||||1.6|0.006375|0.01|0.0005|0.00128|1||
|
|
||||||
C3.5b|||C3.4:1024^C3.3:9||Строители|b|2||||||||1|0.022578125|0.015625|0.00003125|0.0025|0.64||
|
|
||||||
C3.5d|||C3.4:1024^C3.3:3||Дипломаты|d|2||||||||1|0.0136|0.01923076923|0.0009765625|0.0003125|2.56||
|
|
||||||
C3.5l|||C3.4:1024^C3.3:11||Логики|l|2||||||||0.5|0.0612|0.04464285714|0.0005|0.0025|1.5625||
|
|
||||||
C3.5c|||C3.4:1024^C3.3:19||Колонисты|c|2||||||||0.8|0.0255|0.04166666667|0.004096|0.006103515625|1||
|
|
||||||
C3.5w|||C3.4:1024^C3.3:26||Воины|w|2||||||||1.25|0.031875|0.025|0.000256|0.03072|0.25||
|
|
||||||
C3.6|1E+16|NS||Сверхскопление|Экспансия в нить.||1|1|1|1|1|1|1|1|||||||6E+05|1.00E-04
|
|
||||||
C3.6m|||C3.5:1024^C3.4:6||Мистики|m|2||||||||1.6|0.006375|0.01|0.0005|0.00128|1||
|
|
||||||
C3.6b|||C3.5:1024^C3.4:9||Строители|b|2||||||||1|0.022578125|0.015625|0.00003125|0.0025|0.64||
|
|
||||||
C3.6d|||C3.5:1024^C3.4:3||Дипломаты|d|2||||||||1|0.0136|0.01923076923|0.0009765625|0.0003125|2.56||
|
|
||||||
C3.6l|||C3.5:1024^C3.4:11||Логики|l|2||||||||0.5|0.0612|0.04464285714|0.0005|0.0025|1.5625||
|
|
||||||
C3.6c|||C3.5:1024^C3.4:19||Колонисты|c|2||||||||0.8|0.0255|0.04166666667|0.004096|0.006103515625|1||
|
|
||||||
C3.6w|||C3.5:1024^C3.4:26||Воины|w|2||||||||1.25|0.031875|0.025|0.000256|0.03072|0.25||
|
|
||||||
C3.7|1E+17|MGT|||Использование магнетаров.||1|1|1|1|1|1|1|1|||||||7E+05|5.62E-05
|
|
||||||
C3.7m|||C3.6:1024^C3.5:6||Мистики|m|2||||||||1.6|0.006375|0.01|0.0005|0.00128|1||
|
|
||||||
C3.7b|||C3.6:1024^C3.5:9||Строители|b|2||||||||1|0.022578125|0.015625|0.00003125|0.0025|0.64||
|
|
||||||
C3.7d|||C3.6:1024^C3.5:3||Дипломаты|d|2||||||||1|0.0136|0.01923076923|0.0009765625|0.0003125|2.56||
|
|
||||||
C3.7l|||C3.6:1024^C3.5:11||Логики|l|2||||||||0.5|0.0612|0.04464285714|0.0005|0.0025|1.5625||
|
|
||||||
C3.7c|||C3.6:1024^C3.5:19||Колонисты|c|2||||||||0.8|0.0255|0.04166666667|0.004096|0.006103515625|1||
|
|
||||||
C3.7w|||C3.6:1024^C3.5:26||Воины|w|2||||||||1.25|0.031875|0.025|0.000256|0.03072|0.25||
|
|
||||||
C3.8|1E+18|MGT||Галактическая нить|Экспансия в великую стену.||1|1|1|1|1|1|1|1|||||||8E+05|3.16E-05
|
|
||||||
C3.8m|||C3.7:1024^C3.6:6||Мистики|m|2||||||||1.6|0.006375|0.01|0.0005|0.00128|1||
|
|
||||||
C3.8b|||C3.7:1024^C3.6:9||Строители|b|2||||||||1|0.022578125|0.015625|0.00003125|0.0025|0.64||
|
|
||||||
C3.8d|||C3.7:1024^C3.6:3||Дипломаты|d|2||||||||1|0.0136|0.01923076923|0.0009765625|0.0003125|2.56||
|
|
||||||
C3.8l|||C3.7:1024^C3.6:11||Логики|l|2||||||||0.5|0.0612|0.04464285714|0.0005|0.0025|1.5625||
|
|
||||||
C3.8c|||C3.7:1024^C3.6:19||Колонисты|c|2||||||||0.8|0.0255|0.04166666667|0.004096|0.006103515625|1||
|
|
||||||
C3.8w|||C3.7:1024^C3.6:26||Воины|w|2||||||||1.25|0.031875|0.025|0.000256|0.03072|0.25||
|
|
||||||
C3.9|1E+19|BH|||Использование чёрных дыр.||1|1|1|1|1|1|1|1|||||||9E+05|1.78E-05
|
|
||||||
C3.9m|||C3.8:1024^C3.7:6||Мистики|m|2||||||||1.6|0.006375|0.01|0.0005|0.00128|1||
|
|
||||||
C3.9b|||C3.8:1024^C3.7:9||Строители|b|2||||||||1|0.022578125|0.015625|0.00003125|0.0025|0.64||
|
|
||||||
C3.9d|||C3.8:1024^C3.7:3||Дипломаты|d|2||||||||1|0.0136|0.01923076923|0.0009765625|0.0003125|2.56||
|
|
||||||
C3.9l|||C3.8:1024^C3.7:11||Логики|l|2||||||||0.5|0.0612|0.04464285714|0.0005|0.0025|1.5625||
|
|
||||||
C3.9c|||C3.8:1024^C3.7:19||Колонисты|c|2||||||||0.8|0.0255|0.04166666667|0.004096|0.006103515625|1||
|
|
||||||
C3.9w|||C3.8:1024^C3.7:26||Воины|w|2||||||||1.25|0.031875|0.025|0.000256|0.03072|0.25||
|
|
||||||
C4|||||Цивилизации вселенского масштаба.||0|||||||||||||||
|
|
||||||
C4.0|1E+20|BH|||Манипуляции со временем.||1|1|1|1|1|1|1|1|||||||2E+06|1.00E-05
|
|
||||||
C4.0m|||C3.9:1024^C3.8:6||Мистики|m|2||||||||1.6|0.00675|0.01|0.0005|0.00128|1||
|
|
||||||
C4.0b|||C3.9:1024^C3.8:9||Строители|b|2||||||||1|0.02390625|0.015625|0.00003125|0.0025|0.64||
|
|
||||||
C4.0d|||C3.9:1024^C3.8:3||Дипломаты|d|2||||||||1|0.0144|0.01923076923|0.0009765625|0.0003125|2.56||
|
|
||||||
C4.0l|||C3.9:1024^C3.8:11||Логики|l|2||||||||0.5|0.0648|0.04464285714|0.0005|0.0025|1.5625||
|
|
||||||
C4.0c|||C3.9:1024^C3.8:19||Колонисты|c|2||||||||0.8|0.027|0.04166666667|0.004096|0.006103515625|1||
|
|
||||||
C4.0w|||C3.9:1024^C3.8:26||Воины|w|2||||||||1.25|0.03375|0.025|0.000256|0.03072|0.25||
|
|
||||||
C4.1|1E+21|BH||Великая стена|Экспансия на масштабы всей вселенной.||1|1|1|1|1|1|1|1|||||||2E+06|5.62E-06
|
|
||||||
C4.1m|||C4.0:1024^C3.9:6||Мистики|m|2||||||||1.6|0.00675|0.01|0.0005|0.00128|1||
|
|
||||||
C4.1b|||C4.0:1024^C3.9:9||Строители|b|2||||||||1|0.02390625|0.015625|0.00003125|0.0025|0.64||
|
|
||||||
C4.1d|||C4.0:1024^C3.9:3||Дипломаты|d|2||||||||1|0.0144|0.01923076923|0.0009765625|0.0003125|2.56||
|
|
||||||
C4.1l|||C4.0:1024^C3.9:11||Логики|l|2||||||||0.5|0.0648|0.04464285714|0.0005|0.0025|1.5625||
|
|
||||||
C4.1c|||C4.0:1024^C3.9:19||Колонисты|c|2||||||||0.8|0.027|0.04166666667|0.004096|0.006103515625|1||
|
|
||||||
C4.1w|||C4.0:1024^C3.9:26||Воины|w|2||||||||1.25|0.03375|0.025|0.000256|0.03072|0.25||
|
|
||||||
C4.2|1E+22|SMBH|||Использование сверхмассивных чёрных дыр.||1|1|1|1|1|1|1|1|||||||4E+06|3.16E-06
|
|
||||||
C4.2m|||C4.1:1024^C4.0:6||Мистики|m|2||||||||1.6|0.00675|0.01|0.0005|0.00128|1||
|
|
||||||
C4.2b|||C4.1:1024^C4.0:9||Строители|b|2||||||||1|0.02390625|0.015625|0.00003125|0.0025|0.64||
|
|
||||||
C4.2d|||C4.1:1024^C4.0:3||Дипломаты|d|2||||||||1|0.0144|0.01923076923|0.0009765625|0.0003125|2.56||
|
|
||||||
C4.2l|||C4.1:1024^C4.0:11||Логики|l|2||||||||0.5|0.0648|0.04464285714|0.0005|0.0025|1.5625||
|
|
||||||
C4.2c|||C4.1:1024^C4.0:19||Колонисты|c|2||||||||0.8|0.027|0.04166666667|0.004096|0.006103515625|1||
|
|
||||||
C4.2w|||C4.1:1024^C4.0:26||Воины|w|2||||||||1.25|0.03375|0.025|0.000256|0.03072|0.25||
|
|
||||||
C4.3|1E+23|SMBH|||Складное пространство.||1|1|1|1|1|1|1|1|||||||6E+06|1.78E-06
|
|
||||||
C4.3m|||C4.2:1024^C4.1:6||Мистики|m|2||||||||1.6|0.00675|0.01|0.0005|0.00128|1||
|
|
||||||
C4.3b|||C4.2:1024^C4.1:9||Строители|b|2||||||||1|0.02390625|0.015625|0.00003125|0.0025|0.64||
|
|
||||||
C4.3d|||C4.2:1024^C4.1:3||Дипломаты|d|2||||||||1|0.0144|0.01923076923|0.0009765625|0.0003125|2.56||
|
|
||||||
C4.3l|||C4.2:1024^C4.1:11||Логики|l|2||||||||0.5|0.0648|0.04464285714|0.0005|0.0025|1.5625||
|
|
||||||
C4.3c|||C4.2:1024^C4.1:19||Колонисты|c|2||||||||0.8|0.027|0.04166666667|0.004096|0.006103515625|1||
|
|
||||||
C4.3w|||C4.2:1024^C4.1:26||Воины|w|2||||||||1.25|0.03375|0.025|0.000256|0.03072|0.25||
|
|
||||||
C4.4|1E+24|SMBH||Вселенский пузырь|Поле невероятности.||1|1|1|1|1|1|1|1|||||||8E+06|1.00E-06
|
|
||||||
C4.4m|||C4.3:1024^C4.2:6||Мистики|m|2||||||||1.6|0.00675|0.01|0.0005|0.00128|1||
|
|
||||||
C4.4b|||C4.3:1024^C4.2:9||Строители|b|2||||||||1|0.02390625|0.015625|0.00003125|0.0025|0.64||
|
|
||||||
C4.4d|||C4.3:1024^C4.2:3||Дипломаты|d|2||||||||1|0.0144|0.01923076923|0.0009765625|0.0003125|2.56||
|
|
||||||
C4.4l|||C4.3:1024^C4.2:11||Логики|l|2||||||||0.5|0.0648|0.04464285714|0.0005|0.0025|1.5625||
|
|
||||||
C4.4c|||C4.3:1024^C4.2:19||Колонисты|c|2||||||||0.8|0.027|0.04166666667|0.004096|0.006103515625|1||
|
|
||||||
C4.4w|||C4.3:1024^C4.2:26||Воины|w|2||||||||1.25|0.03375|0.025|0.000256|0.03072|0.25||
|
|
||||||
Ct|||||Трансцендентальность.||0|1||||||||||||||
|
|
||||||
|
@@ -1,3 +0,0 @@
|
|||||||
ID | Name | Age | Email
|
|
||||||
1 | John | 30 | john@example.com
|
|
||||||
2 | Jane | 25 | jane@example.com
|
|
||||||
|
@@ -1,130 +0,0 @@
|
|||||||
Owniverse||interface||||
|
|
||||||
MM-Create||interface||||Menu/en/CreateUniverse
|
|
||||||
MM-Help||interface||||Menu/en/Tutorial
|
|
||||||
MM-Achievments||interface||||Menu/en/Achievements
|
|
||||||
MM-Credits||interface||||Menu/en/Credits
|
|
||||||
MM-LanguageEn||interface||||Menu/en/EnglishActive
|
|
||||||
MM-LanguageRu||interface||||Menu/en/Russian
|
|
||||||
MM-SoundActive||interface||||Menu/en/SoundActive
|
|
||||||
MM-SoundNonActive||interface||||Menu/en/SoundNonActive
|
|
||||||
MM-MusicActive||interface||||Menu/en/MusicActive
|
|
||||||
MM-MusicNonActive||interface||||Menu/en/MusicNonActive
|
|
||||||
MM-LeaveReality||interface||||Menu/en/LeaveReality
|
|
||||||
CreditsTitle||interface||||Credits/en/Credits
|
|
||||||
CreditsRoles||interface||Unitizer <br> Python Tamer <br> Painter <br> Original Score by||
|
|
||||||
CreditsNames||interface||Kirill Ivlev <br> Ilya Konovalov <br> Dmitry Uvarov <br> Tatyana Stepanenko||
|
|
||||||
Achievement-Header||interface||||Achievements/en/Achievements
|
|
||||||
Achievement-Status-Template||interface||Unlocked %Count% of %Total%||
|
|
||||||
ReportTitle||interface||||Report/en/Title
|
|
||||||
ReportNewWarning||interface||||Report/en/NewWarning
|
|
||||||
ReportNewButton||interface||||Report/en/NewButton
|
|
||||||
ReportWipeWarning||interface||||Report/en/WipeWarning
|
|
||||||
ReportWipeButton||interface||||Report/en/WipeButton
|
|
||||||
MF-FBV-ReturnButton||interface||||Dashboard/Indicators/ForceBoxes/En/Return
|
|
||||||
MF-FBV-OpenBoxButton||interface||||Dashboard/Indicators/ForceBoxes/En/OpenBox
|
|
||||||
MF-FBV-AcquireButton||interface||||Dashboard/Indicators/ForceBoxes/En/Acquire
|
|
||||||
MF-FBV-NoAdsDeliveredSign||interface||||Dashboard/Indicators/ForceBoxes/En/NoAds
|
|
||||||
Universe||interface||||
|
|
||||||
Time|Time|indicator|AboutTheGame|Time|Change the speed as you like.|
|
|
||||||
Energy|Enr|indicator|EnergyAndDensity|Energy|Spend on hydrogen and space.|
|
|
||||||
Density|Den|indicator|EnergyAndDensity|Density|Maintain balance.|
|
|
||||||
DensityRip|DenR|indicator|EnergyAndDensity|Big Rip|Increase density!|
|
|
||||||
DensityCrunch|DenC|indicator|EnergyAndDensity|Big Crunch|Decrease density!|
|
|
||||||
BurnabilityIndicator|Bur|indicator|BurnabilityAndExplosiveness|Burnability|Burning intensity of stars.|
|
|
||||||
ExplosivenessIndicator|Exp|indicator|BurnabilityAndExplosiveness|Explosiveness|Power of stellar explosions.|
|
|
||||||
AggressionIndicator|Agg|indicator|AggressionAndTrends|Aggression|Evolution and competition.|
|
|
||||||
||||1 year per second||
|
|
||||||
||||10 years per second||
|
|
||||||
||||100 years per second||
|
|
||||||
||||1 000 years per second||
|
|
||||||
||||10 000 years per second||
|
|
||||||
||||100 000 years per second||
|
|
||||||
||||1 000 000 years per second||
|
|
||||||
||||10 000 000 years per second||
|
|
||||||
||||100 000 000 years per second||
|
|
||||||
||||1 000 000 000 years per second||
|
|
||||||
||logtext||Summary of changes in the last 100 seconds.<br>Average values for the year are shown.||
|
|
||||||
ForceNavigationImage||interface||||BigBang/Dashboard/en/Forces
|
|
||||||
1-1-1-NavigationResourceImage||interface||||BigBang/Dashboard/en/Resources
|
|
||||||
Space|S|entity|SpaceAndHydrogen|Space|Needed for placing objects.|
|
|
||||||
Hydrogen|H|entity|SpaceAndHydrogen|Hydrogen|Used to create clouds and stars.|
|
|
||||||
Helium|He|entity|HeliumAndMetals|Helium|Saves hydrogen.|
|
|
||||||
Metals|Met|entity|HeliumAndMetals|Metals|Needed to create planets.|
|
|
||||||
||||Metallicity||
|
|
||||||
NavigationStarImage||interface||||BigBang/Dashboard/en/Stars
|
|
||||||
Nebula|N|entity|Clouds|Nebula|Produces hydrogen.|
|
|
||||||
Globula|G|entity|Clouds|Globula|Produces more hydrogen.|
|
|
||||||
StarNursery|STN|entity|Clouds|Star Nursery|Produces hydrogen and stars.|
|
|
||||||
MolecularCloud|MC|entity|Clouds|Molecular Cloud|Produces a lot of hydrogen.|
|
|
||||||
ActiveStarNursery|ASTN|entity|Clouds|Active Star Nursery|Produces a lot of hydrogen and stars.|
|
|
||||||
BrownDwarf|BD|entity|DwarfStars|Brown Dwarf|Useless, but doesn't take up space.|
|
|
||||||
RedDwarf|RD|entity|DwarfStars|Red Dwarf|The simplest star.|
|
|
||||||
OrangeDwarf|OD|entity|DwarfStars|Orange Dwarf|Star with planets.|
|
|
||||||
YellowDwarf|YD|entity|DwarfStars|Yellow Dwarf|Star similar to the Sun.|
|
|
||||||
WhiteYellowDwarf|WYD|entity|DwarfStars|White-Yellow Dwarf|Star with many planets.|
|
|
||||||
RedGiant|RG|entity|GiantStars|Red Giant|Degrading old star.|
|
|
||||||
YellowGiant|YG|entity|GiantStars|Yellow Giant|Optimal for metals production.|
|
|
||||||
BlueGiant|BG|entity|GiantStars|Blue Giant|Produces metals and space in a balanced manner.|
|
|
||||||
Supergiant|SG|entity|GiantStars|Supergiant|Produces space and a bit of metals quickly.|
|
|
||||||
Hypergiant|HG|entity|GiantStars|Hypergiant|Burns violently, creating a lot of space.|
|
|
||||||
WhiteDwarf|WD|entity|DegenerateObjects|White Dwarf|Remnant of a dwarf star.|
|
|
||||||
NeutronStar|NS|entity|DegenerateObjects|Neutron Star|Remnant of a burned-out giant.|
|
|
||||||
Magnetar|MGT|entity|DegenerateObjects|Magnetar|Remnant of a large giant.|
|
|
||||||
BlackHole|BH|entity|DegenerateObjects|Black Hole|The result of a stellar catastrophe. Needed for structures.|
|
|
||||||
SupermassiveBlackHole|SMBH|entity|DegenerateObjects|Supermassive Black Hole|Merged from black holes. Needed for galaxies.|
|
|
||||||
1-3-1-NavigationStructureImage||interface||||BigBang/Dashboard/en/Structures
|
|
||||||
StarClusterScattered|SCD|entity|StarClusters|Scattered Star Cluster|A little structure of irregular shape.<br>Space: +10%.|
|
|
||||||
StarClusterSmall|SCS|entity|StarClusters|Small Star Cluster|Has globular shape.<br>Space: +20%.|
|
|
||||||
StarClusterMedium|SCM|entity|StarClusters|Medium Star Cluster|Noticeable from afar off.<br>Space: +30%.|
|
|
||||||
StarClusterLarge|SCL|entity|StarClusters|Large Star Cluster|Makes an impression.<br>Space: +50%.|
|
|
||||||
StarClusterGiant|SCG|entity|StarClusters|Giant Star Cluster|Causes awe.<br>Space: +80%.|
|
|
||||||
GalaxyEllipticalDwarf|GED|entity|Galaxies|Dwarf Elliptical Galaxy|The size of the Small Magellanic Cloud.<br>Space: +100%.|
|
|
||||||
GalaxyEllipticalSmall|GES|entity|Galaxies|Small Elliptical Galaxy|The size of the Large Magellanic Cloud.<br>Space: +150%.|
|
|
||||||
GalaxyEllipticalMedium|GEM|entity|Galaxies|Medium Elliptical Galaxy|The size of the Milky Way.<br>Space: +200%.|
|
|
||||||
GalaxyEllipticalLarge|GEL|entity|Galaxies|Large Elliptical Galaxy|The size of the Andromeda Galaxy.<br>Space: +300%.|
|
|
||||||
GalaxyEllipticalGiant|GEG|entity|Galaxies|Giant Elliptical Galaxy|Similar to the IC 1101.<br>Space: +450%.|
|
|
||||||
GalaxySpiralDwarf|GSD|entity|Galaxies|Dwarf Spiral Galaxy|Similar to the Small Magellanic Cloud.|
|
|
||||||
GalaxySpiralSmall|GSS|entity|Galaxies|Small Spiral Galaxy|Similar to the Large Magellanic Cloud.|
|
|
||||||
GalaxySpiralMedium|GSM|entity|Galaxies|Medium Spiral Galaxy|Similar to the Milky Way.|
|
|
||||||
GalaxySpiralLarge|GSL|entity|Galaxies|Large Spiral Galaxy|Similar to the Andromeda Galaxy.|
|
|
||||||
GalaxySpiralGiant|GSG|entity|Galaxies|Giant Spiral Galaxy|The size of the IC 1101.|
|
|
||||||
GalacticGroup|LGG|entity|LargeStructures|Galactic Group|Aggregates galaxies.|
|
|
||||||
GalacticSupercluster|LSC|entity|LargeStructures|Galactic Supercluster|Basis for the structure of the universe.|
|
|
||||||
GalacticFilament|LGF|entity|LargeStructures|Galactic Filament|Balances density with voids.|
|
|
||||||
GalacticWall|LGW|entity|LargeStructures|Great Wall|Creates the structure of the universe.|
|
|
||||||
UniverseBubble|LUB|entity|LargeStructures|Universe Bubble|That's the extent of it.|
|
|
||||||
1-4-1-NavigationLifeImage||interface||||BigBang/Dashboard/en/Planets
|
|
||||||
GasGiant|GG|entity|Planets|Gas Giant|Too big.|
|
|
||||||
AsteroidBelt|AB|entity|Planets|Asteroids|A bunch of rocks.|
|
|
||||||
RockyPlanet|RP|entity|Planets|Rocky Planet|Not suitable for life.|
|
|
||||||
HabitablePlanet|HP|entity|Planets|Habitable Planet|Has the potential for life.|
|
|
||||||
LivingPlanet|LP|entity|Planets|Living Planet|There is life on this planet!|
|
|
||||||
|Star|||Star||
|
|
||||||
|SC|||Star Cluster||
|
|
||||||
|GAL|||Galaxy||
|
|
||||||
AboutTheGame||help||About The Game|In this game you can <b>create a universe</b> and control its development. The final goal is designated by yourself. Don't forget to check out the list of game achievements and try to reach some of the ones that seem interesting. Read hints, explore possibilities and don't be afraid to experiment. In the worst case you can always start from scratch.<br><br>Numbers greater than 1 000 are displayed using <b>scientific notation</b>. 1e4 – this is a 10 000, meaning “one with 4 zeroes”. 1e6 – a million, 1e9 – a billion and so on. 13.77e9 – this is 13 billions 770 millions.<br><br>The game plays in <b>real time</b> with changeable scaling. One second of real time can pass a year, a decade, a century and so on. Change the pace of time by using buttons “−” and “+”.|Help/en/AboutTheGame
|
|
||||||
GameplayBasics||help||Gameplay Basics|You have access to a very large, but still limited <b>cache of energy</b> that is used to create the whole matter in the universe and the expanse of the universe's space itself. At the start of the game the vast majority of this energy is not in your direct control. But during the game you will take more and more energy from the cache. The less filled the cache is, the harder it is to obtain new energy. The energy shortage won’t become an urgent problem in the first billion years or so: the cache is really very large.<br><br>The matter is harvested from the energy cache in the form of <b>hydrogen</b> by clouds. Hydrogen may be spent to create new clouds and also to create stars. During their burning stars create <b>space</b> that can be used to place additional stars and clouds. This creation of space also spends some energy from the cache.|Help/en/GameplayBasics
|
|
||||||
StarsAndStructures||help||Stars and Structures|The heavier the star is, the faster it burns and the more space it produces. However, on the contrary, the most cost-efficient way of spending hydrogen to obtain new space, is investment into the smallest stars. Unfortunately they burn for a very long time and produce space very slowly. Also each star takes a unit of space, no matter which type the star is.<br><br>There is a reason to arrange stars and nebulae of the growing universe into galaxies and even larger <b>structures</b>. The production of space by stars is increased inside structures.<br><br>The proportion between universe matter and space is called density. The universe is only stable when the <b>density</b> is inside a certain range. If it is too packed or too empty, problems come into being.|Help/en/StarsAndStructures
|
|
||||||
LifeAndForces||help||Life and Forces|<b>Planets</b> form around certain stars, and life may emerge there. In specific circumstances life can evolve to sapience, and sapience can advance to high technology. Life's next step is to try to reclaim the universe, which she assumes as her own.<br><br>There are many events in the universe that don't happen all the time, only with certain probability. You have access to special <b>forces</b>, which you can use to “tweak” chances of events that are important to you, changing the laws of nature in the process.|Help/en/LifeAndForces
|
|
||||||
Achievements||help||Achievements|During the gameplay you will definitely be able to reach certain <b>achievements</b>. While simpler ones come by themselves, ones that are more complex may be more tricky. You can use the achievements list as a roadmap of hints and suggestions for possible next steps.<br><br>It is unnecessary to try to finish each and every achievement. This is your own universe and you can do whatever you like with it. However, achievements are a nice thing in general, and besides just having a personal feeling of pride and accomplishment you can easily <b>share</b> it with friends!|Help/en/Achievements
|
|
||||||
Karma||help||Karma|Each obtained achievement grants you a certain number of <b>karmic points</b>. During the new universe creation you may spend these points to gain some small bonuses that will definitely help you to gain better results.<br><br>Spent karmic points are not lost: they will be <b>available</b> for spending again in the next universe. There is a chance that there will be even more of them at that moment.|Help/en/Karma
|
|
||||||
Gauges||help||Gauges|<b>Gauges</b> of measures that are especially important for an active objects page are located on the dashboard. To check other gauges just swipe the page.|Help/en/Gauges
|
|
||||||
EnergyAndDensity||help||Energy and Density|<b>Energy</b> from the cache is converted into hydrogen and space. The lower the proportion of remaining cache, indicated in the middle of the bar, the lower is the efficiency of the resource generators, such as clouds for hydrogen and stars for space.<br>The energy cache really is immense, however it is not infinite.<br><br>Average <b>density</b> of the universe is the ratio of total matter mass, meaning all stars, clouds and so on, to the empty space. It increases alongside the mass and decreases when the space grows. If the “ρ” gauge will leave the “middle zone” and become inclined to any of the two extremeties, then the outcome might surprise you in a bad way.|Help/en/EnergyAndDensity
|
|
||||||
BurnabilityAndExplosiveness||help||Burnability and Explosiveness|<b>Burnability</b> displays the current burning rate of stars. It can be influenced by the universe density (the denser the greater), the actions of superadvanced civilizations and the forces used by the player.<br><br><b>Explosiveness</b> displays the current probability of the gamma-ray bursts and the space yield produced by any sort of star collapses. It can be influenced by universe density (the denser the lower), actions of superadvanced civilizations and forces used by the player.|Help/en/BurnabilityAndExplosiveness
|
|
||||||
AggressionAndTrends||help||Aggression and Trends|<b>Aggression</b> displays the intensity of competition between species, civilizations and their inner factions. It governs the progress and stability of life and societies. It can be influenced by universal trends and forces used by the player.<br>By default the average universal aggression is shown. But you can select any civilization level and observe the average aggression for this level, which can be different from the universal one.<br><br><b>Trends</b> are the results of prolonged civilization influences. There are five trends in total.|Help/en/AggressionAndTrends
|
|
||||||
SpaceAndHydrogen||help||Space and Hydrogen|The majority of creative actions require spending <b>resources</b>.<br><br><b>Space</b> is needed to place everything you are creating. To add new space lit up some stars! Also don't forget to combine the created stars into structures to get even more space.<br><br><b>Hydrogen</b> is required to create nebulae and stars. Nebulae allow you to obtain more hydrogen. Stars are used to make more space and also to harbor planets. Both of these object types also serve as building blocks to create more complex structures.|Help/en/SpaceAndHydrogen
|
|
||||||
HeliumAndMetals||help||Helium and Metals|Helium and metals are obtained when stars finish their life cycle.<br><b>Helium</b> is not especially useful, but it is inevitable. It is automatically spent in a line of hydrogen if possible, conserving the more valuable resource.<br><br><b>Metals</b> “contaminate” your hydrogen and helium by heavier elements. And usually it is a good thing, because the high proportion of metals to hydrogen and helium, also known as “metallicity”, provides for a greater chance for planets to emerge near new stars.<br>Metals are added when stars burn out, especially larger ones. But total metellicity may shrink down when the universe is filled by new objects made from pure hydrogen and helium, such as nebulae and stars.|Help/en/HeliumAndMetals
|
|
||||||
Clouds||help||Clouds|Clouds are used to produce hydrogen, which is required to construct the universe. Simplest nebulae can be arranged into more complex cloud structures.<br><br><b>Nebula:</b> the simplest of clouds.<br><b>Globula:</b> provides hydrogen at a slower rate than nebulae, but persists for longer, and also takes less space. Used in creation of larger clouds.<br><b>Star nursery:</b> automatically creates stars from a fraction of provided hydrogen.<br><b>Molecular cloud:</b> large and long-lasting hydrogen generator.<br><b>Active star nursery:</b> very large automatic hydrogen and stars generator.|Help/en/Clouds
|
|
||||||
DwarfStars||help||Dwarf Stars|Dwarf stars are cheap, they last for a long time and produce space efficiently. They can have planets that sometimes may harbor life at some point.<br><br><b>Brown dwarf:</b> useless rejects that happen during the star creation process. They appear by themselves and do not take space as opposed to all the other stars. Can’t be created manually, and you don’t need to.<br><b>Red dwarf:</b> It is cost-effective in space creation, but works very slowly.<br><b>Orange dwarf:</b> perfect for the development of life.<br><b>Yellow dwarf:</b> good for the emergence of life.<br><b>White-yellow dwarf:</b> has a largest habitable zone, but burns out rapidly.|Help/en/DwarfStars
|
|
||||||
GiantStars||help||Giant Stars|Giant stars burn rapidly and produce a lot of space. At the end of their existence they collapse. These events can damage planets at nearby stars, but they produce metals.<br><br><b>Red giant:</b> a star that has consumed the majority of its fuel. You can’t create these manually, they emerge themselves.<br><b>Yellow giant:</b> the most modest of giant stars. Produces a lot of metals, collapse is weak.<br><b>Blue giant:</b> a common giant star. Produces a good amount of space and metals. Collapse is average.<br><b>Supergiant:</b> huge giant star. Lives short, collapses violently, produces a lot of space and few metals.<br><b>Hypergiant:</b> extremely giant star. Always collapses into a black hole, producing a huge amount of space, which is accompanied by insane destruction.|Help/en/GiantStars
|
|
||||||
DegenerateObjects||help||Degenerate Objects|Stars that have exhausted their fusion fuel. They occupy space and do not produce anything, but can be used in forming structures.<br><br><b>White dwarf:</b> the remains of a dwarf star.<br><b>Neutron star:</b> exceptionally compact remains of a giant star.<br><b>Magnetar:</b> the most dense object that is not a black hole.<br><b>Black hole:</b> the remains of a giant star that experienced a destructive collapse. They may be merged into supermassive black holes.<br><b>Supermassive black hole:</b> the result of multitudes of the stellar mass black holes merged into one. Required for galactic formation. They do grow in time, consuming other stars, but do so very slowly.|Help/en/DegenerateObjects
|
|
||||||
StarClusters||help||Star Clusters|Star clusters are the most modest of available structures. As a matter of fact these are just a lot of stars which are co-located closer to each other than usual, and therefore they are gravitationally bound. But even such simple lumps already bring noticeable variety into the homogenous landscape of the universe.<br><br><b>Scattered:</b> little structure of irregular shape.<br><b>Small:</b> globular shape.<br><b>Medium:</b> noticeable from afar off.<br><b>Large:</b> makes an impression.<br><b>Giant:</b> causes awe.<br><br>Clusters, like other structures, increase the production of space for their constituent stars. Stars in structures exist as usual. Over time, the clusters disintegrate, releasing the stars they are composed of. Large clusters last longer than small ones and provide a larger bonus to space production.|Help/en/StarClusters
|
|
||||||
Galaxies||help||Galaxies|<b>Elliptical galaxies</b> resemble colossal star clusters. They have lenticular shapes, rotate slowly and look very much alike to each other. The stars in them produce more space than in spiral galaxies. Gradually, elliptical galaxies disintegrate into separate stars.<br><br><b>Spiral galaxies</b> spin faster than elliptical ones, they have diverse structures with arms and keep active star formation. They are better fit for the emergence and development of life. In time spiral galaxies exhaust their storage of free gas, they slow down and become more stable and boring ellipticals.<br><br>As in the case of other structures, the stars included in the composition of galaxies continue to function as usual. They produce space, and dwarf stars can have planets.|Help/en/Galaxies
|
|
||||||
LargeStructures||help||Large Structures|<b>Large structures</b> are called that for a reason: whole galaxies are used there as building blocks. They are needed to arrange the universe on the largest scales. Without them the space, uniformly filled by stars and galaxies, becomes too monotonous and sparse, meanwile these structures create a packing gradient with more and less dense regions. This arrangement is better fit for being claimed and developed by superadvanced sapient beings.<br><br>Over time, large structures disintegrate into their components, but this does not happen very soon.|Help/en/LargeStructures
|
|
||||||
Planets||help||Planets|Planets emerge around dwarf stars when metals are sufficient. In a sense all this space construction is being made with a purpose of making planets with potential of bearing life.<br><br><b>Gas giant:</b> large planet with a very thick atmosphere, unsuitable for life.<br><b>Asteroid belt:</b> a bunch of rocks that lacks mass to form a planet.<br><b>Rocky planet:</b> a planet unsuitable for life. Too cold, hot or wrong chemical makeup.<br><b>Habitable planet:</b> there is liquid water here and life may emerge in the long run.<br><b>Living planet:</b> denizens of this planet show great promise!|Help/en/Planets
|
|
||||||
Eons||help||Eons|Life slowly evolves through eons from the most primitive one to the one with sapience potential. Not all planets are successful in completing this process to the end, because stars do not burn forever.<br><br><b>Archean:</b> it is difficult to notice, but these planets are full of archaea and cyanobacteria.<br><b>Paleozoic:</b> alongside ubiquitous amoeba these planets host algae, sponges and even molluscs.<br><b>Proterozoic:</b> ferns, worms, trilobites and fishes.<br><b>Mezozoic:</b> conifers, lizards, dinosaurs and therapsids.<br><b>Cenozoic:</b> flowering plants and various mammals, some of which show signs of sapience.|Help/en/Eons
|
|
||||||
Type0Civilizations||help||Type 0 Civilizations|Pre-space epoch – from a tribe to a federation.<br><br><b>c0.0:</b> Lower Paleolithic. Control of fire, stone tools.<br><b>c0.1:</b> Middle Paleolithic. Developed stone tools.<br><b>c0.2:</b> Upper Paleolithic. Advanced stone tools, art.<br><b>c0.3:</b> Mesolithic. Bow and arrows, fishing, boats.<br><b>c0.4:</b> Early Neolithic. Agriculture.<br><b>c0.5:</b> Middle Neolithic. Animal husbandry, ceramics.<br><b>c0.6:</b> Late Neolithic. Large settlements.<br><b>c0.7:</b> First kingdoms of copper and bronze ages. Wheel.<br><b>c0.8:</b> Ancient empires of the iron age. Philosophy.<br><b>c0.9:</b> Industrial age. Electronics and nuclear energy.|Help/en/Type0Civilizations
|
|
||||||
Type1Civilizations||help||Type 1 Civilizations|Civilizations are busy with settling their own solar system.<br><br><b>c1.0:</b> A civilization that has completely mastered its home planet. Superconductivity, controlled nuclear fusion.<br><b>c1.1:</b> Research compounds in the home system. Launch loop, space elevator.<br><b>c1.2:</b> Complete genetic tailoring. Cyborgization.<br><b>c1.3:</b> Industrial asteroid mining. Colonies on the other planets of the home system.<br><b>c1.4:</b> Harvesting of matter from atmospheres of gas giants.<br><b>c1.5:</b> Space cities. Picotechnologies.<br><b>c1.6:</b> Industrial manufacturing of antimatter. First starships.<br><b>c1.7:</b> Terraforming. Gamma-lasers.<br><b>c1.8:</b> Space stations of continental scale.<br><b>c1.9:</b> Partial Dyson swarm.|Help/en/Type1Civilizations
|
|
||||||
Type2Civilizations||help||Type 2 Civilizations|Civilizations that can expand to other stars.<br><br><b>c2.0:</b> A civilization that completely exploits the energy output of its own sun.<br><b>c2.1:</b> Change of planetary orbits.<br><b>c2.2:</b> Control over inertia.<br><b>c2.3:</b> Starlifting, harvesting matter from stars.<br><b>c2.4:</b> Femtotechnologies: manipulations on individual fermions.<br><b>c2.5:</b> Deconstruction and creation of planets.<br><b>c2.6:</b> Complete domination of astroarchitecture over planets.<br><b>c2.7:</b> Giant stars resources exploitation.<br><b>c2.8:</b> Control over gravity.<br><b>c2.9:</b> Movement of stars.|Help/en/Type2Civilizations
|
|
||||||
Type3Civilizations||help||Type 3 Civilizations|Civilizations of galactic scale.<br><br><b>c3.0:</b> Expansion into a galactic group is available.<br><b>c3.1:</b> Creation of stars.<br><b>c3.2:</b> Utilization of white dwarfs.<br><b>c3.3:</b> Creation of black holes by focused radiation.<br><b>c3.4:</b> Expansion into a galactic supercluster is available.<br><b>c3.5:</b> Utilization of neutron stars.<br><b>c3.6:</b> Expansion into a galactic filament is available.<br><b>c3.7:</b> Utilization of magnetars.<br><b>c3.8:</b> Expansion into a great wall is available.<br><b>c3.9:</b> Utilization of black holes.|Help/en/Type3Civilizations
|
|
||||||
Type4Civilizations||help||Type 4 Civilizations|Civilizations of the universe scale.<br><br><b>c4.0:</b> Temporal manipulations.<br><b>c4.1:</b> Expansion into the whole universe scale is available.<br><b>c4.2:</b> Utilization of supermassive black holes.<br><b>c4.3:</b> Folding space.<br><b>c4.4:</b> Improbability field.<br><br>And so on, bigger and bigger, so long as there is space.|Help/en/Type4Civilizations
|
|
||||||
|
@@ -1,130 +0,0 @@
|
|||||||
Owniverse||interface||||
|
|
||||||
MM-Create||interface||||Menu/ru/CreateUniverse
|
|
||||||
MM-Help||interface||||Menu/ru/Tutorial
|
|
||||||
MM-Achievments||interface||||Menu/ru/Achievements
|
|
||||||
MM-Credits||interface||||Menu/ru/Credits
|
|
||||||
MM-LanguageEn||interface||||Menu/ru/English
|
|
||||||
MM-LanguageRu||interface||||Menu/ru/RussianActive
|
|
||||||
MM-SoundActive||interface||||Menu/ru/SoundActive
|
|
||||||
MM-SoundNonActive||interface||||Menu/ru/SoundNonActive
|
|
||||||
MM-MusicActive||interface||||Menu/ru/MusicActive
|
|
||||||
MM-MusicNonActive||interface||||Menu/ru/MusicNonActive
|
|
||||||
MM-LeaveReality||interface||||Menu/ru/LeaveReality
|
|
||||||
CreditsTitle||interface||||Credits/ru/Credits
|
|
||||||
CreditsRoles||interface||Объединитель <br> Укротитель питона <br> Рисователь <br> Композитор||
|
|
||||||
CreditsNames||interface||Кирилл Ивлев <br> Илья Коновалов <br> Дмитрий Уваров <br> Татьяна Степаненко||
|
|
||||||
Achievement-Header||interface||||Achievements/ru/Achievements
|
|
||||||
Achievement-Status-Template||interface||Открыто %Count% из %Total%||
|
|
||||||
ReportTitle||interface||||Report/ru/Title
|
|
||||||
ReportNewWarning||interface||||Report/ru/NewWarning
|
|
||||||
ReportNewButton||interface||||Report/ru/NewButton
|
|
||||||
ReportWipeWarning||interface||||Report/ru/WipeWarning
|
|
||||||
ReportWipeButton||interface||||Report/ru/WipeButton
|
|
||||||
MF-FBV-ReturnButton||interface||||Dashboard/Indicators/ForceBoxes/Ru/Return
|
|
||||||
MF-FBV-OpenBoxButton||interface||||Dashboard/Indicators/ForceBoxes/Ru/OpenBox
|
|
||||||
MF-FBV-AcquireButton||interface||||Dashboard/Indicators/ForceBoxes/Ru/Acquire
|
|
||||||
MF-FBV-NoAdsDeliveredSign||interface||||Dashboard/Indicators/ForceBoxes/Ru/NoAds
|
|
||||||
Universe||interface||||
|
|
||||||
Time|Time|indicator|AboutTheGame|Время|Меняйте скорость как хотите.|
|
|
||||||
Energy|Enr|indicator|EnergyAndDensity|Энергия|Расходуйте на водород и пространство.|
|
|
||||||
Density|Den|indicator|EnergyAndDensity|Плотность|Поддерживайте баланс.|
|
|
||||||
DensityRip|DenR|indicator|EnergyAndDensity|Большой разрыв|Повышайте плотность!|
|
|
||||||
DensityCrunch|DenC|indicator|EnergyAndDensity|Большое сжатие|Понижайте плотность!|
|
|
||||||
BurnabilityIndicator|Bur|indicator|BurnabilityAndExplosiveness|Горючесть|Интенсивность горения звёзд.|
|
|
||||||
ExplosivenessIndicator|Exp|indicator|BurnabilityAndExplosiveness|Взрвычатость|Мощность звёздных взрывов.|
|
|
||||||
AggressionIndicator|Agg|indicator|AggressionAndTrends|Агрессия|Эволюция и конкуренция.|
|
|
||||||
||||1 год в секунду||
|
|
||||||
||||10 лет в секунду||
|
|
||||||
||||100 лет в секунду||
|
|
||||||
||||1 000 лет в секунду||
|
|
||||||
||||10 000 лет в секунду||
|
|
||||||
||||100 000 лет в секунду||
|
|
||||||
||||1 000 000 лет в секунду||
|
|
||||||
||||10 000 000 лет в секунду||
|
|
||||||
||||100 000 000 лет в секунду||
|
|
||||||
||||1 000 000 000 лет в секунду||
|
|
||||||
||logtext||Сводка изменений за последние 100 секунд.<br>Указаны средние значения за год.||
|
|
||||||
ForceNavigationImage||interface||||BigBang/Dashboard/ru/Forces
|
|
||||||
1-1-1-NavigationResourceImage||interface||||BigBang/Dashboard/ru/Resources
|
|
||||||
Space|S|entity|SpaceAndHydrogen|Пространство|Нужно для размещения объектов.|
|
|
||||||
Hydrogen|H|entity|SpaceAndHydrogen|Водород|Нужен для создания облаков и звёзд.|
|
|
||||||
Helium|He|entity|HeliumAndMetals|Гелий|Экономит водород.|
|
|
||||||
Metals|Met|entity|HeliumAndMetals|Металлы|Нужны для создания планет.|
|
|
||||||
||||Металличность||
|
|
||||||
NavigationStarImage||interface||||BigBang/Dashboard/ru/Stars
|
|
||||||
Nebula|N|entity|Clouds|Туманность|Производит водород.|
|
|
||||||
Globula|G|entity|Clouds|Глобула|Производит больше водорода.|
|
|
||||||
StarNursery|STN|entity|Clouds|Звёздная колыбель|Производит водород и звёзды.|
|
|
||||||
MolecularCloud|MC|entity|Clouds|Молекулярное облако|Производит много водорода.|
|
|
||||||
ActiveStarNursery|ASTN|entity|Clouds|Активная звёздная колыбель|Производит очень много водорода и звёзд.|
|
|
||||||
BrownDwarf|BD|entity|DwarfStars|Бурый карлик|Бесполезен, но не занимает место.|
|
|
||||||
RedDwarf|RD|entity|DwarfStars|Красный карлик|Простейшая звезда.|
|
|
||||||
OrangeDwarf|OD|entity|DwarfStars|Оранжевый карлик|Звезда с планетами.|
|
|
||||||
YellowDwarf|YD|entity|DwarfStars|Жёлтый карлик|Звезда похожая на Солнце.|
|
|
||||||
WhiteYellowDwarf|WYD|entity|DwarfStars|Бело-жёлтый карлик|Звезда со множеством планет.|
|
|
||||||
RedGiant|RG|entity|GiantStars|Красный гигант|Деградирующая старая звезда.|
|
|
||||||
YellowGiant|YG|entity|GiantStars|Жёлтый гигант|Оптимальна для производства металлов.|
|
|
||||||
BlueGiant|BG|entity|GiantStars|Голубой гигант|Сбалансированно производит металлы и пространство.|
|
|
||||||
Supergiant|SG|entity|GiantStars|Сверхгигант|Быстро производит пространство и чуть-чуть металлов.|
|
|
||||||
Hypergiant|HG|entity|GiantStars|Гипергигант|Бурно сгорает, создавая много пространства.|
|
|
||||||
WhiteDwarf|WD|entity|DegenerateObjects|Белый карлик|Остаток сгоревшего карлика.|
|
|
||||||
NeutronStar|NS|entity|DegenerateObjects|Нейтронная звезда|Остаток сгоревшего гиганта.|
|
|
||||||
Magnetar|MGT|entity|DegenerateObjects|Магнетар|Остаток большого гиганта.|
|
|
||||||
BlackHole|BH|entity|DegenerateObjects|Чёрная дыра|Результат звёздной катастрофы. Нужна для структур.|
|
|
||||||
SupermassiveBlackHole|SMBH|entity|DegenerateObjects|Сверхмассивная чёрная дыра|Собирается из чёрных дыр. Нужна для галактик.|
|
|
||||||
1-3-1-NavigationStructureImage||interface||||BigBang/Dashboard/ru/Structures
|
|
||||||
StarClusterScattered|SCD|entity|StarClusters|Рассеянное звёздное скопление|Небольшая структура неправильной формы.<br>Пространство: +10%.|
|
|
||||||
StarClusterSmall|SCS|entity|StarClusters|Малое звёздное скопление|Имеет шарообразную форму.<br>Пространство: +20%.|
|
|
||||||
StarClusterMedium|SCM|entity|StarClusters|Среднее звёздное скопление|Заметно издалека.<br>Пространство: +30%.|
|
|
||||||
StarClusterLarge|SCL|entity|StarClusters|Большое звёздное скопление|Производит впечатление.<br>Пространство: +50%.|
|
|
||||||
StarClusterGiant|SCG|entity|StarClusters|Гигантское звёздное скопление|Вызывает трепет.<br>Пространство: +80%.|
|
|
||||||
GalaxyEllipticalDwarf|GED|entity|Galaxies|Карликовая эллиптическая галактика|Размером с Малое Магелланово Облако.<br>Пространство: +100%.|
|
|
||||||
GalaxyEllipticalSmall|GES|entity|Galaxies|Малая эллиптическая галактика|Размером с Большое Магелланово Облако.<br>Пространство: +150%.|
|
|
||||||
GalaxyEllipticalMedium|GEM|entity|Galaxies|Средняя эллиптическая галактика|Размером с Млечный Путь.<br>Пространство: +200%.|
|
|
||||||
GalaxyEllipticalLarge|GEL|entity|Galaxies|Большая эллиптическая галактика|Размером с Туманность Андромеды.<br>Пространство: +300%.|
|
|
||||||
GalaxyEllipticalGiant|GEG|entity|Galaxies|Гигантская эллиптическая галактика|Похожа на IC 1101.<br>Пространство: +450%.|
|
|
||||||
GalaxySpiralDwarf|GSD|entity|Galaxies|Карликовая спиральная галактика|Похожа на Малое Магелланово Облако.|
|
|
||||||
GalaxySpiralSmall|GSS|entity|Galaxies|Малая спиральная галактика|Похожа на Большое Магелланово Облако.|
|
|
||||||
GalaxySpiralMedium|GSM|entity|Galaxies|Средняя спиральная галактика|Похожа на Млечный Путь.|
|
|
||||||
GalaxySpiralLarge|GSL|entity|Galaxies|Большая спиральная галактика|Похожа на Туманность Андромеды.|
|
|
||||||
GalaxySpiralGiant|GSG|entity|Galaxies|Гигантская спиральная галактика|Размером с IC 1101.|
|
|
||||||
GalacticGroup|LGG|entity|LargeStructures|Группа галактик|Объединяет галактики.|
|
|
||||||
GalacticSupercluster|LSC|entity|LargeStructures|Сверхскопление галактик|Основа для структуры вселенной.|
|
|
||||||
GalacticFilament|LGF|entity|LargeStructures|Галактическая нить|Балансирует плотность воидами.|
|
|
||||||
GalacticWall|LGW|entity|LargeStructures|Великая стена|Создаёт структуру вселенной.|
|
|
||||||
UniverseBubble|LUB|entity|LargeStructures|Вселенский пузырь|Больше некуда.|
|
|
||||||
1-4-1-NavigationLifeImage||interface||||BigBang/Dashboard/ru/Planets
|
|
||||||
GasGiant|GG|entity|Planets|Газовый гигант|Слишком велика.|
|
|
||||||
AsteroidBelt|AB|entity|Planets|Астероиды|Куча камней.|
|
|
||||||
RockyPlanet|RP|entity|Planets|Каменистая планета|Не подходит для жизни.|
|
|
||||||
HabitablePlanet|HP|entity|Planets|Обитаемая планета|Имеет потенциал для жизни.|
|
|
||||||
LivingPlanet|LP|entity|Planets|Живая планета|На этой планете есть жизнь!|
|
|
||||||
|Star|||Звезда||
|
|
||||||
|SC|||Звёздное скопление||
|
|
||||||
|GAL|||Галактика||
|
|
||||||
AboutTheGame||help||Об игре|В этой игре вы можете <b>создать вселенную</b> и управлять её развитием. Конечную цель вы определяете для себя самостоятельно. Попробуйте получить те достижения, которые вам понравятся. Читайте подсказки, исследуйте возможности и не бойтесь экспериментировать. Всегда можно начать всё заново.<br><br>Числа больше 1 000 записаны <b>экспоненциально</b>. 1e4 — это 10 000, то есть «единица, у которой 4 нуля». 1е6 — миллион, 1е9 — миллиард и так далее. 13,77е9 — это 13 миллиардов 770 миллионов.<br><br>Игра идёт в реальном времени с изменяемым масштабированием. За одну секунду может пройти год, десять лет, век и так далее. Меняйте скорость течения времени кнопками «−» и «+».|Help/ru/AboutTheGame
|
|
||||||
GameplayBasics||help||Основы игры|Вам доступен большой, но конечный <b>запас энергии</b>, нужной для создания всего вещества во вселенной и самого её пространства. В начале подавляющая часть этой энергии вам напрямую недоступна. Но в ходе игры вы будете забирать всё больше энергии, и чем меньше её останется в запасе, тем сложнее будет брать новую. Нехватка энергии не станет острой проблемой в ближайший миллиард лет или около того: запас действительно очень велик.<br><br>Из энергии с помощью облаков производится вещество в виде <b>водорода</b>. Он тратится на создание новых облаков и звёзд. Звёзды в процессе горения создают <b>пространство</b>, в котором могут быть размещены новые звёзды и облака. Создание пространства также расходует некоторую часть энергии из общего запаса.|Help/ru/GameplayBasics
|
|
||||||
StarsAndStructures||help||Звёзды и структуры|Чем массивнее звезда, тем быстрее она сгорает и больше пространства производит. Самым выгодным вложением водорода на полученное пространство являются самые маленькие звёзды. Но они горят очень долго и медленно производят пространство. Также каждая звезда сама занимает единицу пространства.<br><br>Звёзды и туманности растущей вселенной есть смысл организовывать в галактики и более крупные <b>структуры</b>. В структурах производство пространства звёздами увеличивается.<br><br>Соотношение между веществом и свободным пространством называется <b>плотностью</b>. Вселенная стабильна только в определённом диапазоне плотности. При выходе за его рамки возникают проблемы.|Help/ru/StarsAndStructures
|
|
||||||
LifeAndForces||help||Жизнь и силы|Возле некоторых звёзд возникают <b>планеты</b>, на которых может появиться жизнь. При определённых обстоятельствах жизнь эволюционирует до разумной, а разумная развивается до высокотехнологичной. Далее она пытается освоить вселенную, которую считает своей.<br><br>Многие события во вселенной случаются не всегда, а лишь с некоторой вероятностью. У вас есть доступ к особым <b>силам</b>, с помощью которых вы можете «подкручивать» вероятности интересующих вас событий, влияя на законы природы.|Help/ru/LifeAndForces
|
|
||||||
Achievements||help||Достижения|В ходе игры вам совершенно точно удастся выполнить некоторые <b>достижения</b>. Простые получаются сами собой, а вот над более сложными может понадобиться призадуматься. Можно использовать список достижений в качестве карты подсказок возможных следующих шагов.<br><br>Гнаться за всеми достижениями необязательно. Это ваша вселенная и вы можете делать с ней что угодно. Однако достижение есть достижение, и помимо личной гордости о проделанной работе вы сможете с лёгкостью <b>поделиться</b> им с друзьями!|Help/ru/Achievements
|
|
||||||
Karma||help||Карма|Каждое полученное достижение даёт вам некоторое число <b>кармических очков</b>. При создании новой вселенной вы можете потратить полученные очки на получение небольших бонусов, с помощью которых вам непременно удастся добиться лучших результатов.<br><br>Потраченные кармические очки никуда не деваются: они <b>остаются</b> с вами и вы снова сможете их потратить в следующей вселенной. Скорее всего, к этому моменту их станет ещё больше.|Help/ru/Karma
|
|
||||||
Gauges||help||Индикаторы|На приборной панели расположены <b>индикаторы</b> тех показателей, которые особенно важны для выбранной страницы с объектами.|Help/ru/Gauges
|
|
||||||
EnergyAndDensity||help||Энергия и плотность|<b>Энергия</b> из запаса конвертируется в водород и пространство. Чем ниже доля оставшегося запаса, указанная в середине полоски, тем с меньшей эффективностью работают источники создания ресурсов, такие как облака для водорода и звёзды для пространства.<br>Запас энергии правда очень велик, хоть и не бесконечен.<br><br>Средняя <b>плотность</b> вселенной это отношение общей массы вещества, то есть всех звёзд, облаков и так далее, к пустому пространству. Она растёт вместе с массой и уменьшается с ростом пространства. Если индикатор «ρ» выйдет из «средней зоны» и склонится к одной из крайностей, то последствия могут вас неприятно удивить.|Help/ru/EnergyAndDensity
|
|
||||||
BurnabilityAndExplosiveness||help||Горючесть и взрывчатость|<b>Горючесть</b> показывает текущую скорость горения звёзд. На неё могут влиять плотность вселенной (чем больше, тем выше), действия сверхразвитых цивилизаций и силы игрока.<br><br><b>Взрывчатость</b> показывает текущую вероятность гамма-всплесков и мощность взрыва при любом коллапсе звезды-гиганта. На неё могут влиять плотность вселенной (чем больше, тем ниже), действия сверхразвитых цивилизаций и силы игрока.|Help/ru/BurnabilityAndExplosiveness
|
|
||||||
AggressionAndTrends||help||Агрессия и тенденции|<b>Агрессия</b> показывает интенсивность конкурентной борьбы между видами, цивилизациями и их внутренними фракциями. Она влияет на развитие и стабильность жизни и обществ. Изменяется под воздействием вселенских тенденций и сил игрока.<br>По умолчанию показывается средняя вселенская агрессия. Но можно выделить какой-либо цивилизационный уровень и увидеть среднюю агрессию именно для этого уровня.<br><br><b>Тенденциями</b> называются результаты долговременных действий цивилизаций. Всего их пять.|Help/ru/AggressionAndTrends
|
|
||||||
SpaceAndHydrogen||help||Пространство и водород|Большинство созидательных действий требует траты ресурсов.<br><br><b>Пространство</b> нужно для размещения всего того, что вы создаёте. Для создания нового пространства зажигайте звёзды! Также не забывайте объединять созданные звёзды в структуры, чтобы получать ещё больше пространства.<br><br><b>Водород</b> требуется для создания туманностей и звёзд. Туманности позволяют получать больше водорода. Звёзды создают пространство и используются для базирования планет. Эти объекты также служат кирпичиками для возведения сложных структур.|Help/ru/SpaceAndHydrogen
|
|
||||||
HeliumAndMetals||help||Гелий и металлы|Гелий и металлы остаются, когда звёзды завершают своё существование.<br><b>Гелий</b> не особенно полезен, но от него никуда не деться. Он расходуется автоматически, по возможности замещая водород, экономя более полезный ресурс.<br><br><b>Металлы</b> «загрязняют» ваш запас водорода и гелия более тяжёлыми элементами. Это хорошо, поскольку высокая «металличность», отношение металлов к водороду и гелию, увеличивает вероятность возникновения планет у новых звёзд.<br>Металлы добавляются от сгорания звёзд, особенно больших, но общая металличность может уменьшаться, когда вселенная наполняется новыми объектами из чистого водорода и гелия, такими как туманности и звёзды.|Help/ru/HeliumAndMetals
|
|
||||||
Clouds||help||Облака|Облака нужны для создания водорода, из которого впоследствии можно построить вселенную. Из базовых туманностей можно собирать более сложные облачные структуры.<br><br><b>Туманность:</b> самое простое облако.<br><b>Глобула:</b> даёт водород медленнее туманности, но существует дольше, а также занимает меньше места. Используется в создании более крупных облаков.<br><b>Звёздная колыбель:</b> автоматически создаёт звёзды из части выданного водорода.<br><b>Молекулярное облако:</b> большой и долговременный генератор водорода.<br><b>Активная звёздная колыбель:</b> очень большой автоматический генератор водорода и звёзд.|Help/ru/Clouds
|
|
||||||
DwarfStars||help||Звёзды-карлики|Звёзды-карлики дёшевы, существуют долго и производят пространство эффективно. У них бывают планеты, на которых впоследствии может развиться жизнь.<br><br><b>Бурый карлик:</b> брак, бесполезный побочный эффект от создания звёзд. Они возникают сами и не занимают пространство в отличие от остальных звёзд. Производить их специально нельзя, да и не нужно.<br><b>Красный карлик:</b> экономически выгоден для производства пространства, но работает очень медленно.<br><b>Оранжевый карлик:</b> идеален для развития жизни.<br><b>Жёлтый карлик:</b> подходит для возникновения жизни.<br><b>Бело-жёлтый карлик:</b> имеет самую большую зону обитания, но быстро выгорает.|Help/ru/DwarfStars
|
|
||||||
GiantStars||help||Звёзды-гиганты|Звёзды-гиганты быстро сгорают и производят много пространства. Коллапс в конце существования повреждает планеты у соседних звёзд, но производит металлы.<br><br><b>Красный гигант:</b> деградирующая звезда на закате существования.<br><b>Жёлтый гигант:</b> малая звезда-гигант. Производит много металлов, коллапс слаб.<br><b>Голубой гигант:</b> обычная звезда-гигант. Производит пространство и металлы. Средний коллапс.<br><b>Сверхгигант:</b> огромная звезда-гигант. Живёт недолго, производит множество пространства и немного металлов.<br><b>Гипергигант:</b> экстремальная звезда-гигант. Всегда коллапсирует в чёрную дыру, выделяя множество пространства с сумасшедшими разрушениями.|Help/ru/GiantStars
|
|
||||||
DegenerateObjects||help||Вырожденные объекты|Звёзды, выработавшие своё термоядерное топливо. Они занимают пространство и ничего не производят, но из них можно собирать структуры.<br><br><b>Белый карлик:</b> остаток сгоревшего карлика.<br><b>Нейтронная звезда:</b> исключительно компактный остаток звезды-гиганта.<br><b>Магнетар:</b> самый плотный объект, не являющийся чёрной дырой.<br><b>Чёрная дыра:</b> остаток огромной звезды, прошедшей разрушительный коллапс. Их можно объединять в сверхмассивные чёрные дыры.<br><b>Сверхмассивная чёрная дыра:</b> результат слияния множества чёрных дыр звёздной массы. Необходимы для создания галактик. Растут самостоятельно за счёт прочих звёзд, хотя и очень медленно.|Help/ru/DegenerateObjects
|
|
||||||
StarClusters||help||Звёздные скопления|Звёздные скопления являются самыми скромными из структур. Это некоторое количество звёзд, расположенных близко друг к другу и связанных гравитационно. Подобные комки вносят разнообразие в однородный вселенский ландшафт.<br><br><b>Рассеянное:</b> небольшая структура неправильной формы.<br><b>Малое:</b> имеет шарообразную форму.<br><b>Среднее:</b> заметно издалека.<br><b>Большое:</b> производит впечатление.<br><b>Гигантское:</b> вызывает трепет.<br><br>Звёзды в структурах ведут себя как обычно, но получают бонус к производству пространства. Со временем скопления рассыпаются, высвобождая звёзды. Крупные скопления существуют дольше, чем мелкие, и дают больший бонус пространства.|Help/ru/StarClusters
|
|
||||||
Galaxies||help||Галактики|<b>Эллиптические галактики</b> имеют линзовидную форму и вращаются медленно. Звёзды в них производят больше пространства, чем в спиральных галактиках. Постепенно эллиптические галактики рассыпаются на отдельные звёзды.<br><br><b>Спиральные галактики</b> имеют неоднородную структуру с рукавами и поддерживают активное звездообразование. Они лучше подходят для зарождения и развития жизни. Со временем в спиральных галактиках заканчивается запас газа, они замедляются и превращаются в более стабильные и скучные эллиптические.<br><br>Звёзды, вошедшие в состав галактик, продолжают функционировать как обычно. Они производят пространство, а у карликов могут быть планеты.|Help/ru/Galaxies
|
|
||||||
LargeStructures||help||Большие структуры|<b>Большие структуры</b> не зря так называются: в качестве строительных кирпичиков в них используются целые галактики. Они нужны для организации вселенной на самых больших масштабах. Без них пространство, равномерно заполненное звёздами и галактиками, оказывается слишком однообразным и разреженным, тогда как они создают градиент заполнения с более и менее плотными областями, более подходящий для освоения сверхразвитыми разумными существами.<br><br>Со временем большие структуры рассыпаются на составляющие, но это происходит очень нескоро.|Help/ru/LargeStructures
|
|
||||||
Planets||help||Планеты|Планеты возникают у звёзд-карликов при наличии металлов. В некотором смысле всё это космическое строительство проводится ради тех планет, у которых есть потенциал для зарождения жизни.<br><br><b>Газовый гигант:</b> большая планета с чрезвычайно плотной атмосферой, непригодная для жизни.<br><b>Пояс астероидов:</b> куча камней недостаточной массы, чтобы собраться в планету.<br><b>Каменистая планета:</b> непригодная для жизни планета. Слишком холодно, жарко или не тот химический состав.<br><b>Обитаемая планета:</b> здесь есть жидкая вода и в перспективе может образоваться жизнь.<br><b>Живая планета:</b> обитатели этой планеты подают большие надежды!|Help/ru/Planets
|
|
||||||
Eons||help||Эоны|Жизнь медленно эволюционирует через эоны от самой примитивной до способной к появлению разума. Не всем планетам удаётся довести этот процесс до победного конца, потому что звёзды горят не вечно.<br><br><b>Архей:</b> не сразу бросается в глаза, но на таких планетах полно археев и цианобактерий.<br><b>Палеозой:</b> помимо вездесущих амёб, здесь присутствуют водоросли, губки и даже моллюски.<br><b>Протерозой:</b> папоротники, черви, трилобиты и рыбы.<br><b>Мезозой:</b> голосеменные, ящеры, динозавры и терапсиды.<br><b>Кайнозой:</b> покрытосеменные и разнообразные млекопитающие, некоторые из которых проявляют признаки интеллекта.|Help/ru/Eons
|
|
||||||
Type0Civilizations||help||Цивилизации типа 0|Докосмическая эпоха — от племени до федерации.<br><br><b>ц0.0:</b> нижний палеолит. Приручение огня, каменные орудия.<br><b>ц0.1:</b> средний палеолит. Развитые каменные орудия.<br><b>ц0.2:</b> верхний палеолит. Сложные каменные орудия, искусство.<br><b>ц0.3:</b> мезолит. Лук и стрелы, рыболовство, лодки.<br><b>ц0.4:</b> ранний неолит. Земледелие.<br><b>ц0.5:</b> средний неолит. Скотоводство, керамика.<br><b>ц0.6:</b> поздний неолит. Крупные поселения.<br><b>ц0.7:</b> первые царства медного и бронзового века. Колесо.<br><b>ц0.8:</b> античные империи железного века. Философия.<br><b>ц0.9:</b> промышленная эпоха. Электричество.|Help/ru/Type0Civilizations
|
|
||||||
Type1Civilizations||help||Цивилизации типа 1|Цивилизации, заселяющие родную солнечную систему.<br><br><b>ц1.0:</b> цивилизация, освоившая родную планету. Сверхпроводимость, термоядерный синтез.<br><b>ц1.1:</b> научные базы в родной системе. Пусковая петля, космический лифт.<br><b>ц1.2:</b> полное управление генетикой. Киборгизация.<br><b>ц1.3:</b> промышленная добыча астероидов. Поселения в родной системе.<br><b>ц1.4:</b> сбор вещества из атмосфер газовых гигантов.<br><b>ц1.5:</b> космические города. Пикотехнологии.<br><b>ц1.6:</b> промышленное антивещество. Первые звездолёты.<br><b>ц1.7:</b> терраформинг. Гамма-лазеры.<br><b>ц1.8:</b> космические станции континентального масштаба.<br><b>ц1.9:</b> частичный рой Дайсона.|Help/ru/Type1Civilizations
|
|
||||||
Type2Civilizations||help||Цивилизации типа 2|Цивилизации, ведущие экспансию к иным звёздам.<br><br><b>ц2.0:</b> цивилизация, освоившая энергию родного солнца.<br><b>ц2.1:</b> изменение планетарных орбит.<br><b>ц2.2:</b> управление инерцией.<br><b>ц2.3:</b> сбор вещества со звёзд.<br><b>ц2.4:</b> фемтотехнологии: управление отдельными фермионами.<br><b>ц2.5:</b> деконструкция и сборка планет.<br><b>ц2.6:</b> окончательное переселение с планет в космос.<br><b>ц2.7:</b> освоение ресурсов звёзд-гигантов.<br><b>ц2.8:</b> управление гравитацией.<br><b>ц2.9:</b> перемещение звёзд.|Help/ru/Type2Civilizations
|
|
||||||
Type3Civilizations||help||Цивилизации типа 3|Цивилизации галактического масштаба.<br><br><b>ц3.0:</b> возможна экспансия в группу галактик.<br><b>ц3.1:</b> создание звёзд.<br><b>ц3.2:</b> использование белых карликов.<br><b>ц3.3:</b> создание чёрных дыр из концентрированного излучения.<br><b>ц3.4:</b> возможна экспансия в сверхскопление.<br><b>ц3.5:</b> использование нейтронных звёзд.<br><b>ц3.6:</b> возможна экспансия в галактическую нить.<br><b>ц3.7:</b> использование магнетаров.<br><b>ц3.8:</b> возможна экспансия в великую стену.<br><b>ц3.9:</b> использование чёрных дыр.|Help/ru/Type3Civilizations
|
|
||||||
Type4Civilizations||help||Цивилизации типа 4|Цивилизации вселенского масштаба.<br><br><b>ц4.0:</b> манипуляции со временем.<br><b>ц4.1:</b> возможна экспансия на масштабы всей вселенной.<br><b>ц4.2:</b> использование сверхмассивных чёрных дыр.<br><b>ц4.3:</b> складное пространство.<br><b>ц4.4:</b> поле невероятности.<br><br>И так далее, всё больше и больше, пока есть место.|Help/ru/Type4Civilizations
|
|
||||||
|
@@ -1,38 +0,0 @@
|
|||||||
Version|Content:en|Content:ru
|
|
||||||
0.6.12.128|Unlock|Раблокироровка
|
|
||||||
0.5.1|Minor fixes|Незначительные правки
|
|
||||||
0.5.0|WooHoo! Public release|Ура! Публичный релиз
|
|
||||||
0.4.8|Ads double forces|Реклама удваивает силы
|
|
||||||
0.4.7|Forces rebalanced|Силы перебалансированы
|
|
||||||
0.4.6|Additional forces|Ещё силы
|
|
||||||
0.4.5|Forces appeared in the game|В игре появились силы
|
|
||||||
0.4.4|Trends got a proper description, wipe button wipes wipely|Теперь у трендов есть описание, а кнопка стирания стирает стирательно
|
|
||||||
0.4.3|Massive changes. Trends, Lootboxes|Множественные изменения. Тренды, лутбоксы
|
|
||||||
0.4.2|UI updated Small bugs fixed|Обновления интерфейса и исправление мелких ошибок
|
|
||||||
0.4.1|They are going to talk to you|Они собираются общаться с тобой
|
|
||||||
0.4.0|Life and civilization were rebalanced|Жизнь и цивилизация были сбалансированы
|
|
||||||
0.3.33|High-level civilizations shenanigans|Выкрутасы высокоуровневых цивилизаций
|
|
||||||
0.3.32|Life: Fix habitats check for civs that require multiple objects|Фиксы для хабитатов цив
|
|
||||||
0.3.31|Life processes are more coherent now|Внутренние процессы жизни теперь более согласованы
|
|
||||||
0.3.30|Some bugs were fixed|Некоторые фиксы
|
|
||||||
0.3.29|Warriors are less aggressive now|Воины теперь менее агрессивны
|
|
||||||
0.3.28|Indicators are more interactive now|Индикаторы теперь более интерактивны
|
|
||||||
0.3.27|Apocalypse is not just a border now|Апокалипс теперь не просто рамка
|
|
||||||
0.3.26|Star distribution added to Report screen|На экран отчета добавлено распределение звезд.
|
|
||||||
0.3.25|Star wars, cleanup & diplomacy|Звездные войны. зачистка и дипломатия
|
|
||||||
0.3.24|Blast space fixed|Поправлено пространство от бласта
|
|
||||||
0.3.23|Other adjustments|Прочие правки
|
|
||||||
0.3.22|Civ Ethics distribution adjusted|Скорректировано распределение этик
|
|
||||||
0.3.21|Civ Ethics added|Добавлены этики цивилизаций
|
|
||||||
0.3.20|Lovely ethic buttons appeared|Появились красивые кнопки этик
|
|
||||||
0.3.20|Fix for wide screens|Корректное размещение на широких экранах
|
|
||||||
0.3.20|Low opacity of inactive actions|Затемнение неактивных действий
|
|
||||||
0.3.19|Background parallax added|Добавлен параллакс фона
|
|
||||||
0.3.18|Light moved to HSV model|Свет изменен на HSV модель
|
|
||||||
0.3.17|Swipe fixed|Поправлен свайп
|
|
||||||
0.3.16|Civ evolution tuned up|Эволюция цивилизаций улучшена
|
|
||||||
0.3.15|UI small fixes and adjustements|Небольшие правки интерфейса
|
|
||||||
0.3.14|Low level life forced to exist|Низкоуровневая жизнь вынуждена существовать
|
|
||||||
0.3.13|Tutorial updated|Обучение дополнено
|
|
||||||
0.3.12|Some miserable civilizations are going to be lobotomized|Некоторые незначительные цивилизации будут лоботомизированы
|
|
||||||
0.3.11|Change Log added|Добавлен журнал изменений
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
id|span|progress|degradation|next|fall
|
|
||||||
HP|5E+06|0.00025|0.0025|EON1|RP:1
|
|
||||||
EON1|1E+07|0.00025|0.0025|EON2|HP:100^RP:1
|
|
||||||
EON2|1E+07|0.00025|0.0025|EON3|EON1:1
|
|
||||||
EON3|1E+06|0.00025|0.0025|EON4|EON2:1000^EON1:1
|
|
||||||
EON4|1E+06|0.00025|0.0025|EON5|EON3:1000^EON1:1
|
|
||||||
EON5|5E+05|0.00025|0.0025|C0.0|EON4:2000^EON1:1
|
|
||||||
C0.0|2E+03|0.0175|0.025|C0.1|EON5:1
|
|
||||||
C0.1|2E+03|0.0175|0.025|C0.2|C0.0:1
|
|
||||||
@@ -1,115 +0,0 @@
|
|||||||
name|label|description|image
|
|
||||||
Hydrogenin|Hydrogenin|Hydrogen production +100%[p]Space production −50%[p]Duration 1e9 years|
|
|
||||||
Temporin|Temporin|Skip 1 billion years[p] [p]|
|
|
||||||
Inflatite|Inflatite|Space production +100%[p]Structures age +10%[p]Duration 1e9 years|
|
|
||||||
Singularite|Singularite|Space consumption by SMBH +1000%[p]Stars consumption by SMBH +100%[p]Duration 1e9 years|
|
|
||||||
Primex|Primex|Helium usage +200%[p]Hydrogen production −50%[p]Duration 1e9 years|
|
|
||||||
Stellarin|Stellarin|Automatization of star production +50%[p] [p]Duration 1e8 years|
|
|
||||||
Renewin|Renewin|[p]Structures age −10%[p]Explosiveness +10%[p]Duration 1e8 years|
|
|
||||||
Infusite|Infusite|Burnability +10%[p]5% of brown dwarfs are infused into other stars[p]Duration 1e8 years|
|
|
||||||
Frostite|Frostite|Explosiveness −10%[p]Burnability −10%[p]Duration 1e8 years|
|
|
||||||
Desintegrex|Desintegrex|Destroys 1% of degenerate objects[p]Causes gamma-ray bursts and antitheistic trends[p]|
|
|
||||||
Rockein|Rockein|Chance of formation for hocky planets +50%, for habitable planets +25%[p]Chance of formation for gas giants -75%[p]Duration 1e7 years|
|
|
||||||
Panspermin|Panspermin|1% of habitable planets become living[p]5% of habitable planets become rocky[p]|
|
|
||||||
Gaianite|Gaianite|5% of rocky planets become habitable[p]Aggression −5%[p]Duration 1e7 years|
|
|
||||||
Darwinite|Darwinite|Progress +25% for all eons[p]Aggression +5%[p]Duration 1e7 years|
|
|
||||||
Edenex|Edenex|Degradation −90% for all eons[p]Progress −50% for all eons, causes spiritual trends[p]Duration 1e7 years|
|
|
||||||
Pacifin|Pacifin|Aggression −10%[p]Drift from bellicosity and to friendliness +5%[p]Duration 1e5 years|
|
|
||||||
Enragein|Enragein|Aggression +10%[p]Drift from friendliness and to bellicosity +5%[p]Duration 1e5 years|
|
|
||||||
Moralite|Moralite|Drift to the chosen ethic +20%[p]Causes antitheistic trends[p]Duration 1e5 years|
|
|
||||||
Discriminite|Discriminite|Progress +25% for the chosen ethic[p]Causes antitheistic trends[p]Duration 1e5 years|
|
|
||||||
Reprex|Reprex|Trends input −90% for the chosen ethic[p]Drift to mysticism and logic +10%[p]Duration 1e5 years|
|
|
||||||
Archean|Archean|It is difficult to notice, but these planets are full of archaea and cyanobacteria.|
|
|
||||||
Proterozoic|Proterozoic|Alongside ubiquitous amoeba these planets host algae, sponges and even molluscs.|
|
|
||||||
Paleozoic|Paleozoic|Ferns, worms, trilobites and fishes.|
|
|
||||||
Mezozoic|Mesozoic|Conifers, lizards, dinosaurs and therapsids.|
|
|
||||||
Cenozoic|Cenozoic|Flowering plants and various mammals, some of which show signs of sapience.|
|
|
||||||
Civ0|Civ0|Pre-space epoch – from a tribe to a federation.|
|
|
||||||
Civ0.0|Civ0.0|Lower Paleolithic. Control of fire, stone tools.|
|
|
||||||
Civ0.1|Civ0.1|Middle Paleolithic. Developed stone tools.|
|
|
||||||
Civ0.2|Civ0.2|Upper Paleolithic. Advanced stone tools, art.|
|
|
||||||
Civ0.3|Civ0.3|Mesolithic. Bow and arrows, fishing, boats.|
|
|
||||||
Civ0.4|Civ0.4|Early Neolithic. Agriculture.|
|
|
||||||
Civ0.5|Civ0.5|Middle Neolithic. Animal husbandry, ceramics.|
|
|
||||||
Civ0.6|Civ0.6|Late Neolithic. Large settlements.|
|
|
||||||
Civ0.7|Civ0.7|First kingdoms of copper and bronze ages. Wheel.|
|
|
||||||
Civ0.8|Civ0.8|Ancient empires of the iron age. Philosophy.|
|
|
||||||
Civ0.9|Civ0.9|Industrial age. Electronics and nuclear energy.|
|
|
||||||
Civ1|Civ1|Civilizations that are busy with mastering their own solar system.|
|
|
||||||
Civ1.0|Civ1.0|Civilization which completely mastered its home planet. Superconductivity, controlled nuclear fusion.|
|
|
||||||
Civ1.1|Civ1.1|Science is based on other bodies of the home system. Launch loop, space elevator.|
|
|
||||||
Civ1.2|Civ1.2|Complete genetic tailoring. Cyborgization.|
|
|
||||||
Civ1.3|Civ1.3|Industrial asteroid mining. Colonies on other planets of the home system.|
|
|
||||||
Civ1.4|Civ1.4|Harvesting of matter from gas giants’ atmosphere.|
|
|
||||||
Civ1.5|Civ1.5|Space cities. Picotechnologies: manipulations on individual atoms.|
|
|
||||||
Civ1.6|Civ1.6|Industrial manufacturing of antimatter. First starships.|
|
|
||||||
Civ1.7|Civ1.7|Terraforming. Gamma-lasers.|
|
|
||||||
Civ1.8|Civ1.8|Space stations of continental scale.|
|
|
||||||
Civ1.9|Civ1.9|Partial Dyson swarm.|
|
|
||||||
Civ2|Civ2|Civilizations that can expand to other stars.|
|
|
||||||
Civ2.0|Civ2.0|Civilization that completely exploits the energy output of its own sun.[p]About 1 star is settled (handful).|
|
|
||||||
Civ2.1|Civ2.1|Change of planetary orbits.[p]About 10 stars are settled (tens).|
|
|
||||||
Civ2.2|Civ2.2|Control over inertia.[p]About 100 stars are settled (hundreds).|
|
|
||||||
Civ2.3|Civ2.3|Starlifting, harvesting matter from stars.[p]About 1000 stars are settled (thousands), this is on the scale of a scattered star cluster.|
|
|
||||||
Civ2.4|Civ2.4|Femtotechnologies: manipulations on individual fermions.[p]About e4 stars are settled (tens of thousands), this is on the scale of a small star cluster.|
|
|
||||||
Civ2.5|Civ2.5|Deconstruction and creation of planets.[p]About e5 stars are settled (hundreds of thousands), this is on the scale of a medium star cluster.|
|
|
||||||
Civ2.6|Civ2.6|Complete domination of astroarchitecture over planets.[p]About e6 stars are settled (millions), this is on the scale of a large star cluster.|
|
|
||||||
Civ2.7|Civ2.7|Giant stars resources exploitation.[p]About e7 stars are settled (tens of millions), this is on the scale of a giant star cluster.|
|
|
||||||
Civ2.8|Civ2.8|Control over gravity.[p]About e8 stars are settled (hundreds of millions).|
|
|
||||||
Civ2.9|Civ2.9|Movement of stars.[p]About e9 stars are settled (billions), this is on a scale of a dwarf galaxy such as the Small Magellanic Cloud.|
|
|
||||||
Civ3|Civ3|Civilizations of galactic scale.|
|
|
||||||
Civ3.0|Civ3.0|Expansion into a galactic group is available.[p]About e10 stars are settled (tens of billions), this is on a scale of a small galaxy such as the Large Magellanic Cloud.|
|
|
||||||
Civ3.1|Civ3.1|Creation of stars.[p]About e11 stars are settled (hundreds of billions), this is on a scale of a medium galaxy such as the Milky Way.|
|
|
||||||
Civ3.2|Civ3.2|Utilization of white dwarfs.[p]About e12 stars are settled (trillions), this is on a scale of a large galaxy such as Andromeda Galaxy.|
|
|
||||||
Civ3.3|Civ3.3|Creation of black holes by focused radiation.[p]About e13 stars are settled (tens of trillions), this is on a scale of a giant galaxy such as IC 1101.|
|
|
||||||
Civ3.4|Civ3.4|Expansion into a galactic supercluster is available.[p]About e14 stars are settled (hundreds of trillions) or e1 galaxies (tens).|
|
|
||||||
Civ3.5|Civ3.5|Utilization of neutron stars.[p]About e15 stars are settled (quadrillions) or e2 galaxies (hundreds).|
|
|
||||||
Civ3.6|Civ3.6|Expansion into a galactic filament is available.[p]About e16 stars are settled (tens of quadrillions) or e3 galaxies (thousands).|
|
|
||||||
Civ3.7|Civ3.7|Utilization of magnetars.[p]About e17 stars are settled (hundreds of quadrillions) or e4 galaxies (tens of thousands).|
|
|
||||||
Civ3.8|Civ3.8|Expansion into a great wall is available.[p]About e18 stars are settled (quintillions) or e5 galaxies (hundreds of thousands).|
|
|
||||||
Civ3.9|Civ3.9|Utilization of black holes.[p]About e19 stars are settled (tens of quintillions) or e6 galaxies (millions).|
|
|
||||||
Civ4|Civ4|Civilizations of the universe scale.|
|
|
||||||
Civ4.0|Civ4.0|Temporal manipulations.[p]About e20 stars are settled (hundreds of quintillions) or e7 galaxies (tens of millions).|
|
|
||||||
Civ4.1|Civ4.1|Expansion into the whole universe scale is available.[p]About e21 stars are settled (sextillions) or e8 galaxies (hundreds of millions).|
|
|
||||||
Civ4.2|Civ4.2|Utilization of supermassive black holes.[p]About e22 stars are settled (tens of sextillions) or e9 galaxies (billions).|
|
|
||||||
Civ4.3|Civ4.3|Folding space.[p]About e23 stars are settled (hundreds of sextillions) or e10 galaxies (tens of billions).|
|
|
||||||
Civ4.4|Civ4.4|Improbability field.[p]About e24 stars are settled (septillions) or e11 galaxies (hundreds of billions).|
|
|
||||||
Civ4.5|Civ4.5|About e25 stars are settled (tens of septillions) or e12 galaxies (trillions).|
|
|
||||||
Civ4.6|Civ4.6|About e26 stars are settled (hundreds of septillions) or e13 galaxies (tens of trillions).|
|
|
||||||
Civ4.7|Civ4.7|About e27 stars are settled (octillions) or e14 galaxies (hundreds of trillions).|
|
|
||||||
Civ4.8|Civ4.8|About e28 stars are settled (tens of octillions) or e15 galaxies (quadrillions).|
|
|
||||||
Civ4.9|Civ4.9|About e29 stars are settled (hundreds of octillions) or e16 galaxies (tens of quadrillions).|
|
|
||||||
AboutTheGame|About The Game|In this game you can [b]create a universe[/b] and control its development. The final goal can be designated by yourself. Don't forget to check out the list of game achievements and try to reach some of the ones that seem interesting. Read hints, explore possibilities and don't be afraid to experiment. In the worst case you can always start from scratch.[p] [p]Numbers greater than 1 000 are displayed using [b]scientific notation[/b]. 1e4 – this is a 10 000, meaning “one with 4 zeroes”. 1e6 – a million, 1e9 – a billion and so on. 13.77e9 – this is 13 billions 770 millions.[p] [p]The game plays in [b]real time[/b] with changeable scaling. One second of real time can pass a year, a decade, a century and so on. Change the pace of time by using buttons “−” and “+”.|GameHelp/en/AboutTheGame
|
|
||||||
GameplayBasics|Gameplay Basics|You have access to a very large, but still limited [b]cache of energy[/b] that is used to create the whole matter in the universe and the expanse of the universe's space itself. At the start of the game the vast majority of this energy is not in your direct control. But during the game you will take more and more energy from the cache. The less filled the cache is, the harder it is to obtain new energy. The energy shortage won’t become an urgent problem in the first billion years or so: the cache is really very large.[p] [p]The matter is harvested from the energy cache in the form of [b]hydrogen[/b] by clouds. Hydrogen may be spent to create new clouds and also to create stars. During their burning stars create [b]space[/b] that can be used to place additional stars and clouds. This creation of space also spends some energy from the cache.|GameHelp/en/GameplayBasics
|
|
||||||
StarsAndStructures|Stars and Structures|The heavier the star is, the faster it burns and the more space it produces. However, on the contrary, the most cost-efficient way of spending hydrogen to obtain new space, is investment into the smallest stars. Unfortunately they burn for a very long time and produce space very slowly. Also each star takes a unit of space, no matter which type the star is.[p] [p]There is a reason to arrange stars and nebulae of the growing universe into galaxies and even larger [b]structures[/b]. Objects that became parts of such structures keep functioning as usual.[p] [p]The proportion between universe matter and space is called density. The universe is only stable when the [b]density[/b] is inside a certain range. If it is too packed or too empty, problems come into being.|GameHelp/en/StarsAndStructures
|
|
||||||
LifeAndForces|Life and Forces|[b]Planets[/b] form around certain stars, and life may emerge there. In specific circumstances life can evolve to sapience, and sapience can advance to high technology. Life's next step is to try to reclaim the universe, which she assumes as her own.[p] [p]There are many events in the universe that don't happen all the time, only with certain probability. You have access to special [b]forces[/b], which you can use to “tweak” chances of events that are important to you, changing the laws of nature in the process.|GameHelp/en/LifeAndForces
|
|
||||||
Achievements|Achievements|During the gameplay you will definitely be able to reach certain [b]achievements[/b]. While simpler ones come by themselves, ones that are more complex may be more tricky. You can use the achievements list as a roadmap of hints and suggestions for possible next steps.[p] [p]It is unnecessary to try to finish each and every achievement. This is your own universe and you can do whatever you like with it. However, achievements are a nice thing in general, and besides just having a personal feeling of pride and accomplishment you can easily [b]share[/b] it with friends!|GameHelp/en/Achievements
|
|
||||||
Karma|Karma|Each obtained achievement grants you a certain number of [b]karmic points[/b]. During the new universe creation you may spend these points to gain some small bonuses that will definitely help you to gain better results.[p] [p]Spent karmic points are not lost: they will be [b]available[/b] for spending again in the next universe. There is a chance that there will be even more of them at that moment.|GameHelp/en/Karma
|
|
||||||
GaugesAndEnergy|Gauges and Energy|[b]Gauges[/b] of measures that are especially important for an active objects page are located on the dashboard. To check other gauges just swipe the page.[p] [p][b]Energy cache[/b] or “ε”. Any creation of primary resources, meaning hydrogen and space, spends some energy. The lower the proportion of remaining cache, indicated in the middle of the bar, the lower is the efficiency of resource generators, such as clouds for hydrogen and stars for space.[p]The energy cache really is immense, however it is not infinite.|GameHelp/en/GaugesAndEnergy
|
|
||||||
DensityAndBurnability|Density and Burnability|Average [b]density[/b] of the universe is the ratio of total matter mass, meaning all stars, clouds and so on, to the empty space. It increases alongside the mass and decreases when the space grows. If the “ρ” gauge will leave the “middle zone” and become inclined to any of the two extremeties, then the outcome might surprise you in a bad way.[p] [p][b]Burnability[/b] displays the current burning rate of stars. It can be influenced by universe density (the denser the greater), actions of superadvanced civilizations and forces used by the player.|GameHelp/en/DensityAndBurnability
|
|
||||||
ExplosivenessAndAggression|Explosiveness and Aggression|[b]Explosiveness[/b] displays the current probability of gamma-ray bursts and the yield of any star collapse explosion. It can be influenced by universe density (the denser the lower), actions of superadvanced civilizations and forces used by the player.[p] [p][b]Aggression[/b] displays the intensity of competition between species, civilizations and their inner factions. It governs the progress and stability of life and societies. It can be influenced by universal trends and forces used by the player.[p]By default the average universal aggression is shown. But you can select any civilization level and observe the average aggression for this level, which can be different from the universal one.|GameHelp/en/ExplosivenessAndAggression
|
|
||||||
Trends|Trends|[b]Trends[/b] are global goals of universal development that civilizations are inclined to. Aggregation of the actions of multitudes of highly advanced sapients manifests as a certain trend. When it becomes large enough, it influences the universe as a whole.[p]There are five trends: spirituality, antitheism, integration, xenocide and mastery.|GameHelp/en/Trends
|
|
||||||
SpiritualityAndAntitheism|Spirituality and Antitheism|[b]Spirituality[/b] is understanding and acceptance of a higher will. It is not a secret that a higher power objectively exists in this universe, and enlightened beings are eager to follow it. They are very useful, because their reason for existence is to serve the player. However this behavior of theirs can be felt as being annoyingly clinging.[p] [p][b]Antitheism[/b] is the opposition of the people's will against the higher will. It can lead to an active conflict of sapient beings, inhabiting the universe, to the wishes of the player. In a manner antitheism might be perceived as something undesired. However, if a player is interested in nurturing self-sufficient beings who do not require any support of higher powers, then perhaps this “teenage angst” of your wards is not bad at all.|GameHelp/en/SpiritualityAndAntitheism
|
|
||||||
IntegrationAndXenocide|Integration and Xenocide|[b]Integration[/b] is peaceful coexistence and unification of various life forms. It leads to a peaceful and harmonious life without conflicts and warfare. This utopia is great in every measure except lowered motivations to progress. A well integrated international society is not afraid of anything and has no real ambitions, because all mundane problems are already solved.[p] [p][b]Xenocide[/b] is a policy of seeking the final solution to the “us or them” question. Denizens of this universe do not trust each other, constantly expecting for a backstab. They argue that if a war is inevitable, then it is better to strike first to get an advantage. The universe is too small for several higher life forms, so in the end there can be only one, the most perfect and advanced of all. Let the strongest prevail!|GameHelp/en/IntegrationAndXenocide
|
|
||||||
Mastery|Mastery|[b]Mastery[/b] is a rearrangement of the universe for the needs of a civilization. Denizens assume themselves as a peak of evolution, and the universe is supposed to be their habitable space, which has to be reclaimed. They obey the laws of economics and follow their desires, not thinking about distant consequences. Nobody cares what happensafter billions of years, if it is possible to enrich living conditions right now. And descendants won’t be fools anyway, that’s their problem and they can manage it.|GameHelp/en/Mastery
|
|
||||||
Forces|Forces|[b]Forces[/b] are special powers available to the player. They globally influence the laws of nature that govern your universe. Each day you obtain a new random assortment of powers. Forces are not transfered between games, so there is no point in hoarding them.[p]There are 20 different forces. Ones with green border are common, blue are rare and purple are extra rare, but very powerful. The majority of the forces have innate duration, but there are some that just work instantly and that's it. Forces are detailed on the following help pages.|GameHelp/en/Forces
|
|
||||||
UniverseForces|Universe Forces|These forces have duration of 1e9 years.[p][b]Hydrogenin[/b] increases the production of hydrogen and decreases the production of space. It is useful the space is plentiful.[p][b]Temporin[/b] allows you to skip 1 billion of years. This power is great when everything works as planned.[p][b]Inflatite[/b] boosts the production of space, but makes structures less stable. You can always create new ones.[p][b]Singularite[/b] makes your supermassive black holes significantly more active. They even consume the space itself, condensing the universe.[p][b]Primex[/b] allows you to use significantly larger portion of helium in creation of new stars and clouds. However, your hydrogen production decreases.|GameHelp/en/UniverseForces
|
|
||||||
StellarForces|Stellar Forces|These forces have duration of 1e8 years.[p][b]Stellarin[/b] dedicates more hydrogen, produced by stellar nurseries, to automatic making of new stars. However you'll get less hydrogen into your budget.[p][b]Renewin[/b] makes structures more stable for the price of making stars more explosive.[p][b]Infusite[/b] infuses stars with these useless brown dwarfs, which increases their burnability and, occasionally, grows them up.[p][b]Frostite[/b] lowers both burnability and explosiveness of stars. Sometimes the universe needs some chill.[p][b]Desintegrex[/b] breaks some degenerate objects with catastrophical results. It provides you with more metals, but sapient denizens of the universe probably won't like such blatant display of destructive power.|GameHelp/en/StellarForces
|
|
||||||
PlanetaryForces|Planetary Forces|These forces have duration of 1e7 years.[p][b]Rockein[/b] increases chances of forming rocky and even habitable planets instead of gas giants.[p][b]Panspermin[/b] instantly fills some habitable planets with life, but unfortunately it also reverts other habitable planets into rocky ones.[p][b]Gaianite[/b] converts some rocky planets into habitable ones and also decreases aggression.[p][b]Darwinite[/b] increases progress of evolution for all eons and also increases aggression. Survival of the fittest, you know.[p][b]Edenex[/b] greatly decreases degradation chance for all eons, but also significantly lowers the evolution progress, because everything becomes too good to require adaptation. It also boosts the spirituality trend.|GameHelp/en/PlanetaryForces
|
|
||||||
CivilizationForces|Civilization Forces|These forces have duration of 1e5 years.[p][b]Pacifin[/b] lowers the aggression. Also it increases drift from bellicosity and to friendliness.[p][b]Enragein[/b] raises the aggression. Also it increases drift from friendliness and to bellicosity.[p][b]Moralite[/b] increases drift to a chosen ethic and causes anitheistic trends, because sapients don't like being told what to do.[p][b]Discriminite[/b] increases progress of advancement for the chosen ethic and causes antitheistic trends, because sapients don't like when you play favorites.[p][b]Reprex[/b] greatly decreases trends input for the chosen ethic. It also causes drift both to mysticism and logic, because sapients try to search answers in different places.|GameHelp/en/CivilizationForces
|
|
||||||
SpaceAndHydrogen|Space and Hydrogen|The majority of creative actions require spending [b]resources[/b].[p] [p][b]Space[/b] is needed to place everything you are creating. To add new space lit up some stars![p] [p][b]Hydrogen[/b] is required to create nebulae and stars. Nebulae allow you to obtain more hydrogen. Stars are used to make more space and also to harbor planets. Both of these object types also serve as building blocks to create more complex structures.|GameHelp/en/SpaceAndHydrogen
|
|
||||||
HeliumAndMetals|Helium and Metals|Helium and metals are obtained when stars finish their life cycle.[p][b]Helium[/b] is not especially useful, but it is inescapable. It is automatically spent in a line of hydrogen if possible, conserving the more valuable resource.[p] [p][b]Metals[/b] “contaminate” your hydrogen and helium by heavier elements. And usually it is a good thing, because the high proportion of metals to hydrogen and helium, also known as “metallicity”, provides for a greater chance for planets to emerge near new stars.[p]Metals are added when stars burn out, especially larger ones. But total metellicity may shrink down when the universe is filled by new objects made from pure hydrogen and helium, such as nebulae and stars.|GameHelp/en/HeliumAndMetals
|
|
||||||
Clouds|Clouds|Clouds are used to produce hydrogen, which is required to construct the universe. Simplest nebulae can be arranged into more complex cloud structures.[p] [p][b]Nebula:[/b] the simplest of clouds.[p][b]Globula:[/b] provides hydrogen at a slower rate than nebulae, but persists for longer, and also takes less space. Used in creation of larger clouds.[p][b]Star nursery:[/b] automatically creates stars from a fraction of provided hydrogen.[p][b]Molecular cloud:[/b] large and long-lasting hydrogen generator.[p][b]Active star nursery:[/b] very large automatic hydrogen and stars generator.|GameHelp/en/Clouds
|
|
||||||
DwarfStars|Dwarf Stars|Dwarf stars are cheap, they last for a long time and produce space efficiently. They can have planets that sometimes may harbor life at some point.[p] [p][b]Brown dwarf:[/b] useless rejects that happen during the star creation process. They appear by themselves and do not take space as opposed to all the other stars. Can’t be created manually, and you don’t need to.[p][b]Red dwarf:[/b] It is cost-effective in space creation, but works very slowly.[p][b]Orange dwarf:[/b] perfect for the development of life.[p][b]Yellow dwarf:[/b] good for the emergence of life.[p][b]White-yellow dwarf:[/b] has a largest habitable zone, but burns out rapidly.|GameHelp/en/DwarfStars
|
|
||||||
GiantStars|Giant Stars|Giant stars are expensive, burn rapidly and produce a lot of space. At the end of their existence they collapse and explode. These events can damage planets at nearby stars, but they produce metals.[p] [p][b]Red giant:[/b] a star that has consumed the majority of its fuel. You can’t create these manually, they emerge themselves.[p][b]Yellow giant:[/b] the most modest of giant stars. The collapse is comparatively weak.[p][b]Blue giant:[/b] a common giant star. The collapse creates a lot of space.[p][b]Supergiant:[/b] huge giant star. Burns fast, the collapse is powerful.[p][b]Hypergiant:[/b] extremely giant star. Always collapses into a black hole.|GameHelp/en/GiantStars
|
|
||||||
DegenerateObjects|Degenerate Objects|Stars that have exhausted their fusion fuel. They occupy space and do not produce anything, but can be used in forming structures.[p] [p][b]White dwarf:[/b] the remains of a dwarf star.[p][b]Neutron star:[/b] exceptionally compact remains of a giant star.[p][b]Magnetar:[/b] the most dense object that is not a black hole.[p][b]Black hole:[/b] the remains of a giant star that experienced a destructive collapse. They may be merged into supermassive black holes.[p][b]Supermassive black hole:[/b] the result of multitudes of the stellar mass black holes merged into one. Required for galactic formation. They do grow in time, consuming other stars, but do so very slowly.|GameHelp/en/DegenerateObjects
|
|
||||||
StarClusters|Star Clusters|Star clusters are the most modest of available structures. As a matter of fact these are just certain numbers of stars which are co-located closer to each other than usual, and therefore they are gravitationally bound. But even such simple lumps already bring noticeable variety into the homogenous landscape of the universe.[p] [p][b]Scattered:[/b] little structure of irregular shape.[p][b]Small:[/b] globular shape.[p][b]Medium:[/b] noticeable from afar off.[p][b]Large:[/b] makes an impression.[p][b]Giant:[/b] causes awe.|GameHelp/en/StarClusters
|
|
||||||
Galaxies|Galaxies|[b]Elliptical galaxies[/b] resemble colossal star clusters. They have lenticular shapes, rotate slowly and look very much alike to each other. Star formation is almost completely absent there, so if no life emerged in such a galaxy during the first couple of billion years, then it probably won’t emerge later.[p] [p][b]Spiral galaxies[/b] spin faster than elliptical ones, they have diverse structures with arms and keep active star formation. They are better fit for the emergence and development of life. In time spiral galaxies exhaust their storage of free gas, they slow down and become more stable and boring ellipticals.|GameHelp/en/Galaxies
|
|
||||||
LargeStructures|Large Structures|[b]Large structures[/b] are called that for a reason: whole galaxies are used there as building blocks. They are needed to arrange the universe on the largest scales. Without them the space, uniformly filled by stars and galaxies, becomes too monotonous and sparse, meanwile these structures create a packing gradient with more and less dense regions. This arrangement is better fit for being claimed and developed by superadvanced sapient beings.|GameHelp/en/LargeStructures
|
|
||||||
Planets|Planets|Planets emerge around dwarf stars when metals are sufficient. In a sense all this space construction is being made with a purpose of making planets with potential of bearing life.[p] [p][b]Gas giant:[/b] large planet with a very thick atmosphere, unsuitable for life.[p][b]Asteroid belt:[/b] a bunch of rocks that lacks mass to form a planet.[p][b]Rocky planet:[/b] a planet unsuitable for life. Too cold, hot or wrong chemical makeup.[p][b]Habitable planet:[/b] there is liquid water here and life may emerge in the long run.[p][b]Living planet:[/b] denizens of this planet show great promise!|GameHelp/en/Planets
|
|
||||||
Eons|Eons|Life slowly evolves through eons from the most primitive one to the one with sapience potential. Not all planets are successful in completing this process to the end, because stars do not burn forever.[p] [p][b]Archean:[/b] it is difficult to notice, but these planets are full of archaea and cyanobacteria.[p][b]Paleozoic:[/b] alongside ubiquitous amoeba these planets host algae, sponges and even molluscs.[p][b]Proterozoic:[/b] ferns, worms, trilobites and fishes.[p][b]Mezozoic:[/b] conifers, lizards, dinosaurs and therapsids.[p][b]Cenozoic:[/b] flowering plants and various mammals, some of which show signs of sapience.|GameHelp/en/Eons
|
|
||||||
Type0Civilizations|Type 0 Civilizations|Pre-space epoch – from a tribe to a federation.[p] [p][b]c0.0:[/b] Lower Paleolithic. Control of fire, stone tools.[p][b]c0.1:[/b] Middle Paleolithic. Developed stone tools.[p][b]c0.2:[/b] Upper Paleolithic. Advanced stone tools, art.[p][b]c0.3:[/b] Mesolithic. Bow and arrows, fishing, boats.[p][b]c0.4:[/b] Early Neolithic. Agriculture.[p][b]c0.5:[/b] Middle Neolithic. Animal husbandry, ceramics.[p][b]c0.6:[/b] Late Neolithic. Large settlements.[p][b]c0.7:[/b] First kingdoms of copper and bronze ages. Wheel.[p][b]c0.8:[/b] Ancient empires of the iron age. Philosophy.[p][b]c0.9:[/b] Industrial age. Electronics and nuclear energy.|GameHelp/en/Type0Civilizations
|
|
||||||
Type1Civilizations|Type 1 Civilizations|Civilizations are busy with settling their own solar system.[p] [p][b]c1.0:[/b] A civilization that has completely mastered its home planet. Superconductivity, controlled nuclear fusion.[p][b]c1.1:[/b] Research compounds in the home system. Launch loop, space elevator.[p][b]c1.2:[/b] Complete genetic tailoring. Cyborgization.[p][b]c1.3:[/b] Industrial asteroid mining. Colonies on the other planets of the home system.[p][b]c1.4:[/b] Harvesting of matter from atmospheres of gas giants.[p][b]c1.5:[/b] Space cities. Picotechnologies.[p][b]c1.6:[/b] Industrial manufacturing of antimatter. First starships.[p][b]c1.7:[/b] Terraforming. Gamma-lasers.[p][b]c1.8:[/b] Space stations of continental scale.[p][b]c1.9:[/b] Partial Dyson swarm.|GameHelp/en/Type1Civilizations
|
|
||||||
Type2Civilizations|Type 2 Civilizations|Civilizations that can expand to other stars.[p] [p][b]c2.0:[/b] A civilization that completely exploits the energy output of its own sun.[p][b]c2.1:[/b] Change of planetary orbits.[p][b]c2.2:[/b] Control over inertia.[p][b]c2.3:[/b] Starlifting, harvesting matter from stars.[p][b]c2.4:[/b] Femtotechnologies: manipulations on individual fermions.[p][b]c2.5:[/b] Deconstruction and creation of planets.[p][b]c2.6:[/b] Complete domination of astroarchitecture over planets.[p][b]c2.7:[/b] Giant stars resources exploitation.[p][b]c2.8:[/b] Control over gravity.[p][b]c2.9:[/b] Movement of stars.|GameHelp/en/Type2Civilizations
|
|
||||||
Type3Civilizations|Type 3 Civilizations|Civilizations of galactic scale.[p] [p][b]c3.0:[/b] Expansion into a galactic group is available.[p][b]c3.1:[/b] Creation of stars.[p][b]c3.2:[/b] Utilization of white dwarfs.[p][b]c3.3:[/b] Creation of black holes by focused radiation.[p][b]c3.4:[/b] Expansion into a galactic supercluster is available.[p][b]c3.5:[/b] Utilization of neutron stars.[p][b]c3.6:[/b] Expansion into a galactic filament is available.[p][b]c3.7:[/b] Utilization of magnetars.[p][b]c3.8:[/b] Expansion into a great wall is available.[p][b]c3.9:[/b] Utilization of black holes.|GameHelp/en/Type3Civilizations
|
|
||||||
Type4Civilizations|Type 4 Civilizations|Civilizations of the universe scale.[p] [p][b]c4.0:[/b] Temporal manipulations.[p][b]c4.1:[/b] Expansion into the whole universe scale is available.[p][b]c4.2:[/b] Utilization of supermassive black holes.[p][b]c4.3:[/b] Folding space.[p][b]c4.4:[/b] Improbability field.[p] [p]And so on, bigger and bigger, so long as there is space.|GameHelp/en/Type4Civilizations
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
[remap]
|
|
||||||
|
|
||||||
importer="keep"
|
|
||||||
@@ -1,115 +0,0 @@
|
|||||||
name|label|description|image
|
|
||||||
Hydrogenin|Водородин|Производство водорода +100%<br>Производство пространства −50%<br>Длительность 1e9 лет|
|
|
||||||
Temporin|Темпорин|Пропуск 1 миллиарда лет<br><br>|
|
|
||||||
Inflatite|Инфлатит|Производство пространства +100%<br>Возраст структур +10%<br>Длительность 1e9 лет|
|
|
||||||
Singularite|Сингулярит|Поглощение пространства СМЧД +1000%<br>Поглощение звёзд СМЧД +100%<br>Длительность 1e9 лет|
|
|
||||||
Primex|Примекс|Использование гелия +200%<br>Производство водорода −50%<br>Длительность 1e9 лет|
|
|
||||||
Stellarin|Звездин|Автоматизация производства звёзд +50%<br><br>Длительность 1e8 лет|
|
|
||||||
Renewin|Обновин|Возраст структур −10%<br>Взрывчатость +10%<br>Длительность 1e8 лет|
|
|
||||||
Infusite|Инфузит|Горючесть +10%<br>5% бурых карликов вливается в звёзды<br>Длительность 1e8 лет|
|
|
||||||
Frostite|Фростит|Взрывчатость −10%<br>Горючесть −10%<br>Длительность 1e8 лет|
|
|
||||||
Desintegrex|Дезинтегрекс|Разрушает 1% вырожденных объектов<br>Вызывает гамма-всплески и антитеистические тенденции<br>|
|
|
||||||
Rockein|Камнеин|Шанс формирования каменистых планет +50%, обитаемых +25%<br>Шанс формирования газовых гигантов −75%<br>Длительность 1e7 лет|
|
|
||||||
Panspermin|Панспермин|1% обитаемых планет становятся живыми<br>5% обитаемых планет становятся каменистыми<br>|
|
|
||||||
Gaianite|Гайянит|5% каменистых планет становятся обитаемыми<br>Агрессивность −5%<br>Длительность 1e7 лет|
|
|
||||||
Darwinite|Дарвинит|Прогресс +25% для всех эонов<br>Агрессивность +5%<br>Длительность 1e7 лет|
|
|
||||||
Edenex|Эдемекс|Деградация −90% для всех эонов<br>Прогресс −50% для всех эонов, духовность<br>Длительность 1e7 лет|
|
|
||||||
Pacifin|Пацифин|Агрессивность −10%<br>Дрейф от воинственности и к дружелюбию +5%<br>Длительность 1e5 лет|
|
|
||||||
Enragein|Озверин|Агрессивность +10%<br>Дрейф от дружелюбия и к воинственности +5%<br>Длительность 1e5 лет|
|
|
||||||
Moralite|Моралит|Дрейф к выбранной этике +20%<br>Вызывает антитеистические тенденции<br>Длительность 1e5 лет|
|
|
||||||
Discriminite|Дискриминит|Прогресс +25% для выбранной этики<br>Вызывает антитеистические тенденции<br>Длительность 1e5 лет|
|
|
||||||
Reprex|Репрекс|Вклад в тенденции −90% для выбранной этики<br>Дрейф к мистике и к логике +10%<br>Длительность 1e5 лет|
|
|
||||||
Archean|Архей|Не сразу бросается в глаза, но на таких планетах полно археев и цианобактерий.|
|
|
||||||
Proterozoic|Протерозой|Помимо вездесущих амёб, здесь присутствуют водоросли, губки и даже моллюски.|
|
|
||||||
Paleozoic|Палеозой|Папоротники, черви, трилобиты и рыбы.|
|
|
||||||
Mezozoic|Мезозой|Голосеменные, ящеры, динозавры и терапсиды.|
|
|
||||||
Cenozoic|Кайнозой|Покрытосеменные и разнообразные млекопитающие, некоторые из которых проявляют признаки интеллекта.|
|
|
||||||
Civ0|ц0|Докосмическая эпоха — от племени до федерации.|
|
|
||||||
Civ0.0|ц0.0|Нижний палеолит. Приручение огня, каменные орудия.|
|
|
||||||
Civ0.1|ц0.1|Средний палеолит. Развитые каменные орудия.|
|
|
||||||
Civ0.2|ц0.2|Верхний палеолит. Сложные каменные орудия, искусство.|
|
|
||||||
Civ0.3|ц0.3|Мезолит. Лук и стрелы, рыболовство, лодки.|
|
|
||||||
Civ0.4|ц0.4|Ранний неолит. Земледелие.|
|
|
||||||
Civ0.5|ц0.5|Средний неолит. Скотоводство, керамика.|
|
|
||||||
Civ0.6|ц0.6|Поздний неолит. Крупные поселения.|
|
|
||||||
Civ0.7|ц0.7|Первые царства медного и бронзового века. Колесо.|
|
|
||||||
Civ0.8|ц0.8|Античные империи железного века. Философия.|
|
|
||||||
Civ0.9|ц0.9|Промышленная эпоха. Электричество.|
|
|
||||||
Civ1|ц1|Цивилизации, осваивающие родную солнечную систему.|
|
|
||||||
Civ1.0|ц1.0|Цивилизация, освоившая родную планету. Сверхпроводимость, управляемый термоядерный синтез.|
|
|
||||||
Civ1.1|ц1.1|Научные базы на других телах родной системы. Пусковая петля, космический лифт.|
|
|
||||||
Civ1.2|ц1.2|Полное управление генетикой. Киборгизация.|
|
|
||||||
Civ1.3|ц1.3|Промышленная добыча астероидов. Колонии на других планетах родной системы.|
|
|
||||||
Civ1.4|ц1.4|Сбор вещества из атмосфер газовых гигантов.|
|
|
||||||
Civ1.5|ц1.5|Космические города. Пикотехнологии: управление отдельными атомами.|
|
|
||||||
Civ1.6|ц1.6|Промышленное производство антивещества. Первые звездолёты.|
|
|
||||||
Civ1.7|ц1.7|Терраформинг. Гамма-лазеры.|
|
|
||||||
Civ1.8|ц1.8|Космические станции континентального масштаба.|
|
|
||||||
Civ1.9|ц1.9|Частичный рой Дайсона.|
|
|
||||||
Civ2|ц2|Цивилизации, ведущие экспансию к иным звёздам.|
|
|
||||||
Civ2.0|ц2.0|Цивилизация, освоившая энергию родного солнца. <br> Заселено порядка 1 звезды (единицы).|
|
|
||||||
Civ2.1|ц2.1|Изменение планетарных орбит. <br> Заселено порядка 10 звёзд (десятки).|
|
|
||||||
Civ2.2|ц2.2|Управление инерцией. <br> Заселено порядка 100 звёзд (сотни).|
|
|
||||||
Civ2.3|ц2.3|Сбор вещества со звёзд. <br> Заселено порядка 100 звёзд (тысячи), это масштаб рассеянного звёздного скопления.|
|
|
||||||
Civ2.4|ц2.4|Фемтотехнологии: управление отдельными фермионами. <br> Заселено порядка e4 звёзд (десятки тысяч), это масштаб малого звёздного скопления.|
|
|
||||||
Civ2.5|ц2.5|Деконструкция и сборка планет. <br> Заселено порядка e5 звёзд (сотни тысяч), это масштаб среднего звёздного скопления.|
|
|
||||||
Civ2.6|ц2.6|Полное доминирование астроархитектуры над планетами. <br> Заселено порядка e6 звёзд (миллионы), это масштаб большого звёздного скопления.|
|
|
||||||
Civ2.7|ц2.7|Освоение ресурсов звёзд-гигантов. <br> Заселено порядка e7 звёзд (десятки миллионов), это масштаб гигантского звёздного скопления.|
|
|
||||||
Civ2.8|ц2.8|Управление гравитацией. <br> Заселено порядка e8 звёзд (сотни миллионов).|
|
|
||||||
Civ2.9|ц2.9|Перемещение звёзд. <br> Заселено порядка e9 звёзд (миллиарды), это масштаб карликовой галактики вроде Малого Магелланова Облака.|
|
|
||||||
Civ3|ц3|Цивилизации галактического масштаба.|
|
|
||||||
Civ3.0|ц3.0|Возможна экспансия в группу галактик. <br> Заселено порядка e10 звёзд (десятки миллиардов), это масштаб малой галактики вроде Большого Магелланова Облака.|
|
|
||||||
Civ3.1|ц3.1|Создание звёзд. <br> Заселено порядка e11 звёзд (сотни миллиардов), это масштаб средней галактики вроде Млечного Пути.|
|
|
||||||
Civ3.2|ц3.2|Использование белых карликов. <br> Заселено порядка e12 звёзд (триллионы), это масштаб большой галактики вроде Туманности Андромеды.|
|
|
||||||
Civ3.3|ц3.3|Создание чёрных дыр из концентрированного излучения. <br> Заселено порядка e13 звёзд (десятки триллионов), это масштаб гигантской галактики вроде IC 1101.|
|
|
||||||
Civ3.4|ц3.4|Возможна экспансия в сверхскопление. <br> Заселено порядка e14 звёзд (сотни триллионов) или e1 галактик (десятки).|
|
|
||||||
Civ3.5|ц3.5|Использование нейтронных звёзд. <br> Заселено порядка e15 звёзд (квадриллионы) или e2 галактик (сотни).|
|
|
||||||
Civ3.6|ц3.6|Возможна экспансия в галактическую нить. <br> Заселено порядка e16 звёзд (десятки квадриллионов) или e3 галактик (тысячи).|
|
|
||||||
Civ3.7|ц3.7|Использование магнетаров. <br> Заселено порядка e17 звёзд (сотни квадриллионов) или e4 галактик (десятки тысяч).|
|
|
||||||
Civ3.8|ц3.8|Возможна экспансия в великую стену. <br> Заселено порядка e18 звёзд (квинтиллионы) или e5 галактик (сотни тысяч).|
|
|
||||||
Civ3.9|ц3.9|Использование чёрных дыр. <br> Заселено порядка e19 звёзд (десятки квинтиллионов) или e6 галактик (миллионы).|
|
|
||||||
Civ4|ц4|Цивилизации вселенского масштаба.|
|
|
||||||
Civ4.0|ц4.0|Манипуляции со временем. <br> Заселено порядка e20 звёзд (сотни квинтиллионов) или e7 галактик (десятки миллионов).|
|
|
||||||
Civ4.1|ц4.1|Возможна экспансия на масштабы всей вселенной. <br> Заселено порядка e21 звёзд (секстиллионы) или e8 галактик (сотни миллионов).|
|
|
||||||
Civ4.2|ц4.2|Использование сверхмассивных чёрных дыр. <br> Заселено порядка e22 звёзд (секстиллионы) или e9 галактик (миллиарды).|
|
|
||||||
Civ4.3|ц4.3|Складное пространство. <br> Заселено порядка e23 звёзд (сотни секстиллионов) или e10 галактик (десятки миллиардов).|
|
|
||||||
Civ4.4|ц4.4|Поле невероятности. <br> Заселено порядка e24 звёзд (септиллионы) или e11 галактик (сотни миллиардов).|
|
|
||||||
Civ4.5|ц4.5|Заселено порядка e25 звёзд (десятки септиллионов) или e12 галактик (триллионы).|
|
|
||||||
Civ4.6|ц4.6|Заселено порядка e26 звёзд (сотни септиллионов) или e13 галактик (десятки триллионов).|
|
|
||||||
Civ4.7|ц4.7|Заселено порядка e27 звёзд (октиллионы) или e14 галактик (сотни триллионов).|
|
|
||||||
Civ4.8|ц4.8|Заселено порядка e28 звёзд (десятки октиллионов) или e15 галактик (квадриллионы).|
|
|
||||||
Civ4.9|ц4.9|Заселено порядка e29 звёзд (сотни октиллионов) или e16 галактик (десятки квадриллионов).|
|
|
||||||
AboutTheGame|Об игре|В этой игре вы можете <b>создать вселенную</b> и управлять её развитием. Конечную цель вы определяете для себя самостоятельно. Попробуйте получить те достижения, которые вам понравятся. Читайте подсказки, исследуйте возможности и не бойтесь экспериментировать. Всегда можно начать всё заново.<br><br>Числа больше 1 000 записаны <b>экспоненциально</b>. 1e4 — это 10 000, то есть «единица, у которой 4 нуля». 1е6 — миллион, 1е9 — миллиард и так далее. 13,77е9 — это 13 миллиардов 770 миллионов.<br><br>Игра идёт в реальном времени с изменяемым масштабированием. За одну секунду может пройти год, десять лет, век и так далее. Меняйте скорость течения времени кнопками «−» и «+».|GameHelp/ru/AboutTheGame
|
|
||||||
GameplayBasics|Основы игры|Вам доступен большой, но конечный <b>запас энергии</b>, нужной для создания всего вещества во вселенной и самого её пространства. В начале подавляющая часть этой энергии вам напрямую недоступна. Но в ходе игры вы будете забирать всё больше энергии, и чем меньше её останется в запасе, тем сложнее будет брать новую. Нехватка энергии не станет острой проблемой в ближайший миллиард лет или около того: запас действительно очень велик.<br><br>Из энергии с помощью облаков производится вещество в виде <b>водорода</b>. Он тратится на создание новых облаков и звёзд. Звёзды в процессе горения создают <b>пространство</b>, в котором могут быть размещены новые звёзды и облака. Создание пространства также расходует некоторую часть энергии из общего запаса.|GameHelp/ru/GameplayBasics
|
|
||||||
StarsAndStructures|Звёзды и структуры|Чем массивнее звезда, тем быстрее она сгорает и больше пространства производит. Самым выгодным вложением водорода на полученное пространство являются самые маленькие звёзды. Но они горят очень долго и медленно производят пространство. Также каждая звезда сама занимает единицу пространства.<br><br>Звёзды и туманности растущей вселенной есть смысл организовывать в галактики и более крупные <b>структуры</b>. Объекты, ставшие частью таких структур, продолжают функционировать как обычно.<br><br>Соотношение между веществом и свободным пространством называется <b>плотностью</b>. Вселенная стабильна только в определённом диапазоне плотности. При выходе за его рамки возникают проблемы.|GameHelp/ru/StarsAndStructures
|
|
||||||
LifeAndForces|Жизнь и силы|Возле некоторых звёзд возникают <b>планеты</b>, на которых может появиться жизнь. При определённых обстоятельствах жизнь эволюционирует до разумной, а разумная развивается до высокотехнологичной. Далее она пытается освоить вселенную, которую считает своей.<br><br>Многие события во вселенной случаются не всегда, а лишь с некоторой вероятностью. У вас есть доступ к особым <b>силам</b>, с помощью которых вы можете «подкручивать» вероятности интересующих вас событий, влияя на законы природы.|GameHelp/ru/LifeAndForces
|
|
||||||
Achievements|Достижения|В ходе игры вам совершенно точно удастся выполнить некоторые <b>достижения</b>. Простые получаются сами собой, а вот над более сложными может понадобиться призадуматься. Можно использовать список достижений в качестве карты подсказок возможных следующих шагов.<br><br>Гнаться за всеми достижениями необязательно. Это ваша вселенная и вы можете делать с ней что угодно. Однако достижение есть достижение, и помимо личной гордости о проделанной работе вы сможете с лёгкостью <b>поделиться</b> им с друзьями!|GameHelp/ru/Achievements
|
|
||||||
Karma|Карма|Каждое полученное достижение даёт вам некоторое число <b>кармических очков</b>. При создании новой вселенной вы можете потратить полученные очки на получение небольших бонусов, с помощью которых вам непременно удастся добиться лучших результатов.<br><br>Потраченные кармические очки никуда не деваются: они <b>остаются</b> с вами и вы снова сможете их потратить в следующей вселенной. Скорее всего, к этому моменту их станет ещё больше.|GameHelp/ru/Karma
|
|
||||||
GaugesAndEnergy|Индикаторы и энергия|На приборной панели расположены <b>индикаторы</b> тех показателей, которые особенно важны для выбранной страницы с объектами.<br><br><b>Запас энергии</b> или «ε». На любое производство первичных ресурсов, то есть водорода и пространства, расходуется запас энергии. Чем ниже доля оставшегося запаса, указанная в середине полоски, тем с меньшей эффективностью работают источники создания ресурсов, такие как облака для водорода и звёзды для пространства.<br>Запас энергии правда очень велик, хоть и не бесконечен.|GameHelp/ru/GaugesAndEnergy
|
|
||||||
DensityAndBurnability|Плотность и горючесть|Средняя <b>плотность</b> вселенной это отношение общей массы вещества, то есть всех звёзд, облаков и так далее, к пустому пространству. Она растёт вместе с массой и уменьшается с ростом пространства. Если индикатор «ρ» выйдет из «средней зоны» и склонится к одной из крайностей, то последствия могут вас неприятно удивить.<br><br><b>Горючесть</b> показывает текущую скорость горения звёзд. На неё могут влиять плотность вселенной (чем больше, тем выше), действия сверхразвитых цивилизаций и силы игрока.|GameHelp/ru/DensityAndBurnability
|
|
||||||
ExplosivenessAndAggression|Взрывчатость и агрессия|<b>Взрывчатость</b> показывает текущую вероятность гамма-всплесков и мощность взрыва при любом коллапсе звезды-гиганта. На неё могут влиять плотность вселенной (чем больше, тем ниже), действия сверхразвитых цивилизаций и силы игрока.<br><br><b>Агрессия</b> показывает интенсивность конкурентной борьбы между видами, цивилизациями и их внутренними фракциями. Она влияет на развитие и стабильность жизни и обществ. Изменяется под воздействием вселенских тенденций и сил игрока.<br>По умолчанию показывается средняя вселенская агрессия. Но можно выделить какой-либо цивилизационный уровень и увидеть среднюю агрессию именно для этого уровня.|GameHelp/ru/ExplosivenessAndAggression
|
|
||||||
Trends|Тенденции|<b>Тенденциями</b> называются глобальные цели развития вселенной, к которым тяготеют цивилизации. Совокупность действий множества высокоразвитых существ проявляет себя как та или иная тенденция, по достижении некоторого порога величины влияющая на вселенную в целом.<br><br>Всего есть пять тенденций: духовность, антитеизм, интеграция, ксеноцид и владение.|GameHelp/ru/Trends
|
|
||||||
SpiritualityAndAntitheism|Духовность и антитеизм|<b>Духовность</b> это понимание и принятие высшей воли. Не секрет, что в этой вселенной высшая воля объективно присутствует, и просветлённые существа готовы ей следовать. Они очень полезны, поскольку смысл их существования в услужении игроку. Однако это поведение может восприниматься как раздражающая навязчивость.<br><br><b>Антитеизм</b> это противопоставление воли людей высшей воле. Он может привести к конфликту разумных обитателей вселенной с желаниями игрока. В некотором смысле антитеизм может восприниматься как нечто нежелательное. Однако если игрок хочет вырастить самостоятельных существ, которым не нужно покровительство высших сил, тогда ничего страшного в «подростковом бунте» подопечных на самом деле и нет.|GameHelp/ru/SpiritualityAndAntitheism
|
|
||||||
IntegrationAndXenocide|Интеграция и ксеноцид|<b>Интеграция</b> это мирное сосуществование и объединение различных форм жизни. Она приводит к мирной и гармоничной жизни без конфликтов и войн. Эта утопия хороша всем, кроме снижения стимулов к развитию. Плотно интегрированное международное сообщество ничего не боится и ни к чему не стремится, поскольку все насущные проблемы и так решены.<br><br><b>Ксеноцид</b> это политика окончательного решения вопроса «мы или они». Жители такой вселенной не доверяют друг другу и рассуждают, что раз уж война всё равно неизбежна, то для получения преимущества надо бить первыми. Вселенная слишком мала для нескольких высших форм жизни, поэтому в конце должна остаться только одна, наиболее совершенная и высокоразвитая из всех. Пусть выживет сильнейший!|GameHelp/ru/IntegrationAndXenocide
|
|
||||||
Mastery|Владение|<b>Владение</b> это перестройка вселенной для нужд цивилизации. Жители считают себя вершиной эволюции, а вселенную воспринимают как пространство для освоения. Они подчиняются законам экономики и служат собственным желаниям, не думая о последствиях. Неважно, что случится через миллиарды лет, если можно поднять качество жизни. А потомки не дураки, сами разберутся, это уже их проблемы.|GameHelp/ru/Mastery
|
|
||||||
Forces|Силы|<b>Силы</b> это особые способности, доступные игроку. Они глобально влияют на законы природы, управляющие вашей вселенной. Каждый день вы получаете новый случайный набор сил. Силы не переходят из одной партии в другую, поэтому их нет особого смысла беречь.<br>Всего есть 20 различных сил. Силы с зелёной границей встречаются чаще всего, синие реже, а фиолетовые особенно редки, но очень мощны. У большинства сил есть определённая длительность, но некоторые из них просто срабатывают мгновенно и всё. Силы разъяснены на следующих страницах помощи.|GameHelp/ru/Forces
|
|
||||||
UniverseForces|Вселенские силы|Длительность этих сил равна 1e9 лет.<br><b>Водородин</b> увеличивает производство водорода и уменьшает производство пространства. Полезен, когда пространства и так хватает.<br><b>Темпорин</b> позволяет вам пропустить 1 миллиард лет. Эта сила полезна, когда всё идёт по плану.<br><b>Инфлатит</b> усиливает производство пространства, но структуры становятся менее стабильными. Вы всегда можете сделать новые.<br><b>Сингулярит</b> делает ваши сверхмассивные чёрные дыры значительно активнее. Они даже начинают поглощать пустое пространство, уплотняя вселенную.<br><b>Примекс</b> позволяет вам использовать гораздо большую долю гелия вместо водорода при создании новых звёзд и облаков. Однако ваше производство водорода уменьшается.|GameHelp/ru/UniverseForces
|
|
||||||
StellarForces|Звёздные силы|Длительность этих сил равна 1e8 лет.<br><b>Звездин</b> направляет большую часть водорода, производимого звёздными колыбелями, на автоматическое создание новых звёзд. Вы получите меньше водорода в свой бюджет.<br><b>Обновин</b> повышает стабильность структур, но делает звёзды более взрывчатыми.<br><b>Инфузит</b> вливает в звёзды эти бесполезные бурые карлики, что увеличивает их горючесть и, время от времени, их размеры.<br><b>Фростит</b> понижает горючесть и взрывчатость звёзд. Иногда вселенной полезно слегка остыть.<br><b>Дезинтегрекс</b> разламывает некоторые вырожденные объекты с катастрофическими последствиями. Вы получаете больше металлов, но разумным жителям вселенной вряд ли придётся по вкусу такая грубая демонстрация разрушительной мощи.|GameHelp/ru/StellarForces
|
|
||||||
PlanetaryForces|Планетные силы|Длительность этих сил равна 1e7 лет.<br><b>Камнеин</b> увеличивает шанс появления каменистых и даже обитаемых планет вместо газовых гигантов.<br><b>Панспермин</b> мгновено заполняет некоторые обитаемые планеты жизнью, но, к сожалению, он портит другие обитаемые планеты, делая их каменистыми.<br><b>Гайянит</b> превращает некоторые каменистые планеты в обитаемые, а также снижает агрессивность.<br><b>Дарвинит</b> ускоряет прогресс эволюции для всех эонов, а также повышает агрессивность. Выживание сильнейших, понятное дело.<br><b>Эдемекс</b> мощно снижает шанс деградации для всех эонов, но также значительно замедляет эволюционный прогресс, потому что всё становится слишком благостным и не требует адаптации. Также он усиливает тенденцию духовности.|GameHelp/ru/PlanetaryForces
|
|
||||||
CivilizationForces|Цивилизационные силы|Длительность этих сил равна 1e5 лет.<br><b>Пацифин</b> снижает агрессивность. Также он увеличивает дрейф от воинственности и к дружелюбию.<br><b>Озверин</b> повышает агрессивность. Также он увеличивает дрейф от дружелюбия и к воинственности.<br><b>Моралит</b> увеличивает дрейф к выбранной этике и вызывает антитеистические тенденции, потому что разумным существам не нравится, когда им указывают, что делать.<br><b>Дискриминит</b> увеличивает прогресс развития для выбранной этики и вызывает антитеистические тенденции, потому что разумным существам не нравится, когда выбирается любимчик.<br><b>Репрекс</b> мощно снижает вклад в тенденции для выбранной этики. Также он вызывает дрейф одновременно к мистике и логике, потому что разумные существа пытаются искать ответы в разных местах.|GameHelp/ru/CivilizationForces
|
|
||||||
SpaceAndHydrogen|Пространство и водород|Большинство созидательных действий требует траты ресурсов.<br><br><b>Пространство</b> нужно для размещения всего того, что вы создаёте. Для создания нового пространства зажигайте звёзды!<br><br><b>Водород</b> требуется для создания туманностей и звёзд. Туманности позволяют получать больше водорода. Звёзды создают пространство и используются для базирования планет. Эти объекты также служат кирпичиками для возведения сложных структур.|GameHelp/ru/SpaceAndHydrogen
|
|
||||||
HeliumAndMetals|Гелий и металлы|Гелий и металлы остаются, когда звёзды завершают своё существование.<br><b>Гелий</b> не особенно полезен, но от него никуда не деться. Он расходуется автоматически, по возможности замещая водород, экономя более полезный ресурс.<br><br><b>Металлы</b> «загрязняют» ваш запас водорода и гелия более тяжёлыми элементами. Это хорошо, поскольку высокая «металличность», отношение металлов к водороду и гелию, увеличивает вероятность возникновения планет у новых звёзд.<br>Металлы добавляются от сгорания звёзд, особенно больших, но общая металличность может уменьшаться, когда вселенная наполняется новыми объектами из чистого водорода и гелия, такими как туманности и звёзды.|GameHelp/ru/HeliumAndMetals
|
|
||||||
Clouds|Облака|Облака нужны для создания водорода, из которого впоследствии можно построить вселенную. Из базовых туманностей можно собирать более сложные облачные структуры.<br><br><b>Туманность:</b> самое простое облако.<br><b>Глобула:</b> даёт водород медленнее туманности, но существует дольше, а также занимает меньше места. Используется в создании более крупных облаков.<br><b>Звёздная колыбель:</b> автоматически создаёт звёзды из части выданного водорода.<br><b>Молекулярное облако:</b> большой и долговременный генератор водорода.<br><b>Активная звёздная колыбель:</b> очень большой автоматический генератор водорода и звёзд.|GameHelp/ru/Clouds
|
|
||||||
DwarfStars|Звёзды-карлики|Звёзды-карлики дёшевы, существуют долго и производят пространство эффективно. У них бывают планеты, на которых впоследствии может развиться жизнь.<br><br><b>Бурый карлик:</b> брак, бесполезный побочный эффект от создания звёзд. Они возникают сами и не занимают пространство в отличие от остальных звёзд. Производить их специально нельзя, да и не нужно.<br><b>Красный карлик:</b> экономически выгоден для производства пространства, но работает очень медленно.<br><b>Оранжевый карлик:</b> идеален для развития жизни.<br><b>Жёлтый карлик:</b> подходит для возникновения жизни.<br><b>Бело-жёлтый карлик:</b> имеет самую большую зону обитания, но быстро выгорает.|GameHelp/ru/DwarfStars
|
|
||||||
GiantStars|Звёзды-гиганты|Звёзды-гиганты дороги, быстро сгорают и производят много пространства. В конце существования они коллапсируют и взрываются, что может повредить планеты у соседних звёзд, но производит металлы.<br><br><b>Красный гигант:</b> звезда, израсходовавшая большую часть запаса топлива. Их нельзя производить специально, они появляются сами.<br><b>Жёлтый гигант:</b> самая скромная из звёзд-гигантов. Коллапс сравнительно слаб.<br><b>Голубой гигант:</b> обычная звезда-гигант. Коллапс создаёт много пространства.<br><b>Сверхгигант:</b> огромная звезда-гигант. Живёт недолго, коллапсирует бурно.<br><b>Гипергигант:</b> экстремальная звезда-гигант. Всегда коллапсирует в чёрную дыру.|GameHelp/ru/GiantStars
|
|
||||||
DegenerateObjects|Вырожденные объекты|Звёзды, выработавшие своё термоядерное топливо. Они занимают пространство и ничего не производят, но из них можно собирать структуры.<br><br><b>Белый карлик:</b> остаток сгоревшего карлика.<br><b>Нейтронная звезда:</b> исключительно компактный остаток звезды-гиганта.<br><b>Магнетар:</b> самый плотный объект, не являющийся чёрной дырой.<br><b>Чёрная дыра:</b> остаток огромной звезды, прошедшей разрушительный коллапс. Их можно объединять в сверхмассивные чёрные дыры.<br><b>Сверхмассивная чёрная дыра:</b> результат слияния множества чёрных дыр звёздной массы. Необходимы для создания галактик. Растут самостоятельно за счёт прочих звёзд, хотя и очень медленно.|GameHelp/ru/DegenerateObjects
|
|
||||||
StarClusters|Звёздные скопления|Звёздные скопления являются самыми скромными из структур. Фактически это просто некоторое количество звёзд, расположенных ближе друг к другу, чем обычно и из-за этого гравитационно связанных. Но даже подобные комки уже вносят заметное разнообразие в однородный вселенский ландшафт.<br><br><b>Рассеянное:</b> небольшая структура неправильной формы.<br><b>Малое:</b> имеет шарообразную форму.<br><b>Среднее:</b> заметно издалека.<br><b>Большое:</b> производит впечатление.<br><b>Гигантское:</b> вызывает трепет.|GameHelp/ru/StarClusters
|
|
||||||
Galaxies|Галактики|<b>Эллиптические галактики</b> напоминают колоссальные звёздные скопления. Они имеют линзовидную форму, вращаются медленно и довольно похожи друг на друга. В них почти не идёт процесс звездообразования, поэтому если жизнь в такой галактике не зародилась в первые пару миллиардов лет, то вряд ли она появится в дальнейшем.<br><br><b>Спиральные галактики</b> вращаются быстрее эллиптических, имеют неоднородную структуру с рукавами и поддерживают активное звездообразование. Они лучше подходят для зарождения и развития жизни. Со временем в спиральных галактиках заканчивается запас газа, они замедляются и превращаются в более стабильные и скучные эллиптические.|GameHelp/ru/Galaxies
|
|
||||||
LargeStructures|Большие структуры|<b>Большие структуры</b> не зря так называются: в качестве строительных кирпичиков в них используются целые галактики. Они нужны для организации вселенной на самых больших масштабах. Без них пространство, равномерно заполненное звёздами и галактиками, оказывается слишком однообразным и разреженным, тогда как они создают градиент заполнения с более и менее плотными областями, более подходящий для освоения сверхразвитыми разумными существами.|GameHelp/ru/LargeStructures
|
|
||||||
Planets|Планеты|Планеты возникают у звёзд-карликов при наличии металлов. В некотором смысле всё это космическое строительство проводится ради тех планет, у которых есть потенциал для зарождения жизни.<br><br><b>Газовый гигант:</b> большая планета с чрезвычайно плотной атмосферой, непригодная для жизни.<br><b>Пояс астероидов:</b> куча камней недостаточной массы, чтобы собраться в планету.<br><b>Каменистая планета:</b> непригодная для жизни планета. Слишком холодно, жарко или не тот химический состав.<br><b>Обитаемая планета:</b> здесь есть жидкая вода и в перспективе может образоваться жизнь.<br><b>Живая планета:</b> обитатели этой планеты подают большие надежды!|GameHelp/ru/Planets
|
|
||||||
Eons|Эоны|Жизнь медленно эволюционирует через эоны от самой примитивной до способной к появлению разума. Не всем планетам удаётся довести этот процесс до победного конца, потому что звёзды горят не вечно.<br><br><b>Архей:</b> не сразу бросается в глаза, но на таких планетах полно археев и цианобактерий.<br><b>Палеозой:</b> помимо вездесущих амёб, здесь присутствуют водоросли, губки и даже моллюски.<br><b>Протерозой:</b> папоротники, черви, трилобиты и рыбы.<br><b>Мезозой:</b> голосеменные, ящеры, динозавры и терапсиды.<br><b>Кайнозой:</b> покрытосеменные и разнообразные млекопитающие, некоторые из которых проявляют признаки интеллекта.|GameHelp/ru/Eons
|
|
||||||
Type0Civilizations|Цивилизации типа 0|Докосмическая эпоха — от племени до федерации.<br><br><b>ц0.0:</b> нижний палеолит. Приручение огня, каменные орудия.<br><b>ц0.1:</b> средний палеолит. Развитые каменные орудия.<br><b>ц0.2:</b> верхний палеолит. Сложные каменные орудия, искусство.<br><b>ц0.3:</b> мезолит. Лук и стрелы, рыболовство, лодки.<br><b>ц0.4:</b> ранний неолит. Земледелие.<br><b>ц0.5:</b> средний неолит. Скотоводство, керамика.<br><b>ц0.6:</b> поздний неолит. Крупные поселения.<br><b>ц0.7:</b> первые царства медного и бронзового века. Колесо.<br><b>ц0.8:</b> античные империи железного века. Философия.<br><b>ц0.9:</b> промышленная эпоха. Электричество.|GameHelp/ru/Type0Civilizations
|
|
||||||
Type1Civilizations|Цивилизации типа 1|Цивилизации, заселяющие родную солнечную систему.<br><br><b>ц1.0:</b> цивилизация, освоившая родную планету. Сверхпроводимость, термоядерный синтез.<br><b>ц1.1:</b> научные базы в родной системе. Пусковая петля, космический лифт.<br><b>ц1.2:</b> полное управление генетикой. Киборгизация.<br><b>ц1.3:</b> промышленная добыча астероидов. Поселения в родной системе.<br><b>ц1.4:</b> сбор вещества из атмосфер газовых гигантов.<br><b>ц1.5:</b> космические города. Пикотехнологии.<br><b>ц1.6:</b> промышленное антивещество. Первые звездолёты.<br><b>ц1.7:</b> терраформинг. Гамма-лазеры.<br><b>ц1.8:</b> космические станции континентального масштаба.<br><b>ц1.9:</b> частичный рой Дайсона.|GameHelp/ru/Type1Civilizations
|
|
||||||
Type2Civilizations|Цивилизации типа 2|Цивилизации, ведущие экспансию к иным звёздам.<br><br><b>ц2.0:</b> цивилизация, освоившая энергию родного солнца.<br><b>ц2.1:</b> изменение планетарных орбит.<br><b>ц2.2:</b> управление инерцией.<br><b>ц2.3:</b> сбор вещества со звёзд.<br><b>ц2.4:</b> фемтотехнологии: управление отдельными фермионами.<br><b>ц2.5:</b> деконструкция и сборка планет.<br><b>ц2.6:</b> окончательное переселение с планет в космос.<br><b>ц2.7:</b> освоение ресурсов звёзд-гигантов.<br><b>ц2.8:</b> управление гравитацией.<br><b>ц2.9:</b> перемещение звёзд.|GameHelp/ru/Type2Civilizations
|
|
||||||
Type3Civilizations|Цивилизации типа 3|Цивилизации галактического масштаба.<br><br><b>ц3.0:</b> возможна экспансия в группу галактик.<br><b>ц3.1:</b> создание звёзд.<br><b>ц3.2:</b> использование белых карликов.<br><b>ц3.3:</b> создание чёрных дыр из концентрированного излучения.<br><b>ц3.4:</b> возможна экспансия в сверхскопление.<br><b>ц3.5:</b> использование нейтронных звёзд.<br><b>ц3.6:</b> возможна экспансия в галактическую нить.<br><b>ц3.7:</b> использование магнетаров.<br><b>ц3.8:</b> возможна экспансия в великую стену.<br><b>ц3.9:</b> использование чёрных дыр.|GameHelp/ru/Type3Civilizations
|
|
||||||
Type4Civilizations|Цивилизации типа 4|Цивилизации вселенского масштаба.<br><br><b>ц4.0:</b> манипуляции со временем.<br><b>ц4.1:</b> возможна экспансия на масштабы всей вселенной.<br><b>ц4.2:</b> использование сверхмассивных чёрных дыр.<br><b>ц4.3:</b> складное пространство.<br><b>ц4.4:</b> поле невероятности.<br><br>И так далее, всё больше и больше, пока есть место.|GameHelp/ru/Type4Civilizations
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
[remap]
|
|
||||||
|
|
||||||
importer="keep"
|
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
class_name OwniverseAudioLoader
|
||||||
|
|
||||||
|
const MUSIC: Dictionary = {
|
||||||
|
"apocalypse_the_end": preload("res://sound/music/apocalypse_the_end.ogg"),
|
||||||
|
"cosmic_unicorns": preload("res://sound/music/cosmic_unicorns.ogg"),
|
||||||
|
"funky_eldritch": preload("res://sound/music/funky_eldritch.ogg"),
|
||||||
|
"meditative_beings": preload("res://sound/music/meditative_beings.ogg"),
|
||||||
|
"owniverse_main_theme": preload("res://sound/music/owniverse_main_theme.ogg"),
|
||||||
|
}
|
||||||
|
|
||||||
|
const EFFECTS: Dictionary = {
|
||||||
|
"black_hole_feed": preload("res://sound/effects/black_hole_feed.ogg"),
|
||||||
|
"blast": preload("res://sound/effects/blast.ogg"),
|
||||||
|
"civ_birth": preload("res://sound/effects/civ_birth.ogg"),
|
||||||
|
"civ_death": preload("res://sound/effects/civ_death.ogg"),
|
||||||
|
"civ_top": preload("res://sound/effects/civ_top.ogg"),
|
||||||
|
"cloud_decay": preload("res://sound/effects/cloud_decay.ogg"),
|
||||||
|
"create": preload("res://sound/effects/create.ogg"),
|
||||||
|
"force": preload("res://sound/effects/force.ogg"),
|
||||||
|
"gamma_ray": preload("res://sound/effects/gamma_ray.ogg"),
|
||||||
|
"life_birth": preload("res://sound/effects/life_birth.ogg"),
|
||||||
|
"life_death": preload("res://sound/effects/life_death.ogg"),
|
||||||
|
"select": preload("res://sound/effects/select.ogg"),
|
||||||
|
"star_birth": preload("res://sound/effects/star_birth.ogg"),
|
||||||
|
"structure_decay": preload("res://sound/effects/structure_decay.ogg"),
|
||||||
|
#"swipe": preload("res://sound/effects/swipe.ogg"),
|
||||||
|
"time_minus": preload("res://sound/effects/time_minus.ogg"),
|
||||||
|
"time_plus": preload("res://sound/effects/time_plus.ogg"),
|
||||||
|
"trend_action": preload("res://sound/effects/trend_action.ogg"),
|
||||||
|
"window_close": preload("res://sound/effects/window_close.ogg"),
|
||||||
|
"window_open": preload("res://sound/effects/window_open.ogg"),
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static func get_music() -> Dictionary:
|
||||||
|
return MUSIC.duplicate()
|
||||||
|
|
||||||
|
|
||||||
|
static func get_effects() -> Dictionary:
|
||||||
|
return EFFECTS.duplicate()
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://cb517ydjlk7iq
|
||||||
@@ -1,3 +1,48 @@
|
|||||||
|
class_name OwniverseCivilizationRuleLoader
|
||||||
|
const E = preload("res://world/owniverse/math/exact.gd")
|
||||||
|
|
||||||
|
static func get_data() -> Dictionary:
|
||||||
|
var result: Dictionary = {}
|
||||||
|
for row: Dictionary in CSVLoader.load(DATA).values():
|
||||||
|
for field in ["span", "stars", "progress", "degradation", "colonization", "war", "diplomacy_rate", "worship"]:
|
||||||
|
row[field] = E.of(row[field])
|
||||||
|
if not result.has(row.stage):
|
||||||
|
result[row.stage] = {
|
||||||
|
"home": row.home,
|
||||||
|
"span": E.of(row.span),
|
||||||
|
"stars": E.of(row.stars),
|
||||||
|
"ethics": {},
|
||||||
|
"colonizes": row.colonizes == "1",
|
||||||
|
"fights": row.fights == "1",
|
||||||
|
"diplomacy": row.diplomacy == "1",
|
||||||
|
"worships": row.worships == "1",
|
||||||
|
}
|
||||||
|
result[row.stage].ethics[row.ethic] = row
|
||||||
|
|
||||||
|
var stages: Array = result.keys()
|
||||||
|
stages.sort()
|
||||||
|
for i in stages.size():
|
||||||
|
result[stages[i]].next = stages[i + 1] if i + 1 < stages.size() else "Ct"
|
||||||
|
result[stages[i]].previous = stages[i - 1] if i > 0 else "C0.1"
|
||||||
|
result[stages[i]].colony = stages[maxi(0, i - 2)]
|
||||||
|
|
||||||
|
result.Ct = {
|
||||||
|
"home": "",
|
||||||
|
"span": 0.0,
|
||||||
|
"stars": 0.0,
|
||||||
|
"ethics": {},
|
||||||
|
"next": "Ct",
|
||||||
|
"previous": "C4.4",
|
||||||
|
"colonizes": false,
|
||||||
|
"fights": false,
|
||||||
|
"diplomacy": false,
|
||||||
|
"worships": false,
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
|
||||||
|
#region Data Items
|
||||||
|
|
||||||
|
const DATA := """
|
||||||
id|stage|span|home|stars|colonizes|fights|diplomacy|worships|ethic|progress|degradation|colonization|war|diplomacy_rate|worship|fall
|
id|stage|span|home|stars|colonizes|fights|diplomacy|worships|ethic|progress|degradation|colonization|war|diplomacy_rate|worship|fall
|
||||||
C0.2:m|C0.2|2E+03||||||1|m|0.0084|0.01|0.0000625|0.001024||1.6|C0.1:1
|
C0.2:m|C0.2|2E+03||||||1|m|0.0084|0.01|0.0000625|0.001024||1.6|C0.1:1
|
||||||
C0.2:b|C0.2|2E+03||||||1|b|0.01859375|0.02|0.00003125|0.0025||1|C0.1:1
|
C0.2:b|C0.2|2E+03||||||1|b|0.01859375|0.02|0.00003125|0.0025||1|C0.1:1
|
||||||
@@ -257,3 +302,6 @@ C4.4:d|C4.4|8E+06|SMBH|1E+24|1|1|1|1|d|0.0144|0.01923076923|0.0009765625|0.00031
|
|||||||
C4.4:l|C4.4|8E+06|SMBH|1E+24|1|1|1|1|l|0.0648|0.04464285714|0.0005|0.0025|1.5625|0.5|C4.3:1024^C4.2:11
|
C4.4:l|C4.4|8E+06|SMBH|1E+24|1|1|1|1|l|0.0648|0.04464285714|0.0005|0.0025|1.5625|0.5|C4.3:1024^C4.2:11
|
||||||
C4.4:c|C4.4|8E+06|SMBH|1E+24|1|1|1|1|c|0.027|0.04166666667|0.004096|0.006103515625|1|0.8|C4.3:1024^C4.2:19
|
C4.4:c|C4.4|8E+06|SMBH|1E+24|1|1|1|1|c|0.027|0.04166666667|0.004096|0.006103515625|1|0.8|C4.3:1024^C4.2:19
|
||||||
C4.4:w|C4.4|8E+06|SMBH|1E+24|1|1|1|1|w|0.03375|0.025|0.000256|0.03072|0.25|1.25|C4.3:1024^C4.2:26
|
C4.4:w|C4.4|8E+06|SMBH|1E+24|1|1|1|1|w|0.03375|0.025|0.000256|0.03072|0.25|1.25|C4.3:1024^C4.2:26
|
||||||
|
"""
|
||||||
|
|
||||||
|
#endregion
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://271dcyio6pm7
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
[remap]
|
|
||||||
|
|
||||||
importer="keep"
|
|
||||||
@@ -1,3 +1,11 @@
|
|||||||
|
class_name OwniverseEntityLoader
|
||||||
|
|
||||||
|
static func get_data() -> Dictionary:
|
||||||
|
return CSVLoader.load(ENTITIES)
|
||||||
|
|
||||||
|
#region Owniverse Entities
|
||||||
|
|
||||||
|
const ENTITIES := """
|
||||||
id|is_visible|unlock|cost|bind|mass|space|lifespan|auto|gamma|blast|life_product|voids|output|destroy_level|degradation|planets|count_as|group_as|event_group|blastability|space_bonus|civ_bonus|claim
|
id|is_visible|unlock|cost|bind|mass|space|lifespan|auto|gamma|blast|life_product|voids|output|destroy_level|degradation|planets|count_as|group_as|event_group|blastability|space_bonus|civ_bonus|claim
|
||||||
S|1|S:0|E:1||||||||||||||||S||||
|
S|1|S:0|E:1||||||||||||||||S||||
|
||||||
H|1|H:0|E:1||||||||||||||||H||||
|
H|1|H:0|E:1||||||||||||||||H||||
|
||||||
@@ -151,3 +159,5 @@ fenr|1|fenr:1|||||||||||||||||||||
|
|||||||
fmor|1|fmor:1|||||||||||||||||||||
|
fmor|1|fmor:1|||||||||||||||||||||
|
||||||
fdis|1|fdis:1|||||||||||||||||||||
|
fdis|1|fdis:1|||||||||||||||||||||
|
||||||
frep|1|frep:1|||||||||||||||||||||
|
frep|1|frep:1|||||||||||||||||||||
|
||||||
|
"""
|
||||||
|
#endregion
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://bqtpylmso1ahc
|
||||||
@@ -1,3 +1,14 @@
|
|||||||
|
class_name OwniverseExtraParamLoader
|
||||||
|
const E = preload("res://world/owniverse/math/exact.gd")
|
||||||
|
|
||||||
|
static func get_data() -> Dictionary:
|
||||||
|
var result: Dictionary = {}
|
||||||
|
for row: Dictionary in CSVLoader.load(DATA).values():
|
||||||
|
result[row["param name"]] = E.of(row["param export"])
|
||||||
|
return result
|
||||||
|
|
||||||
|
#region Data
|
||||||
|
const DATA := """
|
||||||
param name|param value|param export|comment
|
param name|param value|param export|comment
|
||||||
E|1.00E+27|1.00E+27|количество энергии во вселенной
|
E|1.00E+27|1.00E+27|количество энергии во вселенной
|
||||||
G|6.67E-11|6.67E-11|
|
G|6.67E-11|6.67E-11|
|
||||||
@@ -25,3 +36,5 @@ ForceBox0Weight| 24|24|Вес вероятности появления зелё
|
|||||||
ForceBox1Weight| 6|6|Вес вероятности появления синего ящика
|
ForceBox1Weight| 6|6|Вес вероятности появления синего ящика
|
||||||
ForceBox2Weight| 2|2|Вес вероятности появления фиолетового ящика
|
ForceBox2Weight| 2|2|Вес вероятности появления фиолетового ящика
|
||||||
ForceBox3Weight| 1|1|Вес вероятности появления оранжевого ящика
|
ForceBox3Weight| 1|1|Вес вероятности появления оранжевого ящика
|
||||||
|
"""
|
||||||
|
#endregion
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://0sukoduq5ghq
|
||||||
@@ -1,3 +1,11 @@
|
|||||||
|
class_name OwniverseItemLoader
|
||||||
|
|
||||||
|
static func get_data() -> Dictionary:
|
||||||
|
return CSVLoader.load(ITEMS)
|
||||||
|
|
||||||
|
#region Owniverse Items
|
||||||
|
|
||||||
|
const ITEMS := """
|
||||||
id|name|image|page|row|col|sub_page
|
id|name|image|page|row|col|sub_page
|
||||||
fsho|shovelin|ui/0-forces/|0|0|0|
|
fsho|shovelin|ui/0-forces/|0|0|0|
|
||||||
finf|inflatin|ui/0-forces/|0|0|1|
|
finf|inflatin|ui/0-forces/|0|0|1|
|
||||||
@@ -123,3 +131,7 @@ C4.1|civ4.1|ui/4-life/civ4/|10|0|1|
|
|||||||
C4.2|civ4.2|ui/4-life/civ4/|10|0|2|
|
C4.2|civ4.2|ui/4-life/civ4/|10|0|2|
|
||||||
C4.3|civ4.3|ui/4-life/civ4/|10|0|3|
|
C4.3|civ4.3|ui/4-life/civ4/|10|0|3|
|
||||||
C4.4|civ4.4|ui/4-life/civ4/|10|0|4|
|
C4.4|civ4.4|ui/4-life/civ4/|10|0|4|
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://du0vey80c1o0e
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
[remap]
|
|
||||||
|
|
||||||
importer="keep"
|
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
class_name OwniverseLifeRuleLoader
|
||||||
|
const E = preload("res://world/owniverse/math/exact.gd")
|
||||||
|
|
||||||
|
static func get_data() -> Dictionary:
|
||||||
|
var result: Dictionary = CSVLoader.load(DATA)
|
||||||
|
for row: Dictionary in result.values():
|
||||||
|
for field in ["span", "progress", "degradation"]:
|
||||||
|
row[field] = E.of(row[field])
|
||||||
|
return result
|
||||||
|
|
||||||
|
#region Data Items
|
||||||
|
|
||||||
|
const DATA := """
|
||||||
|
id|span|progress|degradation|next|fall
|
||||||
|
HP|5E+06|0.00025|0.0025|EON1|RP:1
|
||||||
|
EON1|1E+06|0.025|0.0025|EON2|HP:100^RP:1
|
||||||
|
EON2|1E+06|0.025|0.0025|EON3|EON1:1
|
||||||
|
EON3|1E+05|0.025|0.0025|EON4|EON2:1000^EON1:1
|
||||||
|
EON4|1E+05|0.025|0.0025|EON5|EON3:1000^EON1:1
|
||||||
|
EON5|5E+05|0.025|0.0025|C0.0|EON4:2000^EON1:1
|
||||||
|
C0.0|2E+03|0.0175|0.025|C0.1|EON5:1
|
||||||
|
C0.1|2E+03|0.0175|0.025|C0.2|C0.0:1
|
||||||
|
"""
|
||||||
|
|
||||||
|
#endregion
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://c2valw4nqebxp
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class_name OwniverseTemplate
|
class_name OwniverseTemplateLoader
|
||||||
|
|
||||||
#region RU
|
#region RU
|
||||||
const RU := """
|
const RU := """
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
[runnable_presets]
|
[runnable_presets]
|
||||||
|
|
||||||
"Windows Desktop"="Windows Desktop"
|
"Windows Desktop"="Windows Desktop"
|
||||||
|
Android="Android"
|
||||||
|
|
||||||
[preset.0]
|
[preset.0]
|
||||||
|
|
||||||
|
|||||||
+47
-24
@@ -46,7 +46,15 @@ float. Весь порядок E27 сохраняет целые единицы.
|
|||||||
|
|
||||||
### Общие окна рождения и эволюции
|
### Общие окна рождения и эволюции
|
||||||
|
|
||||||
Окно рождения шириной `w = lifespan / 40` при `lifespan > 10`, иначе `w = lifespan`. Окно превращения сдвинуто на `lifespan`. При частичном списании:
|
На всех скоростях полный цикл симуляции обрабатывает 0,2 реальной секунды: пять циклов на секунду запрошенного времени. До накопления полного интервала расчёт не запускается. Игровая длительность цикла равна `0.2 × 10^(speed - 1)` лет. При отставании размер шага не увеличивается, долг сохраняется. Незавершённая транзакция из сохранения возобновляется с прежней границей. Кооперативный бюджет кадра — 40 мс; частота отрисовки не определяет частоту полных циклов.
|
||||||
|
|
||||||
|
На скоростях 4–6 укрупнение звёздных партий зависит от размера цикла и прежнего окна рождения. Размер цикла — `0.2 × 10^(speed - 1)` игровых лет: 200, 2000 и 20000 лет. Если прежнее окно `max(lifespan / 40, временное разрешение)` шире цикла, оно сохраняется: долгоживущие звёзды не дробятся на более мелкую сетку. Если оно не шире цикла, новые звёзды группы `Star` (включая красные гиганты) объединяются по общей границе завершения жизни и переходят целиком.
|
||||||
|
|
||||||
|
При обработке существующих партий объединяются только две или более партии одного типа, весь оставшийся интервал превращения которых попадает в один и тот же цикл. Широкие партии и партии, пересекающие границу циклов, остаются без изменений. Количества и накопленные остатки складываются точно; объединённая партия переходит целиком на границе цикла. Повторное укрупнение не меняет результат.
|
||||||
|
|
||||||
|
Это приближение времени перехода: задержка узкой партии не превышает одного цикла. Производство учитывает полное исчезновение объединённой партии на выбранной границе. При снижении скорости новые звёзды снова получают постепенные партии; уже созданные партии не разделяются. События SN/GRB сохраняют прежний расчёт.
|
||||||
|
|
||||||
|
На скоростях 1–3 звёзды, а также остальные объекты со сроком жизни больше 10 лет используют 40 возрастных групп: окно рождения имеет ширину `w = lifespan / 40`; для коротких событий ширина равна сроку жизни. Окно превращения сдвинуто на `lifespan`. Для облаков и первичной жизни на скоростях 4–6 сохраняется прежнее укрупнение окна по временному разрешению. При частичном списании:
|
||||||
|
|
||||||
```
|
```
|
||||||
expected = remainder + (remaining_count - remainder) * elapsed / remaining_window
|
expected = remainder + (remaining_count - remainder) * elapsed / remaining_window
|
||||||
@@ -54,7 +62,7 @@ converted = floor(expected)
|
|||||||
remainder = expected - converted
|
remainder = expected - converted
|
||||||
```
|
```
|
||||||
|
|
||||||
Конец окна списывает остаток. Переход не уничтожает всю партию в начале окна. Начала и длительности сохраняют модель GI, включая годовую длительность событий SN/GRB.
|
Конец постепенного окна списывает остаток. Новые звёздные партии высоких скоростей вместо такого окна имеют одну границу полного перехода. Длительность событий SN/GRB остаётся годовой.
|
||||||
|
|
||||||
## Планеты
|
## Планеты
|
||||||
|
|
||||||
@@ -73,10 +81,10 @@ remainder = expected - planets_created
|
|||||||
GI не хранит накопленные счётчики первичной материи Unity. Поэтому `stellar_environment()` вычисляет среду из текущего физического состава, включая связанные объекты, без суммирующих групп интерфейса. Это приближение для баланса GI, а не побитовое воспроизведение Unity.
|
GI не хранит накопленные счётчики первичной материи Unity. Поэтому `stellar_environment()` вычисляет среду из текущего физического состава, включая связанные объекты, без суммирующих групп интерфейса. Это приближение для баланса GI, а не побитовое воспроизведение Unity.
|
||||||
|
|
||||||
- `M` — свободные и связанные H/He/Met плюс табличная масса конкретных объектов и масса SMBH.
|
- `M` — свободные и связанные H/He/Met плюс табличная масса конкретных объектов и масса SMBH.
|
||||||
- `V` — физическое S плюс табличный объём объектов и `voids * 1e22`.
|
- `V` — физическое S плюс табличный объём объектов и `voids * ExtraParams.VoidSize`.
|
||||||
- `Z = max(0, 0.4 * ln(100 * free_Met / M + 0.11) + 0.88)`; при `M = 0` металличность нулевая.
|
- `Z = max(0, 0.4 * ln(100 * free_Met / M + 0.11) + 0.88)`; при `M = 0` металличность нулевая.
|
||||||
- `B = 65536 * f(M)`, где `f(0)=1`, `f(M)=M^0.1` при `0<M<1e10`, иначе `10`.
|
- `B = ExtraParams.DA * f(M)`, где `f(0)=1`, `f(M)=M^0.1` при `0<M<1e10`, иначе `10`.
|
||||||
- `density = 1.23456e-7 * sqrt(B + M) / max(1, V)^(1/6)`.
|
- `density = ExtraParams.NPC * sqrt(B + M) / max(1, V)^(1/6)`.
|
||||||
- `blast_factor = clamp(free_S / V, 0, 1)`; при нулевом объёме `1`.
|
- `blast_factor = clamp(free_S / V, 0, 1)`; при нулевом объёме `1`.
|
||||||
|
|
||||||
Планетные бонусы сил пока не перенесены. Параметры мира Bur/Exp/Agg имеют собственные сохраняемые шкалы и эффективные множители (см. раздел индикаторов ниже). Металличность для производства фиксируется до расходования ресурсов на звёзды. Среда бласта фиксируется для поколения до добавления его продуктов.
|
Планетные бонусы сил пока не перенесены. Параметры мира Bur/Exp/Agg имеют собственные сохраняемые шкалы и эффективные множители (см. раздел индикаторов ниже). Металличность для производства фиксируется до расходования ресурсов на звёзды. Среда бласта фиксируется для поколения до добавления его продуктов.
|
||||||
@@ -101,7 +109,7 @@ GI не хранит накопленные счётчики первичной
|
|||||||
|
|
||||||
## Первичная жизнь: HP → EON1 → … → EON5 → C0.0
|
## Первичная жизнь: HP → EON1 → … → EON5 → C0.0
|
||||||
|
|
||||||
Правила хранятся в `data/life_rules.txt`, исходные сроки и коэффициенты взяты из Unity `civs.txt`. В каждой обработанной части партии:
|
Правила встроены в `data/owniverse_life_rule_loader.gd` и загружаются через `OwniverseLifeRuleLoader`; исходные сроки и коэффициенты взяты из Unity `civs.txt`. В каждой обработанной части партии:
|
||||||
|
|
||||||
- прогресс: `count * progress + carry_progress`;
|
- прогресс: `count * progress + carry_progress`;
|
||||||
- деградация: `count * degradation + carry_degradation`;
|
- деградация: `count * degradation + carry_degradation`;
|
||||||
@@ -119,37 +127,29 @@ HP деградирует в RP. У эонов возможен откат к п
|
|||||||
|
|
||||||
## Этические и космические цивилизации
|
## Этические и космические цивилизации
|
||||||
|
|
||||||
`civilization_rules.txt` содержит 43 стадии по шесть этик из Unity. Они загружаются в `Global.CivilizationRules` и участвуют в расчёте партий. После C4.4 следует Ct: конечная стадия без новых жизненных партий.
|
`data/owniverse_civilization_rule_loader.gd` содержит 43 стадии по шесть этик из Unity. `OwniverseCivilizationRuleLoader` группирует строки по стадиям, формирует связи между ними и передаёт готовый словарь в `Global.CivilizationRules`. После C4.4 следует Ct: конечная стадия без новых жизненных партий.
|
||||||
|
|
||||||
Состояние `ethics[stage][ethic]` хранит целые количества. Для существующих цивилизаций без этик количество распределяется поровну в порядке m, l, w, d, c, b; остаток распределяется по одному в этом порядке. Существующее распределение сохраняется. При внешних потерях оно пропорционально сокращается.
|
Стадия хранит точное целое количество в физическом реестре и шесть долей `float` в `ethics[stage]`. C0.2–C4.4 не используют возрастные партии. Значение `span` задаёт средний интервал попыток: интенсивности прогресса, деградации, войны и колонизации равны соответствующим коэффициентам таблицы, делённым на эффективный `span`.
|
||||||
|
|
||||||
Цивилизации с непустым `home` (C2.0–C4.4) освобождаются от прежних привязок без изменения общего количества. Общий механизм переходов больше не переносит планетную привязку на такого преемника. Структуры назначаются отдельно в `civilization_homes`; при возвращении к планетным стадиям цивилизации размещаются у имеющихся карликовых звёзд.
|
`civilization_flow.gd` вычисляет ожидаемые потоки по состоянию начала интервала. Разреженный оператор непрерывных переходов интегрируется рядом Пуассона (uniformization): один интервал может пройти несколько последовательных стадий, включая достижение Ct. Число членов ряда зависит от интенсивности и длительности интервала, а не от количества цивилизаций. Большой интервал полностью обрабатывается частями с параметром Пуассона не более 32. Промежуточные массы и составы потоков — `float`; конечные количества распределяются целыми квотами с сохранением точной общей суммы. Доли квот округляются до 15 десятичных знаков; остатки округления сохраняются между циклами.
|
||||||
|
|
||||||
Правило среды согласовано: число космических цивилизаций ограничено звёздным ресурсом. Для стадии `i` расход ёмкости — `population[i] * max(1, Stars[i])`. Каждое семейство `Home` имеет общий бюджет для всех использующих его стадий; звёзды внутри структур также учитываются, но повторно не суммируются. SMBH учитывается по суммарной массе в эквиваленте звёзд, согласно решению пользователя.
|
Обычный дрейф этик интегрируется аналитически: уход 2% за средний интервал попыток распределяется между четырьмя не противоположными этиками. После смешивания приходящих потоков дипломатия постепенно смещает доли в соответствии с `diplomacy_rate`. Ct сохраняет этику без дрейфа. Это приближённое разделение процессов: переходы и дрейф используют один интервал, но не чередуются для каждого отдельного поколения.
|
||||||
|
|
||||||
Переход переиспользует резерв исходной стадии. При нехватке ёмкости неподдержанные переходы остаются на исходной стадии. Лимит применяется к общему механизму выходов партий и ручному созданию; расчёт прогресса C0.2+ использует тот же бюджет.
|
Войны включены в интенсивности переходов. На столкновение ожидается 17/36 успешного прогресса и 31/18 суммарных потерь сторон, разделённых на `Order`; потери распределяются по `fall`. Счётчик столкновений и колониальные попытки интегрируются по времени пребывания на каждой стадии, включая посещённые внутри интервала. Побочный ущерб 40/3 на столкновение применяется к остающейся популяции предыдущей стадии и ограничивается её количеством. Отдельных партий победителей, нападающих и жертв нет.
|
||||||
|
|
||||||
При загрузке и после эволюционных поколений избыток деградирует последовательно до поддерживаемой стадии. Приоритет получают существующие более развитые цивилизации; остаток бюджета достаётся младшим. Деградация переносит количество и этики, сокращает старые партии и регистрирует новые, не уничтожая цивилизации. C2.0 при избытке становится C1.9 и распределяется по имеющимся звёздам-карликам. Если карликов нет, C1.9 остаётся свободной — отсутствующая звезда не создаётся. Планетные стадии до C2.0 не расходуют отдельную звёздную ёмкость: у одной звезды могут быть несколько планет.
|
Колонизация агрегирует запросы по стадии назначения (на две стадии ниже отправителя), ограничивает их общим запасом GG, AB, RP и HP и заменяет ровно выделенное число планет. Целые колонии сохраняют владельца целевой планеты; состав получает дрейф 960/4/9. Исходное население не расходуется.
|
||||||
|
|
||||||
Резерв ёмкости логический: звёзды не расходуются и продолжают производить ресурсы. Общий бюджет пересчитывается из физических количеств, отдельная копия бронирований в сохранении не хранится.
|
Космические стадии C2.0–C4.4 свободны от планетных привязок. Общие бюджеты звёздных семейств и структур учитывают уже занятые резервы. Неподдерживаемый промежуточный переход блокируется в операторе; конечные положительные запросы делят свободную ёмкость одновременно. Отклонённые количества возвращаются к источнику. Освободившаяся при переходах ёмкость доступна следующему шагу. Если внешние изменения уменьшили ёмкость ниже существующего населения, избыток последовательно деградирует с приоритетом старших стадий. При возвращении в планетные стадии используются реальные карликовые звёзды, при отсутствии хозяина население остаётся свободным.
|
||||||
|
|
||||||
|
Порядок полного шага: производство за интервал → непрерывные потоки существующих цивилизаций → поколения звёзд и биологической жизни и бласты → итоговые ограничения среды → тренды. Возникшие из C0.1 цивилизации C0.2 получают равномерный профиль, смешанный с существующим населением, и начинают непрерывную эволюцию со следующего шага. Разные размеры полного шага могут отличаться из-за этого порядка, ограничений среды и нелинейных эффектов; чистая непрерывная цепочка без ограничений согласована при разделении интервала.
|
||||||
|
|
||||||
### Расчёт поколения C0.2–C4.4
|
В `civilization_remainders` сохраняются квоты и дробные остатки потоков; в `civilization_stats` — войны, колонии, побочный ущерб и поклонение. Возрастные партии сохраняются для звёзд, HP, эонов, C0.0 и C0.1.
|
||||||
|
|
||||||
1. Из истёкшей части партии пропорционально выбираются представители шести этик. Для каждой этики читаются `progress` и `degradation`; целые исходы получаются с сохранением дробных остатков. Неудавшийся из-за лимита переход возвращается на исходную стадию.
|
|
||||||
2. Прогресс ведёт на следующую стадию; деградация распределяется по весам `fall` конкретной этики. Повторные попытки не увеличивают статистику созданных цивилизаций.
|
|
||||||
3. При флаге `fights` рассчитываются войны. Веса исходов — 1:2:3:3, доли прогресса победителей — 0:0.25:0.5:0.75; первый исход деградирует атакующих. Потери противников — 2:1:1.5:2 на войну. Два последних исхода дают 10 и 30 единиц побочного ущерба предыдущей стадии. Выбор участников ограничен живой популяцией, включая ещё не сработавшие партии; их партии сокращаются вместе с населением.
|
|
||||||
4. Для обычного дрейфа веса своей/противоположной/каждой другой этики равны 196/0/1. Дипломатия умножает исходные численности на `diplomacy_rate`, затем нормирует к прежней численности. Флаг дипломатии действует на остающихся на стадии. При переходе в Ct этика сохраняется без дрейфа.
|
|
||||||
5. При флаге `colonizes` создаются колонии на две стадии ниже отправителя. Цели — существующие GG, AB, RP, HP; колонизация заменяет цель и сохраняет её звёздную привязку. Веса дрейфа колонистов — 960/4/9. Исходная цивилизация не расходуется. Новая партия начинается в текущий игровой момент.
|
|
||||||
6. После применения переходов пересчитываются этики, поклонение (`Σ population × worship`), бласты и ограничения среды. Число операций зависит от числа типов и партий, а не от числа цивилизаций.
|
|
||||||
|
|
||||||
Окна исходных партий сохраняют время переходов; несколько частей одного типа обрабатываются агрегированно между минимальным и максимальным временем. Побочный ущерб неистёкшим партиям применяется в текущий момент. Все остатки округления сохраняются в `civilization_remainders`, счётчики — в `civilization_stats`.
|
|
||||||
|
|
||||||
### Структуры и периоды
|
### Структуры и периоды
|
||||||
|
|
||||||
Прямой `claim` задаёт структуру стадии и норму 1; каждая промежуточная стадия умножает норму на 10 до следующего `claim`. Начиная с C3.0 требуется соответствующий запас структур, общий для использующих его стадий. При потере запаса избыток деградирует. Этот бюджет действует одновременно со звёздным.
|
Прямой `claim` задаёт структуру стадии и норму 1; каждая промежуточная стадия умножает норму на 10 до следующего `claim`. Начиная с C3.0 требуется соответствующий запас структур, общий для использующих его стадий. При потере запаса избыток деградирует. Этот бюджет действует одновременно со звёздным.
|
||||||
|
|
||||||
Размещение выбирает структуры в порядке убывания `civ_bonus`, начиная с соответствующего стадии `claim`. Прямое размещение ограничено числом структур; остальные разрешённые структуры при наличии дают общий бонус, как в Unity. Период новых партий равен `span / средневзвешенный civ_bonus`, для неразмещённой части множитель равен 1. Уже назначенные сроки партий не переписываются при изменении бонуса.
|
Размещение выбирает структуры в порядке убывания `civ_bonus`, начиная с соответствующего стадии `claim`. Прямое размещение ограничено числом структур; остальные разрешённые структуры при наличии дают общий бонус, как в Unity. Эффективный средний интервал попыток равен `span / средневзвешенный civ_bonus`, для неразмещённой части множитель равен 1. Бонус входит в оператор следующего расчётного интервала.
|
||||||
|
|
||||||
Ct не получает часы. Инициализация отсутствующих партий жизни выполняется при загрузке и перед продвижением симуляции. Параметры мира и тенденции описаны ниже; интерфейс применения сил в этот перенос не входит.
|
Ct не получает часы. Инициализация отсутствующих партий жизни выполняется при загрузке и перед продвижением симуляции. Параметры мира и тенденции описаны ниже; интерфейс применения сил в этот перенос не входит.
|
||||||
|
|
||||||
@@ -206,3 +206,26 @@ Ct не получает часы. Инициализация отсутству
|
|||||||
При достижении 1 учитываются все целые срабатывания, дробный остаток сохраняется. Только Integration имеет последствия в исходной Unity: равновероятно выбирается Federation (+0,1 и Agg −1), Enlightenment (+0,2 и Agg −1) или Order (+0,1). Генератор сохраняет своё состояние. До 256 событий за шаг выбор выполняется по одному; для больших количеств используется нормальная аппроксимация мультиномиального распределения с сохранением точного суммарного числа событий, чтобы высокие скорости не блокировали кадр. Она может менять последовательность исходов при другом разбиении больших интервалов.
|
При достижении 1 учитываются все целые срабатывания, дробный остаток сохраняется. Только Integration имеет последствия в исходной Unity: равновероятно выбирается Federation (+0,1 и Agg −1), Enlightenment (+0,2 и Agg −1) или Order (+0,1). Генератор сохраняет своё состояние. До 256 событий за шаг выбор выполняется по одному; для больших количеств используется нормальная аппроксимация мультиномиального распределения с сохранением точного суммарного числа событий, чтобы высокие скорости не блокировали кадр. Она может менять последовательность исходов при другом разбиении больших интервалов.
|
||||||
|
|
||||||
Federation сохраняется и увеличивается как в Unity, но в исходном коде не применяется к дипломатии. Дополнительное правило для него не придумано. Остальные четыре тенденции имеют счётчики срабатываний и сброс, но не последствия — так же, как в исходной реализации. Параметры и остатки тенденций сохраняются; у существующего сохранения текущего формата без этих полей используются нейтральные значения и нулевые тенденции, без изменения ресурсов или возраста.
|
Federation сохраняется и увеличивается как в Unity, но в исходном коде не применяется к дипломатии. Дополнительное правило для него не придумано. Остальные четыре тенденции имеют счётчики срабатываний и сброс, но не последствия — так же, как в исходной реализации. Параметры и остатки тенденций сохраняются; у существующего сохранения текущего формата без этих полей используются нейтральные значения и нулевые тенденции, без изменения ресурсов или возраста.
|
||||||
|
|
||||||
|
## Дополнительные параметры
|
||||||
|
|
||||||
|
Рабочая таблица встроена в `data/owniverse_extra_param_loader.gd` как `const DATA`,
|
||||||
|
по аналогии с остальными таблицами. В `Global._init()` вызывается get_data() до создания главной сцены:
|
||||||
|
CSVLoader разбирает строки, колонка `param export` преобразуется через E.of.
|
||||||
|
Результат хранится только в `Global.ExtraParams`. После редактирования таблицы
|
||||||
|
требуется перезапуск игры; отдельного CSV и статического кэша загрузчика нет.
|
||||||
|
|
||||||
|
Из таблицы берутся начальная энергия E, добавочная масса DA, коэффициент NPC,
|
||||||
|
размер пустот VoidSize, показатель степени combustibility_bonus для горючести
|
||||||
|
выше единицы, пороги bigrip1–3 и bigcrunch1–3. Интервалы индикатора плотности
|
||||||
|
вычисляются из тех же порогов, без дублирующих числовых констант.
|
||||||
|
Начальная энергия относится к новым вселенным; запас энергии существующей
|
||||||
|
вселенной остаётся частью её сохранения.
|
||||||
|
|
||||||
|
G, C, PI, helium_multiplier, helium_bonus_limit, space_generation, ChatPerTick
|
||||||
|
и параметры ForceBox загружаются, но пока не используются в GI: соответствующие
|
||||||
|
формулы и механики старой Unity-версии здесь отсутствуют. Производство объектов
|
||||||
|
в GI задаётся их собственной таблицей life_product и lifespan.
|
||||||
|
|
||||||
|
`tests/test_extra_params.gd` проверяет загрузку точных чисел и изменение энергии,
|
||||||
|
плотности, объёма пустот, порогов индикатора и бонуса горючести.
|
||||||
|
|||||||
+49
-7
@@ -9,6 +9,10 @@ const ItemDescription = preload("res://world/owniverse/item_description.gd")
|
|||||||
const WorldIndicators = preload("res://ui/indicators/world_indicators.gd")
|
const WorldIndicators = preload("res://ui/indicators/world_indicators.gd")
|
||||||
var world_indicators: RefCounted
|
var world_indicators: RefCounted
|
||||||
var indicator_elapsed: float = 0.0
|
var indicator_elapsed: float = 0.0
|
||||||
|
var indicator_revision: int = -1
|
||||||
|
var actions_revision: int = -1
|
||||||
|
var descriptions_revision: int = -1
|
||||||
|
var displayed_year: Variant = null
|
||||||
var description_targets: Dictionary = {}
|
var description_targets: Dictionary = {}
|
||||||
var description_samples: Dictionary = {}
|
var description_samples: Dictionary = {}
|
||||||
var description_rates: Dictionary = {}
|
var description_rates: Dictionary = {}
|
||||||
@@ -64,6 +68,7 @@ const SWIPE_DURATION: float = 0.4
|
|||||||
|
|
||||||
@onready var g_time_minus: TextureButton = $World/TopMenu/TimeMinus
|
@onready var g_time_minus: TextureButton = $World/TopMenu/TimeMinus
|
||||||
@onready var g_time_plus: TextureButton = $World/TopMenu/TimePlus
|
@onready var g_time_plus: TextureButton = $World/TopMenu/TimePlus
|
||||||
|
@onready var effects_player: OwniverseEffectsPlayer = $"../FXPlayer"
|
||||||
|
|
||||||
@onready var screens: Dictionary = {
|
@onready var screens: Dictionary = {
|
||||||
"World": $World,
|
"World": $World,
|
||||||
@@ -93,6 +98,7 @@ var g_active_items: Dictionary = {}
|
|||||||
var pending_page: int = -1
|
var pending_page: int = -1
|
||||||
var active_actions_dirty: bool = true
|
var active_actions_dirty: bool = true
|
||||||
var active_actions_elapsed: float = 0.0
|
var active_actions_elapsed: float = 0.0
|
||||||
|
var interface_sounds_enabled: bool = false
|
||||||
|
|
||||||
var owniverse:Owniverse = Owniverse.new()
|
var owniverse:Owniverse = Owniverse.new()
|
||||||
var owniverse_items: Dictionary[String, OwniverseItem] = {}
|
var owniverse_items: Dictionary[String, OwniverseItem] = {}
|
||||||
@@ -157,6 +163,11 @@ func _update_descriptions(delta: float) -> void:
|
|||||||
description_elapsed += delta
|
description_elapsed += delta
|
||||||
if description_elapsed < 0.25:
|
if description_elapsed < 0.25:
|
||||||
return
|
return
|
||||||
|
if descriptions_revision == owniverse.presentation.revision:
|
||||||
|
var has_rate: bool = false
|
||||||
|
for rate in description_rates.values(): has_rate = has_rate or E.ne(rate, 0)
|
||||||
|
if not has_rate: return
|
||||||
|
descriptions_revision = owniverse.presentation.revision
|
||||||
for page in description_targets:
|
for page in description_targets:
|
||||||
var id: String = description_targets[page].id
|
var id: String = description_targets[page].id
|
||||||
var total = ItemDescription.quantities(owniverse, id).total
|
var total = ItemDescription.quantities(owniverse, id).total
|
||||||
@@ -263,12 +274,14 @@ func _swipe_to_nearest_page() -> void:
|
|||||||
|
|
||||||
func _input(event: InputEvent) -> void:
|
func _input(event: InputEvent) -> void:
|
||||||
if event is InputEventScreenDrag:
|
if event is InputEventScreenDrag:
|
||||||
|
#effects_player.play_effect("swipe")
|
||||||
stage_page_scroller.scroll_horizontal = clamp(
|
stage_page_scroller.scroll_horizontal = clamp(
|
||||||
stage_page_scroller.scroll_horizontal - PAGE_COUNT * event.screen_relative.x,
|
stage_page_scroller.scroll_horizontal - PAGE_COUNT * event.screen_relative.x,
|
||||||
0, PAGE_WIDTH * (PAGE_COUNT - 1))
|
0, PAGE_WIDTH * (PAGE_COUNT - 1))
|
||||||
g_counters.swipe.is_active = true
|
g_counters.swipe.is_active = true
|
||||||
g_counters.swipe.value = 0
|
g_counters.swipe.value = 0
|
||||||
elif event is InputEventPanGesture:
|
elif event is InputEventPanGesture:
|
||||||
|
#effects_player.play_effect("swipe")
|
||||||
g_counters.swipe.is_active = true
|
g_counters.swipe.is_active = true
|
||||||
g_counters.swipe.value = 0
|
g_counters.swipe.value = 0
|
||||||
elif event is InputEventScreenTouch:
|
elif event is InputEventScreenTouch:
|
||||||
@@ -320,6 +333,11 @@ func _ready() -> void:
|
|||||||
for pa in page_actions:
|
for pa in page_actions:
|
||||||
page_actions[pa].action_pressed.connect(_page_action_pressed)
|
page_actions[pa].action_pressed.connect(_page_action_pressed)
|
||||||
page_actions[pa].page_id = pa
|
page_actions[pa].page_id = pa
|
||||||
|
_enable_interface_sounds.call_deferred()
|
||||||
|
|
||||||
|
|
||||||
|
func _enable_interface_sounds() -> void:
|
||||||
|
interface_sounds_enabled = true
|
||||||
|
|
||||||
|
|
||||||
## Starts a fresh universe. Can be connected directly to a button's pressed signal.
|
## Starts a fresh universe. Can be connected directly to a button's pressed signal.
|
||||||
@@ -338,6 +356,10 @@ func create_new_universe() -> void:
|
|||||||
g_tween.kill()
|
g_tween.kill()
|
||||||
g_active_items.clear()
|
g_active_items.clear()
|
||||||
description_targets.clear()
|
description_targets.clear()
|
||||||
|
indicator_revision = -1
|
||||||
|
actions_revision = -1
|
||||||
|
descriptions_revision = -1
|
||||||
|
displayed_year = null
|
||||||
description_samples.clear()
|
description_samples.clear()
|
||||||
description_rates.clear()
|
description_rates.clear()
|
||||||
description_elapsed = 0.0
|
description_elapsed = 0.0
|
||||||
@@ -371,12 +393,15 @@ func _process(delta: float) -> void:
|
|||||||
|
|
||||||
owniverse.evolute_frame(delta, get_tree())
|
owniverse.evolute_frame(delta, get_tree())
|
||||||
indicator_elapsed += delta
|
indicator_elapsed += delta
|
||||||
if indicator_elapsed >= 0.1:
|
if indicator_elapsed >= 0.1 and indicator_revision != owniverse.presentation.revision:
|
||||||
indicator_elapsed = 0.0
|
indicator_elapsed = 0.0
|
||||||
world_indicators.update(owniverse)
|
world_indicators.update(owniverse)
|
||||||
|
indicator_revision = owniverse.presentation.revision
|
||||||
_update_descriptions(delta)
|
_update_descriptions(delta)
|
||||||
set_owniverse_item_value()
|
if not owniverse.presentation.pending_amounts.is_empty(): set_owniverse_item_value()
|
||||||
set_datetime(owniverse.state.time.year)
|
if displayed_year == null or E.ne(displayed_year, owniverse.state.time.year):
|
||||||
|
set_datetime(owniverse.state.time.year)
|
||||||
|
displayed_year = owniverse.state.time.year
|
||||||
|
|
||||||
#owniverse.cycle(delta)
|
#owniverse.cycle(delta)
|
||||||
|
|
||||||
@@ -388,17 +413,23 @@ func _process(delta: float) -> void:
|
|||||||
# them when selection changes and at a modest cadence instead of every
|
# them when selection changes and at a modest cadence instead of every
|
||||||
# rendered frame. The simulation itself continues to run every frame.
|
# rendered frame. The simulation itself continues to run every frame.
|
||||||
active_actions_elapsed += delta
|
active_actions_elapsed += delta
|
||||||
if active_actions_dirty or active_actions_elapsed >= 0.1:
|
if active_actions_dirty or (active_actions_elapsed >= 0.1 and actions_revision != owniverse.presentation.revision):
|
||||||
active_actions_elapsed = 0.0
|
active_actions_elapsed = 0.0
|
||||||
active_actions_dirty = false
|
active_actions_dirty = false
|
||||||
_set_active_page_actions()
|
_set_active_page_actions()
|
||||||
|
actions_revision = owniverse.presentation.revision
|
||||||
|
|
||||||
|
|
||||||
func _change_speed(delta: int) -> void:
|
func _change_speed(delta: int) -> void:
|
||||||
|
var previous_speed: int = owniverse.speed
|
||||||
owniverse.speed = owniverse.speed + delta
|
owniverse.speed = owniverse.speed + delta
|
||||||
|
|
||||||
var speed: int = owniverse.speed
|
var speed: int = owniverse.speed
|
||||||
|
if speed > previous_speed:
|
||||||
|
effects_player.play_effect("time_plus")
|
||||||
|
elif speed < previous_speed:
|
||||||
|
effects_player.play_effect("time_minus")
|
||||||
|
|
||||||
var ind: int = 1
|
var ind: int = 1
|
||||||
for icon in g_speed_icons:
|
for icon in g_speed_icons:
|
||||||
if ind <= speed:
|
if ind <= speed:
|
||||||
@@ -418,6 +449,17 @@ func _change_speed(delta: int) -> void:
|
|||||||
|
|
||||||
|
|
||||||
func _on_topmenu_button_pressed(screen_name: String) -> void:
|
func _on_topmenu_button_pressed(screen_name: String) -> void:
|
||||||
|
var current_screen: String = ""
|
||||||
|
for screen_id in screens:
|
||||||
|
if screens[screen_id].visible:
|
||||||
|
current_screen = screen_id
|
||||||
|
break
|
||||||
|
|
||||||
|
if current_screen == screen_name:
|
||||||
|
return
|
||||||
|
|
||||||
|
if interface_sounds_enabled:
|
||||||
|
effects_player.play_effect("window_close" if screen_name == "World" else "window_open")
|
||||||
|
|
||||||
for screen_id in screens:
|
for screen_id in screens:
|
||||||
#print(screen_name, " ←→ ", screen_id)
|
#print(screen_name, " ←→ ", screen_id)
|
||||||
@@ -443,8 +485,8 @@ func load_data() -> bool:
|
|||||||
# Current definitions are initialized first; reject incompatible saves before publishing.
|
# Current definitions are initialized first; reject incompatible saves before publishing.
|
||||||
for id in owniverse.state.amount:
|
for id in owniverse.state.amount:
|
||||||
if not restored.amount.has(id) or not restored.stats.total_amount.has(id):
|
if not restored.amount.has(id) or not restored.stats.total_amount.has(id):
|
||||||
SaveManager.blocked_saves["owniverse"] = true
|
push_warning("Save is missing the current entity: " + id)
|
||||||
push_error("Save is missing the current entity: " + id)
|
SaveManager.archive_incompatible_save("owniverse")
|
||||||
return false
|
return false
|
||||||
var complete: Dictionary = owniverse.state.duplicate(true)
|
var complete: Dictionary = owniverse.state.duplicate(true)
|
||||||
complete.merge(restored, true)
|
complete.merge(restored, true)
|
||||||
|
|||||||
+137
-3
@@ -1,5 +1,24 @@
|
|||||||
# Проверки поэтапного переноса из Owniverse.U
|
# Проверки поэтапного переноса из Owniverse.U
|
||||||
|
|
||||||
|
`test_simulation_optimizations.gd` сравнивает прямые формулы дрейфа с прежней
|
||||||
|
матрицей, включая целые количества больше E27 и накопленные остатки.
|
||||||
|
Тестовый ledger сверяет выборочное округление с полным на каждом поколении
|
||||||
|
нагруженной симуляции. `test_ui_updates.gd` проверяет обновление по публикации,
|
||||||
|
выбору объекта и изменению параметров мира, а также пропуск повторных расчётов
|
||||||
|
для неизменившегося состояния.
|
||||||
|
|
||||||
|
Динамический размер партий проверяется в `test_batch_boundaries.gd`: скорости
|
||||||
|
1–6, сохранение больших целых количеств и дробных остатков, повторное
|
||||||
|
укрупнение и снижение скорости. Высокие скорости допускают приближение
|
||||||
|
времени переходов; сравнение со старым состоянием целиком не является
|
||||||
|
проверкой эквивалентности такого режима.
|
||||||
|
|
||||||
|
`test_coarse_generations.gd` проверяет отсутствие повторного перехода C0.0,
|
||||||
|
C0.1 и C0.2 внутри одного интервала, старое смещение сетки партий,
|
||||||
|
продолжение эволюции в следующем интервале, большие целые количества и
|
||||||
|
дробные остатки. `test_frame_evolution.gd` сравнивает целый и разбитый по
|
||||||
|
кадрам расчёт, включая возобновление сохранённого незавершённого шага.
|
||||||
|
|
||||||
## Производительность на сохранении
|
## Производительность на сохранении
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
@@ -103,7 +122,41 @@ godot --headless --path Owniverse.GI --script res://tests/test_time.gd
|
|||||||
|
|
||||||
## Согласованные правила эволюции
|
## Согласованные правила эволюции
|
||||||
|
|
||||||
Сохраняются постепенные интервальные окна GI: начало преобразования — через `lifespan`, длительность окна — `lifespan / 40` при `lifespan > 10`, иначе `lifespan`.
|
Сохраняются постепенные интервальные окна GI: срок жизни делится на 40 возрастных групп; начало преобразования — через `lifespan`, длительность окна — `lifespan / 40` при `lifespan > 10`, иначе `lifespan`.
|
||||||
|
|
||||||
|
На скоростях 4–6 узкие звёздные партии могут объединяться по границе полного
|
||||||
|
цикла смерти шириной 200/2000/20000 игровых лет. Прежнее окно шире цикла
|
||||||
|
сохраняется: долгоживущие звёзды не дробятся. Из существующих партий сливаются
|
||||||
|
только две или более одного типа, чей оставшийся переход полностью попадает
|
||||||
|
в общий цикл; широкие и пересекающие границу партии сохраняются.
|
||||||
|
`test_batch_boundaries` проверяет объединение, точные большие количества и
|
||||||
|
остатки, однократное изъятие, сериализацию, сохранение широких окон,
|
||||||
|
распределённые рождения и интеграл производства.
|
||||||
|
|
||||||
|
`benchmark_large_star_cohorts.gd` создаёт отдельные большие диагностические
|
||||||
|
сохранения со старой и новой звёздной сеткой при одинаковых количествах и
|
||||||
|
входных интервалах рождения. Переключатель `batches.cycle_stars` используется
|
||||||
|
только для сравнительного замера, в игре он включён. Парные прогоны меняют
|
||||||
|
порядок моделей и сбрасывают исходное состояние перед каждым запуском:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
godot --headless --path Owniverse.GI --script res://tests/benchmark_large_star_cohorts.gd -- cycles=50 repeats=2
|
||||||
|
```
|
||||||
|
|
||||||
|
Сохранения и полные профили записываются в `tests/artifacts/large_star_cohorts_*`;
|
||||||
|
сохранение игрока не затрагивается. `generate_only` проверяет запись/чтение и
|
||||||
|
исходное равенство физических количеств без запуска замеров.
|
||||||
|
|
||||||
|
`benchmark_many_objects.gd` создаёт новую диагностическую вселенную со всеми
|
||||||
|
типами объектов и цивилизаций и 4800 синтетическими звёздными партиями,
|
||||||
|
попадающими группами в общие циклы. Это отдельный стресс-сценарий большого
|
||||||
|
числа партий; старый и новый расчёты используют одинаковый исходный состав.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
godot --headless --path Owniverse.GI --script res://tests/benchmark_many_objects.gd -- cycles=40 repeats=2
|
||||||
|
```
|
||||||
|
|
||||||
|
Файлы сценария: `tests/artifacts/many_objects_fragmented_stars_*`.
|
||||||
|
|
||||||
Вероятностные исходы используют накопление дробного остатка GI, без случайного округления. Этот же подход выбран для будущего создания планет. Шансы планет записаны долями (`0.01` = 1%), а альтернативные исходы звёзд — процентами (`%0.1` = 0.1%). Парсер планет сохраняет дроби и поддерживает один элемент без `&`.
|
Вероятностные исходы используют накопление дробного остатка GI, без случайного округления. Этот же подход выбран для будущего создания планет. Шансы планет записаны долями (`0.01` = 1%), а альтернативные исходы звёзд — процентами (`%0.1` = 0.1%). Парсер планет сохраняет дроби и поддерживает один элемент без `&`.
|
||||||
|
|
||||||
@@ -190,8 +243,7 @@ godot --path Owniverse.GI --script res://tests/benchmark_civilizations.gd -- ui
|
|||||||
Stage вызывает `evolute_frame`: транзакция получает бюджет 40 мс и уступает
|
Stage вызывает `evolute_frame`: транзакция получает бюджет 40 мс и уступает
|
||||||
следующему кадру внутри создания партий и обработки стадий. Расчёт остаётся
|
следующему кадру внутри создания партий и обработки стадий. Расчёт остаётся
|
||||||
на главном потоке, состояние публикуется только после полного завершения.
|
на главном потоке, состояние публикуется только после полного завершения.
|
||||||
Длительность одной транзакции ограничена обычным шагом 1/60 секунды выбранной
|
Одна транзакция обрабатывает 0,2 реальной секунды на любой скорости. Запрошенное время хранится отдельно, поэтому отставание не превращается
|
||||||
скорости. Запрошенное время хранится отдельно, поэтому отставание не превращается
|
|
||||||
в один всё более тяжёлый шаг. При предельной нагрузке время симуляции может
|
в один всё более тяжёлый шаг. При предельной нагрузке время симуляции может
|
||||||
отставать от запрошенного; это не ограничение FPS интерфейса и не удаление событий.
|
отставать от запрошенного; это не ограничение FPS интерфейса и не удаление событий.
|
||||||
|
|
||||||
@@ -205,3 +257,85 @@ Stage вызывает `evolute_frame`: транзакция получает б
|
|||||||
15.9 FPS (максимальный кадр 98 мс), большие количества 17.5 FPS (106 мс),
|
15.9 FPS (максимальный кадр 98 мс), большие количества 17.5 FPS (106 мс),
|
||||||
много партий 16.3 FPS (97 мс).
|
много партий 16.3 FPS (97 мс).
|
||||||
Это FPS отрисовки, а не число завершённых транзакций симуляции в секунду.
|
Это FPS отрисовки, а не число завершённых транзакций симуляции в секунду.
|
||||||
|
|
||||||
|
Индекс партий переиспользуется внутри одной транзакции, отдельно для каждого
|
||||||
|
массива партий. Замена массива при изъятии или переход к другому состоянию
|
||||||
|
сбрасывает индекс. Сортировка выполняется при нарушении порядка новых окон,
|
||||||
|
а не после каждого добавления в уже существующее окно. `test_batch_boundaries`
|
||||||
|
проверяет объединение, раннюю вставку, замену массива и изоляцию состояний.
|
||||||
|
На копии текущего сохранения с 785 партиями шесть шагов на скорости 6:
|
||||||
|
среднее время 167 → 145 мс; полное состояние после шести шагов совпало точно.
|
||||||
|
|
||||||
|
Следующий этап исключает арифметическую работу при прибавлении нуля,
|
||||||
|
временные знаменатели при умножении целых блоков и нулевые вклады этик.
|
||||||
|
На той же копии сохранения среднее время шага скорости 6 снизилось с 145
|
||||||
|
до 138 мс; полный результат после шести шагов совпал с исходным состоянием.
|
||||||
|
Тест появления разума задаёт свой progress явно, поскольку проверяет
|
||||||
|
сохранение хозяина планеты, а не актуальное значение коэффициента баланса.
|
||||||
|
|
||||||
|
Следующие шесть оптимизаций: однократное изъятие умирающих партий;
|
||||||
|
поверхностные снимки неизменяемых таблиц связей; пропуск планирования
|
||||||
|
цивилизаций без переходов; кэш нормализованных этик и произведений поклонения;
|
||||||
|
пропуск укрупнения для нуля/одной партии; кэш вероятностей переходов.
|
||||||
|
Кэши принадлежат миру и не входят в сохранение. Изменение количества,
|
||||||
|
этик, коэффициентов правил или модификаторов обнаруживается по значениям.
|
||||||
|
Суммирование поклонения сохраняет прежний порядок дробных операций.
|
||||||
|
`test_simulation_optimizations` проверяет также обновление этих кэшей.
|
||||||
|
|
||||||
|
Полное состояние совпало с реализацией до этих шести изменений после каждого
|
||||||
|
из восьми шагов на скоростях 1, 4 и 6, отдельно на большом фрагментированном
|
||||||
|
сценарии и на диагностической копии сохранения (48 сравнений).
|
||||||
|
На M4 Pro шесть шагов по 0.1 секунды скорости 6: 103.3 мс первый,
|
||||||
|
70.9–76.0 мс последующие; пропускная способность без UI 1.278.
|
||||||
|
Замер 600 кадров с реальным UI: 12.24 FPS, p95 97.16 мс, максимум 104.86 мс,
|
||||||
|
520 завершённых транзакций, отношение обработанного времени к поступившему
|
||||||
|
1.057. Замер включает сокращение накопленного отставания сохранения;
|
||||||
|
это результат конкретного сценария на Mac, а не гарантия для Android.
|
||||||
|
|
||||||
|
Полный шаг фиксирован: 0,2 реальной секунды на всех скоростях, пять циклов
|
||||||
|
на секунду запрошенного времени. Неполный интервал накапливается. При отставании
|
||||||
|
шаг сохраняется, долг не отбрасывается. Возобновляемая транзакция сохраняет
|
||||||
|
границу из checkpoint. Бюджет кадра остаётся 40 мс. `test_frame_evolution`
|
||||||
|
проверяет расписание всех шести скоростей, сохранение долга и пять циклов
|
||||||
|
на одну секунду.
|
||||||
|
|
||||||
|
Дипломатический drift использует шесть взвешенных вкладов вместо матрицы
|
||||||
|
пар этик: вес = сумма вкладов + 195 × свой вклад − противоположный вклад.
|
||||||
|
Для колониальной матрицы коэффициенты 9, 951 и 5 соответственно.
|
||||||
|
Целая численность и механизм сохранения ошибок распределения не меняются,
|
||||||
|
но порядок операций над дробными весами отличается от матричного варианта.
|
||||||
|
Тест сравнивает с матрицей на точно представимых коэффициентах и проверяет
|
||||||
|
целочисленное сохранение популяций до 1e40 на десятичных коэффициентах.
|
||||||
|
Пустые популяции пропускают drift; численность выходов суммируется один раз.
|
||||||
|
На профильной копии при шаге 0.5 число вызовов снизилось 1038 → 849
|
||||||
|
за шесть шагов, но время drift осталось около 303 мс суммарно;
|
||||||
|
заметного ускорения полного расчёта в этом сценарии не зафиксировано.
|
||||||
|
|
||||||
|
`test_split_optimizations.gd` сравнивает распределение и все сохранённые
|
||||||
|
остатки с прежним scalar split в последовательных вызовах: пустые ветви,
|
||||||
|
единственная ветвь, равные веса, десятичные веса, положительные/отрицательные
|
||||||
|
остатки, количества до 1e80. Также проверяет grouped mul_div против scalar.
|
||||||
|
Split переиспользует разложение количества и знаменателя между ветвями,
|
||||||
|
кэширует ключи остатков (не более 512 наборов) и получает веса дрифта массивом.
|
||||||
|
Вторая нормализация пропускается только при целых долях с нужной суммой:
|
||||||
|
при дробях даже единичное отношение может изменить округление, поэтому
|
||||||
|
прежний путь сохраняется. Единственная положительная ветвь обрабатывается
|
||||||
|
напрямую только при целом количестве, неотрицательных весах и нулевых остатках.
|
||||||
|
На профильной копии время drift за шесть шагов 0.5 снизилось примерно
|
||||||
|
303 → 287 мс, но общее время осталось около 1.31 секунды.
|
||||||
|
|
||||||
|
Обычный drift сокращает целое количество из отношения
|
||||||
|
count*weight/(200*count), колониальный — из отношения с 1000.
|
||||||
|
Целая часть делится на малый знаменатель; для дроби используются исходные
|
||||||
|
масштабированные числитель и знаменатель, чтобы сохранить float округление.
|
||||||
|
`test_split_optimizations` проверяет совпадение со scalar mul_div до 1e80.
|
||||||
|
Производство новорождённых сохраняет только created_from → amount вместо
|
||||||
|
глубокой копии партий. Повторное мгновенное рождение с теми же сроками,
|
||||||
|
длительностью и сеткой сразу добавляется в найденную партию.
|
||||||
|
Индекс ближайшей границы позволяет повторным проходам пропускать будущие
|
||||||
|
партии; замена массива, добавление и масштабирование сбрасывают индекс.
|
||||||
|
Тест границ проверяет объединение и сброс обоих индексов.
|
||||||
|
Адаптивный шаг дополнительно учитывает сглаженное отношение реальной
|
||||||
|
длительности транзакции к обработанному времени. Если отношение выше 0.85
|
||||||
|
и долг больше одного шага, ступень увеличивается раньше порога двух шагов.
|
||||||
|
Долг и граница сохраняются как прежде; измерения являются временным кэшем.
|
||||||
|
|||||||
@@ -0,0 +1,110 @@
|
|||||||
|
extends Control
|
||||||
|
|
||||||
|
const E = preload("res://world/owniverse/math/exact.gd")
|
||||||
|
const RESULT_PATH := "user://android_benchmark_result.txt"
|
||||||
|
const FRAME_COUNT := 120
|
||||||
|
|
||||||
|
var status_label: Label
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
status_label = Label.new()
|
||||||
|
status_label.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
|
||||||
|
status_label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
||||||
|
status_label.vertical_alignment = VERTICAL_ALIGNMENT_CENTER
|
||||||
|
status_label.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
|
||||||
|
status_label.add_theme_font_size_override("font_size", 32)
|
||||||
|
add_child(status_label)
|
||||||
|
call_deferred("_run")
|
||||||
|
|
||||||
|
func _set_status(message: String) -> void:
|
||||||
|
status_label.text = message
|
||||||
|
var file := FileAccess.open(RESULT_PATH, FileAccess.WRITE)
|
||||||
|
if file != null:
|
||||||
|
file.store_line(message)
|
||||||
|
file.flush()
|
||||||
|
|
||||||
|
func _restore(value):
|
||||||
|
if value is float and value == floorf(value) and absf(value) <= 9007199254740991:
|
||||||
|
return int(value)
|
||||||
|
if value is Dictionary:
|
||||||
|
for key in value:
|
||||||
|
value[key] = _restore(value[key])
|
||||||
|
elif value is Array:
|
||||||
|
for index in value.size():
|
||||||
|
value[index] = _restore(value[index])
|
||||||
|
return value
|
||||||
|
|
||||||
|
func _load_payload_threaded() -> Dictionary:
|
||||||
|
var file := FileAccess.open("res://tests/artifacts/all_objects_speed6.adventure.json", FileAccess.READ)
|
||||||
|
if file == null:
|
||||||
|
return {"error": "Cannot open benchmark save: %s" % FileAccess.get_open_error()}
|
||||||
|
var parser := JSON.new()
|
||||||
|
var error := parser.parse(file.get_as_text())
|
||||||
|
if error != OK:
|
||||||
|
return {"error": "JSON parse error at line %d: %s" % [parser.get_error_line(), parser.get_error_message()]}
|
||||||
|
var data = E.decode(_restore(parser.data))
|
||||||
|
if not data is Dictionary or not data.has("state"):
|
||||||
|
return {"error": "Benchmark save has no state"}
|
||||||
|
return {"payload": data}
|
||||||
|
|
||||||
|
func _run() -> void:
|
||||||
|
_set_status("Reading and decoding benchmark save on a worker thread…")
|
||||||
|
var worker := Thread.new()
|
||||||
|
var start_error := worker.start(Callable(self, "_load_payload_threaded"))
|
||||||
|
if start_error != OK:
|
||||||
|
_set_status("ERROR: could not start loader thread (%s)" % start_error)
|
||||||
|
return
|
||||||
|
while worker.is_alive():
|
||||||
|
await get_tree().process_frame
|
||||||
|
var loaded: Dictionary = worker.wait_to_finish()
|
||||||
|
if loaded.has("error"):
|
||||||
|
_set_status("ERROR: " + str(loaded.error))
|
||||||
|
return
|
||||||
|
_set_status("Save decoded. Initializing UI scene…")
|
||||||
|
var payload: Dictionary = loaded.payload
|
||||||
|
var scene: Node = load("res://world/world.tscn").instantiate()
|
||||||
|
var stage = scene.get_node("Stage")
|
||||||
|
stage.owniverse.free()
|
||||||
|
stage.set_script(load("res://tests/fixtures/benchmark_ui_stage.gd"))
|
||||||
|
get_tree().root.add_child(scene)
|
||||||
|
await get_tree().process_frame
|
||||||
|
stage.owniverse.state = payload.state.duplicate(true)
|
||||||
|
stage.owniverse.restore_frame_checkpoint(payload.get("simulation", {}))
|
||||||
|
stage.owniverse.presentation.refresh(stage.owniverse.state, stage.owniverse.catalog)
|
||||||
|
stage.set_owniverse_item_value()
|
||||||
|
stage.stage_page_scroller.scroll_horizontal = 4 * stage.PAGE_WIDTH
|
||||||
|
var initial_requested = stage.owniverse.frame_clock.get("datetime", stage.owniverse.state.time.datetime)
|
||||||
|
var initial_published = stage.owniverse.state.time.datetime
|
||||||
|
stage.owniverse.profile_enabled = true
|
||||||
|
stage.measuring = true
|
||||||
|
_set_status("Running speed 6: 0/%d frames" % FRAME_COUNT)
|
||||||
|
for frame in FRAME_COUNT:
|
||||||
|
await get_tree().process_frame
|
||||||
|
if frame % 5 == 4:
|
||||||
|
_set_status("Running speed 6: %d/%d frames; commits=%d" % [frame + 1, FRAME_COUNT, stage.owniverse.frame_commits])
|
||||||
|
stage.measuring = false
|
||||||
|
var samples: Array = stage.frame_samples
|
||||||
|
if samples.is_empty():
|
||||||
|
_set_status("ERROR: no rendered frame samples; frames=%d" % stage.frame_samples.size())
|
||||||
|
return
|
||||||
|
var total: float = 0.0
|
||||||
|
for sample in samples:
|
||||||
|
total += sample
|
||||||
|
samples.sort()
|
||||||
|
var requested_advance = E.subtract(stage.owniverse.frame_clock.datetime, initial_requested)
|
||||||
|
var published_advance = E.subtract(stage.owniverse.state.time.datetime, initial_published)
|
||||||
|
var process_samples: Array = stage.process_samples
|
||||||
|
process_samples.sort()
|
||||||
|
var process_total: float = 0.0
|
||||||
|
for sample in process_samples:
|
||||||
|
process_total += sample
|
||||||
|
var process_summary := "no _process samples"
|
||||||
|
if not process_samples.is_empty():
|
||||||
|
process_summary = "mean=%.2fms p95=%.2fms max=%.2fms samples=%d" % [process_total / process_samples.size(), process_samples[int(ceil(process_samples.size() * 0.95)) - 1], process_samples.back(), process_samples.size()]
|
||||||
|
var budget: Variant = stage.owniverse.frame_budget
|
||||||
|
var max_slice_summary: String = "none"
|
||||||
|
if budget != null:
|
||||||
|
max_slice_summary = "%.2fms (%s)" % [budget.max_slice_usec / 1000.0, budget.max_slice_phase]
|
||||||
|
var result := "DONE\nFPS=%.2f mean=%.2fms p95=%.2fms max=%.2fms frames=%d commits=%d\nStage _process CPU: %s\nMax uninterrupted simulation slice: %s\nRequested=%s published=%s throughput=%s\nFinal adaptive step=%s\nProfile=%s" % [1000.0 / (total / samples.size()), total / samples.size(), samples[int(ceil(samples.size() * 0.95)) - 1], samples.back(), samples.size(), stage.owniverse.frame_commits, process_summary, max_slice_summary, str(requested_advance), str(published_advance), str(E.divide(published_advance, requested_advance)), str(stage.owniverse.frame_step_seconds), str(stage.owniverse.profile)]
|
||||||
|
_set_status(result)
|
||||||
|
get_tree().quit()
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://dkbyhj8ib0eyf
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
[gd_scene load_steps=2 format=3]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://tests/android_benchmark.gd" id="1"]
|
||||||
|
|
||||||
|
[node name="AndroidBenchmark" type="Control"]
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
script = ExtResource("1")
|
||||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,381 @@
|
|||||||
|
# Все объекты, скорость 6
|
||||||
|
|
||||||
|
Создано скриптом `tests/create_full_benchmark_save.gd`. Пароль нативного сохранения: `qwerty`.
|
||||||
|
Генератор не читает и не перезаписывает сохранение игрока.
|
||||||
|
|
||||||
|
Начальное состояние: 151 запись каталога (включая группы), все 44 стадии правил цивилизаций, все шесть этик на каждой стадии, 1000 когорт (по десять на сущность с временными партиями). У большинства обычных объектов количество равно 6e60, у стадий цивилизаций — 6e20. Пространство и водород имеют количество 1e90, гелий и металлы — 1e80, энергия — 1e100. Возраст — 1e15 лет. Запасов достаточно для требований продвинутых стадий звезд и структур. Оставшиеся сроки жизни когорт покрывают весь срок жизни сущностей, поэтому переходы происходят во время замера.
|
||||||
|
|
||||||
|
Это искусственный экстремальный сценарий, а не прогноз для обычного сохранения.
|
||||||
|
|
||||||
|
Машина: Apple M4 Pro, Godot 4.7.2, рендерер Metal Mobile.
|
||||||
|
|
||||||
|
| Замер | Результат |
|
||||||
|
|---|---:|
|
||||||
|
| Headless, скорость 6, шесть шагов по 0,5 секунды | 943,936–1221,992 мс на шаг |
|
||||||
|
| Среднее время headless-шага | 1122,287 мс |
|
||||||
|
| Пропускная способность headless | 0,446 секунды симуляции на секунду CPU |
|
||||||
|
| Настоящий UI, страница цивилизаций, 600 кадров | 17,38 FPS |
|
||||||
|
| Средний / p95 / максимальный кадр UI | 57,55 / 99,78 / 116,94 мс |
|
||||||
|
| Завершенные транзакции | 23 |
|
||||||
|
| Запрошенный прирост игрового времени | 3464662,267 лет |
|
||||||
|
| Опубликованный прирост игрового времени | 1080000 лет |
|
||||||
|
| Пропускная способность с UI | 0,3117 |
|
||||||
|
| Накопленный долг за замер | 2384662,267 игровых лет (23,85 реальных секунд на скорости 6) |
|
||||||
|
| Записей каталога осталось в конце | 151 |
|
||||||
|
|
||||||
|
Динамический шаг достигает предела в 0,5 секунды. Рендеринг идет быстрее 5 FPS, но симуляция не успевает за заданным темпом в этом сценарии. На обработку поколений приходится примерно 94% времени CPU. Подготовка цивилизаций занимает в среднем 634 мс на шаг, в том числе дрифт этик — 218 мс, войны — 124 мс; колонизация — 121 мс на шаг. Интервалы профилировщика вложенные и частично перекрываются.
|
||||||
|
|
||||||
|
## Сравнение оптимизации дрифта (2026-10-05)
|
||||||
|
|
||||||
|
Замеры сделаны на одном сгенерированном сохранении и одной машине до и после прямого распределения потоков для обычного и колониального дрифта, а также кеширования ставок дипломатии в фиксированной точке. Каждый headless-запуск выполняет шесть последовательных шагов по 0,5 секунды на каждой скорости.
|
||||||
|
|
||||||
|
| Замер | До | После |
|
||||||
|
|---|---:|---:|
|
||||||
|
| Средний headless-шаг на скорости 6 | 1122,287 мс | 1018,559 мс |
|
||||||
|
| Пропускная способность headless на скорости 6 | 0,446 | 0,491 |
|
||||||
|
| Дрифт этик, сумма интервалов за шесть шагов | 1,338 с | 0,643 с |
|
||||||
|
| UI, FPS за 600 кадров | 17,38 | 17,04 |
|
||||||
|
| Средний / p95 / максимальный кадр UI | 57,55 / 99,78 / 116,94 мс | 58,70 / 102,67 / 114,30 мс |
|
||||||
|
| Завершенные UI-транзакции | 23 | 25 |
|
||||||
|
| Запрошено / опубликовано игровых лет в UI | 3464662 / 1080000 | 3533627 / 1180000 |
|
||||||
|
| Пропускная способность симуляции с UI | 0,3117 | 0,3339 |
|
||||||
|
|
||||||
|
Средний headless-шаг ускорился примерно на 9,2%, а интервал профиля дрифта этик сократился примерно на 52%. Частота кадров UI практически не изменилась (в этом запуске снизилась примерно на 2%), при этом завершилось больше транзакций и выросла доля опубликованного игрового времени. На скорости 6 стресс-сценарий все еще отстает от реального времени: пропускная способность — около 0,49 секунды симуляции на секунду CPU в headless и 0,33 с UI. Самыми затратными остаются планирование поколений и войны.
|
||||||
|
|
||||||
|
Прямые пути сохраняют целое население, но разносят малые целочисленные потоки по нескольким последовательным переходам с помощью остатков для каждого источника. Поэтому распределение в отдельном переходе отличается от независимого округленного распределения по матрице 6×6. Ставки дипломатии округляются до сетки фиксированной точки с шагом 1e-9. Целевая регрессия: 769 проверок эволюции цивилизаций, оптимизаций симуляции, границ партий, укрупненных поколений и эволюции кадров; все пройдены.
|
||||||
|
|
||||||
|
## Последующая оптимизация подготовки поколений и кешей (2026-10-05)
|
||||||
|
|
||||||
|
На той же нагрузке среднее время headless-шага на скорости 6 снизилось с 1018,559 до 1005,138 мс (примерно на 1,3%). Пропускная способность headless изменилась с 0,491 до 0,497. Суммарные интервалы `generations` близки: 5,703 с и 5,629 с за шесть шагов. Подготовка цивилизаций остается самой затратной измеренной подфазой — 3,130 с. UI также почти не изменился: 17,04 → 17,09 FPS, пропускная способность симуляции — 0,3339 → 0,3351. Улучшение небольшое: арифметика населения в поколениях по-прежнему дорога при сотнях активных когорт и множестве правил цивилизаций.
|
||||||
|
|
||||||
|
Профиль теперь отдельно показывает `generation_withdrawal` и `generation_products`. Первый интервал занимает 55,5 мс, второй — 120,2 мс за шесть headless-шагов на скорости 6. Эти значения нельзя складывать с общим временем поколений, поскольку интервалы профилировщика вложенные.
|
||||||
|
|
||||||
|
## Инкрементальная обработка партий новорожденных (2026-10-05)
|
||||||
|
|
||||||
|
Удалены снимки когорт до и после рождения и последующий полный обход когорт. `append_batch` теперь сразу накапливает поправку на возраст новорожденных при добавлении частей когорт. Финальный замер после повторного использования сумм завершившихся партий в пределах поколения дал 1028,991 мс на headless-шаг скорости 6 и пропускную способность 0,486. В повторных прогонах этой же версии получилось 1005–1011 мс, поэтому при выборке всего в шесть шагов разброс велик, и устойчивое ускорение утверждать нельзя. В UI получилось 17,05 FPS, среднее время кадра 58,66 мс и пропускная способность 0,3342. Новый профиль показывает 319 мс на обработку партий новорожденных за шесть шагов. Это изменение пока не демонстрирует снижения общего времени на этом сохранении; его потенциальная польза относится прежде всего к сценариям с гораздо большим числом когорт на сущность, где прежние обходы росли пропорционально числу когорт.
|
||||||
|
|
||||||
|
Повторить замеры из родительской папки проекта:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
godot --headless --path Owniverse.GI --script res://tests/create_full_benchmark_save.gd
|
||||||
|
godot --headless --path Owniverse.GI --script res://tests/benchmark_saved_state.gd -- Owniverse.GI/tests/artifacts/all_objects_speed6.adventure.json 0.5 profile
|
||||||
|
godot --path Owniverse.GI --script res://tests/benchmark_full_ui.gd
|
||||||
|
```
|
||||||
|
|
||||||
|
## Проверка на Android Note8 (2026-10-06)
|
||||||
|
|
||||||
|
Сборка benchmark установлена отдельным пакетом `com.KIDGameProduction.Owniverse.AndroidBench`, сохранение основной игры не использовалось. Подготовка и декодирование сохранения выполнялись в фоновом потоке; ход и результат записывались в файл приложения. Устройство: Samsung SM-N950F, Android 9. Сценарий: все объекты и цивилизации, скорость 6, 120 кадров (119 интервалов).
|
||||||
|
|
||||||
|
| Метрика | Результат |
|
||||||
|
|---|---:|
|
||||||
|
| FPS UI | 1,76 |
|
||||||
|
| Средний / p95 / максимальный кадр | 567,28 / 817,54 / 1278,33 мс |
|
||||||
|
| Завершенные транзакции за прогон | 1 |
|
||||||
|
| Запрошено / опубликовано игрового времени | 1599938,57 / 10000 лет |
|
||||||
|
| Доля опубликованного от запрошенного | 0,00625 |
|
||||||
|
| Итоговый динамический шаг | 0,2 с |
|
||||||
|
|
||||||
|
Самый дорогой участок профиля — `generations`: 5,350 с суммарно за единственную завершенную транзакцию; внутри него `civilization_prepare` занял 3,186 с, `wars` — 2,217 с, `civilization_transitions` — 1,034 с. Интервалы вложены, поэтому их нельзя складывать с `generations`. Этот экстремальный сценарий на Note8 не достигает целевых 5 FPS и сильно отстает по игровому времени. Это замер именно полного стресс-сохранения, а не обычного игрового сохранения.
|
||||||
|
|
||||||
|
### Покадровая уступка в расчётах цивилизаций
|
||||||
|
|
||||||
|
Добавлены контрольные точки внутри обработки этик, проигравших в войне, падения популяции и выходов между стадиями. Математика и порядок переходов не меняются. На том же Note8 повторный прогон дал 1,87 FPS против 1,76 FPS до изменения (прирост около 6%). Средний кадр сократился с 567 до 535 мс, но p95 остался 630 мс, максимум — 1281 мс. Это слишком малое улучшение для цели 5 FPS.
|
||||||
|
|
||||||
|
В повторном профиле `generations` заняли 5,166 с, `civilization_prepare` — 3,040 с, войны — 0,985 с, переходы между стадиями — 0,640 с. Профиль не показывает явного трёхкратного ускорения: контрольные точки лучше дробят отдельные подциклы, но главный синхронный участок остается слишком дорогим. Диагностическая сборка для измерения максимального непрерывного участка не завершила прогон на телефоне; при следующем проходе сначала нужно локализовать этот участок, а затем оптимизировать его отдельно.
|
||||||
|
|
||||||
|
Контрольный запуск UI-бенчмарка на Apple M4 Pro после изменения: 21,51 FPS, средний / p95 / максимальный кадр — 46,49 / 89,62 / 107,19 мс. Этот результат подтверждает отсутствие регрессии на компьютере, но не заменяет Android-замер.
|
||||||
|
|
||||||
|
### После перехода этик на доли (2026-10-06)
|
||||||
|
|
||||||
|
Этическое состояние теперь хранит шесть долей `float`, а точное целое население берётся из реестра объектов. Исходы одной стадии сначала собираются по назначениям; доли состояния обновляются после агрегации потоков. Формат сохранения повышен до версии 6; миграции прежних сохранений нет.
|
||||||
|
|
||||||
|
Финальная APK повторно проверена на Samsung SM-N950F, Android 9, тем же полным сценарием и 120 кадрами. Два последовательных прогона дали **14,57 и 15,02 FPS**, средний кадр — **68,61 и 66,58 мс**, p95 — **113,03 и 123,03 мс**, по одной завершённой транзакции из 119 интервалов. Опубликовано 10 000 лет из 647 331 и 634 134 запрошенных; пропускная способность — 0,01545 и 0,01577. В последнем профиле `generations` заняли 5,120 с, `civilization_prepare` — 3,162 с, войны — 1,026 с, переходы — 0,728 с, дрейф этик — 0,474 с. Самый длинный непрерывный участок составил **458,14 мс** в `deep_copy_and_coarsen`, максимальный кадр — 976 мс. Предыдущий одиночный запуск старой benchmark-сборки показал 1,83 FPS, поэтому сравнивать его с этой парой напрямую нельзя; оба финальных прогона выполнены на одной APK и подтверждают результат около 15 FPS.
|
||||||
|
|
||||||
|
На компьютере прошли тесты состояния (70), эволюции (555), оптимизаций симуляции (364), индикаторов (63) и жизни (25). Полный набор всё ещё сообщает о двух отказах в `test_descriptions.gd` при обновлении выбранного описания и смене языка; оба относятся к UI-описаниям, а не к модели этик. В логах Android ошибок GDScript/Godot за прогон не найдено.
|
||||||
|
|
||||||
|
|
||||||
|
## Непрерывная модель цивилизаций — 2026-10-06
|
||||||
|
|
||||||
|
Сравнены исходная симуляция из коммита `6ee66a6` и новая модель потоков. Оба запуска используют один диагностический JSON, скорость 6, 100 последовательных полных циклов с запросом 0,1 секунды каждый и включённый CPU-профиль. Подготовка каталога и чтение JSON не включены в длительность цикла. Запуски выполнены последовательно, без параллельных тестов. Сохранение игрока не читалось и не изменялось.
|
||||||
|
|
||||||
|
| Полный цикл и пропускная способность | До | После |
|
||||||
|
|---|---:|---:|
|
||||||
|
| Среднее время полного цикла | 811,292 мс | 401,796 мс |
|
||||||
|
| Минимум / максимум | 488,914 / 963,141 мс | 323,427 / 435,607 мс |
|
||||||
|
| Завершённых полных циклов в секунду | 1,233 | 2,489 |
|
||||||
|
| Обработанных секунд симуляции на секунду CPU | 0,123 | 0,249 |
|
||||||
|
| Применено игровых лет за 100 циклов | 1 000 000 | 1 000 000 |
|
||||||
|
|
||||||
|
Полный цикл ускорился в **2,02 раза**, среднее время сократилось на **50,5%**. Цель **100 мс / 10 полных циклов в секунду не достигнута**: для неё требуется ещё примерно 4,02-кратное ускорение текущей версии. При непрерывном запросе времени на шестой скорости и шаге 0,1 секунды этот стресс-сценарий продолжит накапливать долг. Это измерение полных завершённых шагов симуляции, без показателя FPS.
|
||||||
|
|
||||||
|
Текущие внешние интервалы CPU-профиля, по убыванию среднего времени на цикл:
|
||||||
|
|
||||||
|
| Расчёт | Среднее за цикл |
|
||||||
|
|---|---:|
|
||||||
|
| Поколения звёзд и биологической жизни | 151,6 мс |
|
||||||
|
| Подготовка непрерывных потоков цивилизаций | 98,5 мс |
|
||||||
|
| Применение потоков к количествам и владельцам | 53,2 мс |
|
||||||
|
| Производство за период | 28,7 мс |
|
||||||
|
| Тренды | 18,1 мс |
|
||||||
|
| Дрейф, проверка вместимости и поклонение после потоков | 8,8 мс |
|
||||||
|
| Инициализация жизни | 6,1 мс |
|
||||||
|
| Ограничение потоков ресурсными бюджетами | 5,8 мс |
|
||||||
|
| Применение колонизации | 5,5 мс |
|
||||||
|
|
||||||
|
Внутри подготовки потоков разреженный оператор занимает 24,5 мс на цикл; этот вложенный интервал нельзя прибавлять к 98,5 мс. Внешние интервалы не покрывают всё время: остальная работа включает копирование транзакции, построение физических снимков и обновление представления.
|
||||||
|
|
||||||
|
Модель C0.2–C4.4 теперь использует точные целые количества и шесть долей float без возрастных партий. Оператор учитывает несколько последовательных переходов за интервал. Конечные количества и ресурсные потолки сохраняются точно; пропорции потоков и владельцев приближены float и квантованием долей до 15 десятичных знаков. Изменяется распределение событий во времени, поэтому тесты проверяют законы новой модели, сохранение количества, владение, ресурсные ограничения и воспроизводимое продолжение сохранения.
|
||||||
|
|
||||||
|
Регрессия: 27 из 28 наборов прошли. Новые переходы — 1895 проверок; арифметика распределения и кеши — 1889; кадровое выполнение — 24. В `test_descriptions.gd` сохраняются две ранее обнаруженные ошибки обновления выбранного описания и языка; этот UI-код не изменён в данном рефакторинге.
|
||||||
|
|
||||||
|
Повторение из папки `Owniverse.GI`:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
godot --headless --path . --script res://tests/benchmark_civilization_flows.gd -- tests/artifacts/all_objects_speed6.adventure.json 0.1 profile cycles=100
|
||||||
|
```
|
||||||
|
|
||||||
|
## Фиксированные пять циклов в секунду — 2026-10-07
|
||||||
|
|
||||||
|
Текущая версия после отката агрегации и возврата 40 возрастных групп.
|
||||||
|
Планировщик использует шаг 0,2 реальной секунды на всех скоростях. Замер:
|
||||||
|
диагностическое сохранение со всеми объектами и цивилизациями, скорость 6,
|
||||||
|
100 полных синхронных циклов с CPU-профилем, без отрисовки интерфейса.
|
||||||
|
Проверка сохранения: OK. Исходное сохранение не изменялось.
|
||||||
|
|
||||||
|
| Метрика | Результат |
|
||||||
|
|---|---:|
|
||||||
|
| Среднее время полного цикла | 439,228 мс |
|
||||||
|
| Минимум / максимум | 340,370 / 483,152 мс |
|
||||||
|
| Завершённых полных циклов в секунду | 2,277 |
|
||||||
|
| Требуется циклов в секунду | 5 |
|
||||||
|
| Обработано игровых лет | 2 000 000 |
|
||||||
|
| Запрошенное время сценария | 20 с |
|
||||||
|
| Время расчёта 100 циклов | 43,923 с |
|
||||||
|
| Пропускная способность | 0,455 с симуляции / с расчёта |
|
||||||
|
|
||||||
|
Цель 200 мс на полный цикл не достигнута: по среднему времени требуется
|
||||||
|
ускорение примерно в 2,20 раза. Увеличение шага с 0,1 до 0,2 секунды улучшило
|
||||||
|
отношение обработанного времени к затратам, но при непрерывном поступлении
|
||||||
|
времени этот стресс-сценарий продолжит накапливать долг. Это измерение
|
||||||
|
пропускной способности симуляции, без оценки FPS. Один прогон не задаёт
|
||||||
|
гарантированную производительность для других сохранений или устройств.
|
||||||
|
|
||||||
|
Внешние интервалы CPU-профиля, по убыванию среднего времени на цикл:
|
||||||
|
|
||||||
|
| Расчёт | Среднее на цикл |
|
||||||
|
|---|---:|
|
||||||
|
| Поколения звёзд и биологической жизни | 168,294 мс |
|
||||||
|
| Подготовка непрерывных потоков цивилизаций | 111,835 мс |
|
||||||
|
| Применение потоков к количествам и владельцам | 59,516 мс |
|
||||||
|
| Производство за период | 29,248 мс |
|
||||||
|
| Тренды | 17,787 мс |
|
||||||
|
| Завершение цивилизационных потоков | 8,864 мс |
|
||||||
|
| Ограничение потоков вместимостью | 6,439 мс |
|
||||||
|
| Инициализация жизни | 6,172 мс |
|
||||||
|
| Колонизация | 6,111 мс |
|
||||||
|
|
||||||
|
Вложенные интервалы нельзя прибавлять к внешним: построение физических
|
||||||
|
снимков — 27,845 мс/цикл; изъятие партий — 42,015 мс/цикл; решение оператора
|
||||||
|
цивилизаций — 31,835 мс/цикл. Проверки кадрового планировщика:
|
||||||
|
35 проверок, 0 ошибок, включая все шесть скоростей, сохранение долга,
|
||||||
|
возобновление расчёта и пять завершённых циклов на одну секунду запроса.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
godot --headless --path . --script res://tests/benchmark_civilization_flows.gd -- tests/artifacts/all_objects_speed6.adventure.json 0.2 profile cycles=100
|
||||||
|
```
|
||||||
|
|
||||||
|
## Новые звёздные партии с целым переходом за цикл — 2026-10-07
|
||||||
|
|
||||||
|
На скоростях 4–6 новые звёзды одного типа объединяются по общей границе
|
||||||
|
завершения жизни и переходят целиком. Временная сетка равна одному полному
|
||||||
|
циклу (200/2000/20000 игровых лет). Старые постепенные партии из сохранения
|
||||||
|
не преобразуются; SN/GRB сохраняют прежнюю обработку.
|
||||||
|
|
||||||
|
Повторён тот же замер: диагностическое сохранение, скорость 6, шаг 0,2 с,
|
||||||
|
100 полных циклов с CPU-профилем. Проверка сохранения OK.
|
||||||
|
|
||||||
|
| Метрика | До | После |
|
||||||
|
|---|---:|---:|
|
||||||
|
| Среднее время полного цикла | 439,228 мс | 445,690 мс |
|
||||||
|
| Минимум / максимум | 340,370 / 483,152 мс | 345,276 / 486,647 мс |
|
||||||
|
| Полных циклов в секунду | 2,277 | 2,244 |
|
||||||
|
| Пропускная способность | 0,455 | 0,449 |
|
||||||
|
| Обработано игровых лет | 2 000 000 | 2 000 000 |
|
||||||
|
| Поколения, среднее на цикл | 168,294 мс | 171,039 мс |
|
||||||
|
| Обработка партий новорождённых, среднее на цикл | 7,768 мс | 6,199 мс |
|
||||||
|
| Вызовы обработки партий новорождённых | 16 147 | 13 885 |
|
||||||
|
|
||||||
|
Общего ускорения на этой выборке нет: среднее выросло примерно на 1,5%.
|
||||||
|
Обработка новорождённых занимает на 20% меньше времени, но это небольшая
|
||||||
|
доля полного цикла. Замер включает существующие постепенные партии;
|
||||||
|
он не доказывает ускорения вселенной, целиком созданной по новой схеме.
|
||||||
|
Цель пяти полных циклов в секунду остаётся недостигнутой.
|
||||||
|
|
||||||
|
Проверки: границы партий — 109, звёздные правила — 333, короткие события —
|
||||||
|
841, укрупнённые поколения — 28, кадровое выполнение — 35; все без ошибок.
|
||||||
|
Тестируются точные большие количества, целый однократный переход,
|
||||||
|
распределённые рождения, сохранения и интеграл производства.
|
||||||
|
|
||||||
|
## Первоначальный замер больших сохранений до исправления сетки — 2026-10-07
|
||||||
|
|
||||||
|
Созданы `large_star_cohorts_legacy.adventure.json` и
|
||||||
|
`large_star_cohorts_cycle.adventure.json`: по 6×10^60 звёзд каждого из 15
|
||||||
|
типов (главная последовательность и красные гиганты), остальные объекты,
|
||||||
|
жизнь и цивилизации взяты из диагностического сценария. Возраст — 10^12 лет.
|
||||||
|
Для каждого типа заново сформирована одинаковая история рождения длиной
|
||||||
|
`min(эффективный срок жизни, 2 млн лет)` перед началом завершения жизни.
|
||||||
|
Исходные физические количества и этические профили совпадают строго.
|
||||||
|
Сохранения валидируются и проходят точное сравнение состояния после записи
|
||||||
|
и чтения JSON с полной точностью float. Сохранение игрока не изменялось.
|
||||||
|
|
||||||
|
Старая схема измеряется переключателем `batches.cycle_stars = false`, новая
|
||||||
|
включена по умолчанию. В обоих вариантах одинаковый остальной код симуляции,
|
||||||
|
скорость 6, шаг 0,2 с и CPU-профиль. Два прогона по 50 полных циклов на модель,
|
||||||
|
порядок запусков: старая → новая → новая → старая. Перед каждым прогоном
|
||||||
|
восстанавливается исходное состояние; каждый обрабатывает 1 млн игровых лет.
|
||||||
|
|
||||||
|
| Метрика | Старая схема | Новая схема |
|
||||||
|
|---|---:|---:|
|
||||||
|
| Среднее первого прогона | 417,265 мс | 423,419 мс |
|
||||||
|
| Среднее второго прогона | 431,081 мс | 427,011 мс |
|
||||||
|
| Среднее всех 100 циклов на модель | 424,173 мс | 425,215 мс |
|
||||||
|
| Полных циклов в секунду | 2,358 | 2,352 |
|
||||||
|
| Пропускная способность | 0,472 | 0,470 |
|
||||||
|
| Звёздных партий в исходном сохранении | 118 | 1 300 |
|
||||||
|
| Пиковое число звёздных партий | 132 | 1 300 |
|
||||||
|
| Поколения, среднее на цикл | 157,711 мс | 147,906 мс |
|
||||||
|
| Производство, среднее на цикл | 28,692 мс | 34,704 мс |
|
||||||
|
| Применение потоков цивилизаций, среднее на цикл | 58,642 мс | 62,160 мс |
|
||||||
|
| Изъятие партий, вложенное в поколения | 37,015 мс | 41,379 мс |
|
||||||
|
| Партии новорождённых, вложенное в поколения | 7,648 мс | 4,248 мс |
|
||||||
|
|
||||||
|
**Устойчивого выигрыша полного цикла не обнаружено.** Разница средних —
|
||||||
|
около +0,25% у новой схемы; в первом парном сравнении она медленнее, во втором
|
||||||
|
быстрее. Поколения занимают примерно на 6,2% меньше времени, но производство
|
||||||
|
стало дороже примерно на 21%. Пять полных циклов в секунду не достигнуты.
|
||||||
|
|
||||||
|
Причина роста числа партий: для долгоживущих звёзд сетка одного цикла
|
||||||
|
значительно мельче `lifespan / 40`. Например, у RD прежняя ширина — 1 млрд
|
||||||
|
лет, новая на скорости 6 — 20 тыс. лет. Поэтому изменение не всегда
|
||||||
|
укрупняет партии: на таком наборе исходных рождений их стало в 11 раз больше.
|
||||||
|
Итоговое временное распределение переходов у моделей различается; совпадение
|
||||||
|
их конечных состояний не является условием этого замера.
|
||||||
|
|
||||||
|
Для дальнейшего упрощения следует сохранять широкие группы долгоживущих
|
||||||
|
звёзд и применять целый переход только к партиям, уже укладывающимся в один
|
||||||
|
цикл. Это предложение в данном замере не реализовано.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
godot --headless --path . --script res://tests/benchmark_large_star_cohorts.gd -- cycles=50 repeats=2
|
||||||
|
```
|
||||||
|
|
||||||
|
Полные результаты первоначального замера: `large_star_cohorts_before_dynamic_fix_results.json`.
|
||||||
|
Набор с 1300 партиями сохранён в `large_star_cohorts_before_dynamic_fix_cycle.adventure.json`.
|
||||||
|
Последующие файлы без этого суффикса относятся к исправленной динамической схеме.
|
||||||
|
|
||||||
|
## Исправленное динамическое укрупнение без дробления — 2026-10-07
|
||||||
|
|
||||||
|
Ошибка первоначальной реализации устранена: циклическая сетка больше не
|
||||||
|
заменяет широкие возрастные окна долгоживущих звёзд. При создании новая сетка
|
||||||
|
используется только если прежнее окно не шире цикла. Иначе используется
|
||||||
|
прежнее широкое окно. Из существующих партий объединяются две или более
|
||||||
|
одного типа, чей оставшийся интервал завершения целиком лежит в общем цикле.
|
||||||
|
Партии, пересекающие границу циклов или занимающие несколько циклов, не делятся.
|
||||||
|
|
||||||
|
Повторён парный замер на отдельных больших сохранениях, с теми же исходными
|
||||||
|
количествами и входными интервалами рождения: скорость 6, шаг 0,2 с,
|
||||||
|
два прогона по 50 циклов на модель в порядке старая → новая → новая → старая.
|
||||||
|
Каждый прогон обрабатывает 1 млн игровых лет; состояния валидируются до и
|
||||||
|
после, записанные файлы проходят точное сравнение после чтения.
|
||||||
|
|
||||||
|
| Метрика | Старая схема | Исправленная динамическая |
|
||||||
|
|---|---:|---:|
|
||||||
|
| Исходных звёздных партий | 118 | 113 |
|
||||||
|
| Пиковое число партий | 132 | 127 |
|
||||||
|
| Число партий после 50 циклов | 130 | 125 |
|
||||||
|
| Среднее первого прогона | 420,388 мс | 424,307 мс |
|
||||||
|
| Среднее второго прогона | 431,605 мс | 428,498 мс |
|
||||||
|
| Среднее всех 100 циклов на модель | 425,996 мс | 426,402 мс |
|
||||||
|
| Полных циклов в секунду | 2,347 | 2,345 |
|
||||||
|
| Поколения, среднее на цикл | 158,622 мс | 157,606 мс |
|
||||||
|
| Партии новорождённых, вложенный интервал | 7,679 мс | 6,693 мс |
|
||||||
|
|
||||||
|
На этом наборе партиям стало меньше примерно на 4,2%, вместо прежнего
|
||||||
|
ошибочного роста до 1300. Проверено, что долгая группа RD остаётся одной
|
||||||
|
широкой партией и её окно не меняется при добавлении новых звёзд.
|
||||||
|
Новый тест запрещает рост числа исходных партий в диагностическом сценарии.
|
||||||
|
|
||||||
|
Устойчивого ускорения полного цикла по этим прогонам нет: разница средних
|
||||||
|
около +0,10%; знак разницы в отдельных парных сравнениях меняется.
|
||||||
|
Обработка партий новорождённых занимает примерно на 13% меньше времени,
|
||||||
|
но её доля недостаточна для заметного выигрыша всего расчёта.
|
||||||
|
Цель пяти циклов в секунду по-прежнему не достигнута.
|
||||||
|
|
||||||
|
Проверки: границы партий — 117, звёздные правила — 333, короткие события —
|
||||||
|
841, кадровое выполнение — 35; все без ошибок. Дополнительные проверки
|
||||||
|
охватывают сохранение широких окон, объединение старых партий с точными
|
||||||
|
количествами и остатками, соседние циклы и повторное укрупнение.
|
||||||
|
|
||||||
|
Актуальные сохранения: `large_star_cohorts_legacy.adventure.json` и
|
||||||
|
`large_star_cohorts_cycle.adventure.json`; результаты: `large_star_cohorts_results.json`.
|
||||||
|
|
||||||
|
## Новая вселенная с множеством объектов и мелких звёздных партий — 2026-10-07
|
||||||
|
|
||||||
|
Создано отдельное состояние с нуля по текущим таблицам: 150 типов объектов,
|
||||||
|
все 44 стадии этических цивилизаций (включая Ct), 15 типов живых звёзд.
|
||||||
|
Запасы большинства объектов — 10^60 каждого типа; планет и цивилизаций —
|
||||||
|
10^28. Жизнь размещена у четырёх типов карликов, четверть звёзд каждого типа
|
||||||
|
связана со структурами. Этические профили различаются между стадиями.
|
||||||
|
Высокий запас пространства сохраняет жизнь при бластах. Интерфейс не отрисовывался.
|
||||||
|
|
||||||
|
Для проверки укрупнения заданы валидные синтетические исторические партии:
|
||||||
|
40 последовательных циклов завершения × 8 узких партий × 15 типов звёзд.
|
||||||
|
Все восемь партий типа целиком завершаются в общем цикле; это целевой
|
||||||
|
стресс-сценарий большого числа партий, а не утверждение, что обычное создание
|
||||||
|
с неизменным временем жизни обязательно порождает такую фрагментацию.
|
||||||
|
Исходный состав и интервалы одинаковы для обеих моделей. Долгоживущие звёзды
|
||||||
|
не дробились алгоритмом: ему переданы уже существующие узкие партии.
|
||||||
|
|
||||||
|
До укрупнения — 4800 звёздных партий. Старая схема сохраняет 4560,
|
||||||
|
исправленная динамическая — 600. Созданы два отдельных диагностических файла,
|
||||||
|
проверены запись/чтение без изменения состояния и валидация до и после каждого
|
||||||
|
прогона. Сохранение игрока не затрагивалось.
|
||||||
|
|
||||||
|
Два прогона по 40 полных циклов на модель; порядок старая → новая → новая →
|
||||||
|
старая. Скорость 6, фиксированный шаг 0,2 с, CPU-профиль включён.
|
||||||
|
Каждый прогон восстанавливает исходное состояние и обрабатывает 800 тыс. лет.
|
||||||
|
|
||||||
|
| Метрика | Старая схема | Динамическое укрупнение |
|
||||||
|
|---|---:|---:|
|
||||||
|
| Исходных звёздных партий после укрупнения | 4 560 | 600 |
|
||||||
|
| Пиковое число партий | 4 560 | 607 |
|
||||||
|
| Среднее первого прогона | 612,606 мс | 530,285 мс |
|
||||||
|
| Среднее второго прогона | 624,625 мс | 532,578 мс |
|
||||||
|
| Среднее всех 80 циклов на модель | 618,616 мс | 531,431 мс |
|
||||||
|
| Полных циклов в секунду | 1,617 | 1,882 |
|
||||||
|
| Обработанных секунд симуляции / секунду расчёта | 0,323 | 0,376 |
|
||||||
|
| Поколения, среднее на цикл | 211,916 мс | 138,339 мс |
|
||||||
|
| Производство, среднее на цикл | 51,201 мс | 38,038 мс |
|
||||||
|
| Подготовка потоков цивилизаций | 113,371 мс | 113,270 мс |
|
||||||
|
| Применение потоков цивилизаций | 114,343 мс | 113,820 мс |
|
||||||
|
| Колонизация | 55,284 мс | 55,291 мс |
|
||||||
|
| Обработка партий новорождённых, вложенная в поколения | 29,464 мс | 2,967 мс |
|
||||||
|
|
||||||
|
**Выигрыш полного цикла подтверждён обоими парными сравнениями:** время
|
||||||
|
сократилось на 14,1%, ускорение около 1,16 раза. Поколения занимают на 34,7%
|
||||||
|
меньше времени. Механизм даёт эффект при множестве подходящих для объединения
|
||||||
|
партий; в предыдущем сценарии с небольшим числом широких партий эффект был
|
||||||
|
незаметен. Изменение моментов переходов допускается моделью: конечные состояния
|
||||||
|
двух схем не обязаны совпадать, но обе полностью обработали запрошенный интервал.
|
||||||
|
|
||||||
|
Пять циклов в секунду не достигнуты: для данного сценария требуется ещё
|
||||||
|
примерно 2,66-кратное ускорение. Главные оставшиеся затраты — поколения и
|
||||||
|
подготовка/применение цивилизационных потоков; колонизация также заметна.
|
||||||
|
|
||||||
|
Сохранения: `many_objects_fragmented_stars_legacy.adventure.json` и
|
||||||
|
`many_objects_fragmented_stars_cycle.adventure.json`.
|
||||||
|
Полные результаты: `many_objects_fragmented_stars_results.json`.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
godot --headless --path . --script res://tests/benchmark_many_objects.gd -- cycles=40 repeats=2
|
||||||
|
```
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,345 @@
|
|||||||
|
{
|
||||||
|
"cycles_per_run": 50,
|
||||||
|
"delta_seconds": 0.2,
|
||||||
|
"profile_enabled": true,
|
||||||
|
"repeats": 2,
|
||||||
|
"runs": [
|
||||||
|
{
|
||||||
|
"cycles": 50,
|
||||||
|
"cycles_per_second": 2.39655612966922,
|
||||||
|
"final_stellar_cohorts": 130,
|
||||||
|
"game_years": "1000000",
|
||||||
|
"max_ms": 454.421,
|
||||||
|
"mean_ms": 417.26542,
|
||||||
|
"min_ms": 349.968,
|
||||||
|
"model": "legacy",
|
||||||
|
"p95_ms": 448.31,
|
||||||
|
"peak_stellar_cohorts": 132,
|
||||||
|
"profile": {
|
||||||
|
"assign_homes": [
|
||||||
|
58334,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"civilization_flow_capacity": [
|
||||||
|
308485,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_flow_colonies": [
|
||||||
|
272661,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_flow_finish": [
|
||||||
|
432935,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_flow_ledger": [
|
||||||
|
2884631,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_flow_plan": [
|
||||||
|
5425115,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_operator_build": [
|
||||||
|
151687,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_operator_solve": [
|
||||||
|
1609348,
|
||||||
|
2150
|
||||||
|
],
|
||||||
|
"enforce_capacity": [
|
||||||
|
871224,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"generation_products": [
|
||||||
|
542267,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"generation_withdrawal": [
|
||||||
|
1820057,
|
||||||
|
150
|
||||||
|
],
|
||||||
|
"generations": [
|
||||||
|
7751170,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"initialize": [
|
||||||
|
297786,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"newborn_batches": [
|
||||||
|
375307,
|
||||||
|
8322
|
||||||
|
],
|
||||||
|
"physical_amounts_build": [
|
||||||
|
1351719,
|
||||||
|
900
|
||||||
|
],
|
||||||
|
"production": [
|
||||||
|
1410303,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"trends": [
|
||||||
|
879262,
|
||||||
|
50
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"repeat": 1,
|
||||||
|
"throughput": 0.479311225933843
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cycles": 50,
|
||||||
|
"cycles_per_second": 2.36172713483247,
|
||||||
|
"final_stellar_cohorts": 1300,
|
||||||
|
"game_years": "1000000",
|
||||||
|
"max_ms": 460.373,
|
||||||
|
"mean_ms": 423.41894,
|
||||||
|
"min_ms": 350.862,
|
||||||
|
"model": "cycle",
|
||||||
|
"p95_ms": 458.712,
|
||||||
|
"peak_stellar_cohorts": 1300,
|
||||||
|
"profile": {
|
||||||
|
"assign_homes": [
|
||||||
|
52297,
|
||||||
|
176
|
||||||
|
],
|
||||||
|
"civilization_flow_capacity": [
|
||||||
|
314752,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_flow_colonies": [
|
||||||
|
277416,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_flow_finish": [
|
||||||
|
442436,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_flow_ledger": [
|
||||||
|
3097867,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_flow_plan": [
|
||||||
|
5500302,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_operator_build": [
|
||||||
|
156156,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_operator_solve": [
|
||||||
|
1624350,
|
||||||
|
2150
|
||||||
|
],
|
||||||
|
"enforce_capacity": [
|
||||||
|
841074,
|
||||||
|
176
|
||||||
|
],
|
||||||
|
"generation_products": [
|
||||||
|
441260,
|
||||||
|
76
|
||||||
|
],
|
||||||
|
"generation_withdrawal": [
|
||||||
|
2058882,
|
||||||
|
126
|
||||||
|
],
|
||||||
|
"generations": [
|
||||||
|
7358962,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"initialize": [
|
||||||
|
304251,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"newborn_batches": [
|
||||||
|
211077,
|
||||||
|
5960
|
||||||
|
],
|
||||||
|
"physical_amounts_build": [
|
||||||
|
1293092,
|
||||||
|
826
|
||||||
|
],
|
||||||
|
"production": [
|
||||||
|
1725690,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"trends": [
|
||||||
|
899707,
|
||||||
|
50
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"repeat": 1,
|
||||||
|
"throughput": 0.472345426966493
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cycles": 50,
|
||||||
|
"cycles_per_second": 2.34186004575995,
|
||||||
|
"final_stellar_cohorts": 1300,
|
||||||
|
"game_years": "1000000",
|
||||||
|
"max_ms": 465.408,
|
||||||
|
"mean_ms": 427.011,
|
||||||
|
"min_ms": 351.168,
|
||||||
|
"model": "cycle",
|
||||||
|
"p95_ms": 460.645,
|
||||||
|
"peak_stellar_cohorts": 1300,
|
||||||
|
"profile": {
|
||||||
|
"assign_homes": [
|
||||||
|
52872,
|
||||||
|
176
|
||||||
|
],
|
||||||
|
"civilization_flow_capacity": [
|
||||||
|
317075,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_flow_colonies": [
|
||||||
|
279484,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_flow_finish": [
|
||||||
|
446195,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_flow_ledger": [
|
||||||
|
3118109,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_flow_plan": [
|
||||||
|
5537625,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_operator_build": [
|
||||||
|
158082,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_operator_solve": [
|
||||||
|
1637405,
|
||||||
|
2150
|
||||||
|
],
|
||||||
|
"enforce_capacity": [
|
||||||
|
854481,
|
||||||
|
176
|
||||||
|
],
|
||||||
|
"generation_products": [
|
||||||
|
445328,
|
||||||
|
76
|
||||||
|
],
|
||||||
|
"generation_withdrawal": [
|
||||||
|
2078977,
|
||||||
|
126
|
||||||
|
],
|
||||||
|
"generations": [
|
||||||
|
7431634,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"initialize": [
|
||||||
|
308950,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"newborn_batches": [
|
||||||
|
213741,
|
||||||
|
5960
|
||||||
|
],
|
||||||
|
"physical_amounts_build": [
|
||||||
|
1308770,
|
||||||
|
826
|
||||||
|
],
|
||||||
|
"production": [
|
||||||
|
1744677,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"trends": [
|
||||||
|
903605,
|
||||||
|
50
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"repeat": 2,
|
||||||
|
"throughput": 0.468372009151989
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cycles": 50,
|
||||||
|
"cycles_per_second": 2.31974771537327,
|
||||||
|
"final_stellar_cohorts": 130,
|
||||||
|
"game_years": "1000000",
|
||||||
|
"max_ms": 462.587,
|
||||||
|
"mean_ms": 431.08136,
|
||||||
|
"min_ms": 364.143,
|
||||||
|
"model": "legacy",
|
||||||
|
"p95_ms": 461.998,
|
||||||
|
"peak_stellar_cohorts": 132,
|
||||||
|
"profile": {
|
||||||
|
"assign_homes": [
|
||||||
|
60468,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"civilization_flow_capacity": [
|
||||||
|
318914,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_flow_colonies": [
|
||||||
|
281067,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_flow_finish": [
|
||||||
|
446947,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_flow_ledger": [
|
||||||
|
2979604,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_flow_plan": [
|
||||||
|
5570636,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_operator_build": [
|
||||||
|
158593,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_operator_solve": [
|
||||||
|
1643754,
|
||||||
|
2150
|
||||||
|
],
|
||||||
|
"enforce_capacity": [
|
||||||
|
904863,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"generation_products": [
|
||||||
|
564253,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"generation_withdrawal": [
|
||||||
|
1881469,
|
||||||
|
150
|
||||||
|
],
|
||||||
|
"generations": [
|
||||||
|
8019908,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"initialize": [
|
||||||
|
312899,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"newborn_batches": [
|
||||||
|
389499,
|
||||||
|
8322
|
||||||
|
],
|
||||||
|
"physical_amounts_build": [
|
||||||
|
1396769,
|
||||||
|
900
|
||||||
|
],
|
||||||
|
"production": [
|
||||||
|
1458932,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"trends": [
|
||||||
|
909402,
|
||||||
|
50
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"repeat": 2,
|
||||||
|
"throughput": 0.463949543074653
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"speed": 6
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,345 @@
|
|||||||
|
{
|
||||||
|
"cycles_per_run": 50,
|
||||||
|
"delta_seconds": 0.2,
|
||||||
|
"profile_enabled": true,
|
||||||
|
"repeats": 2,
|
||||||
|
"runs": [
|
||||||
|
{
|
||||||
|
"cycles": 50,
|
||||||
|
"cycles_per_second": 2.3787548645537,
|
||||||
|
"final_stellar_cohorts": 130,
|
||||||
|
"game_years": "1000000",
|
||||||
|
"max_ms": 453.742,
|
||||||
|
"mean_ms": 420.388,
|
||||||
|
"min_ms": 354.113,
|
||||||
|
"model": "legacy",
|
||||||
|
"p95_ms": 452.604,
|
||||||
|
"peak_stellar_cohorts": 132,
|
||||||
|
"profile": {
|
||||||
|
"assign_homes": [
|
||||||
|
59021,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"civilization_flow_capacity": [
|
||||||
|
310616,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_flow_colonies": [
|
||||||
|
276485,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_flow_finish": [
|
||||||
|
436890,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_flow_ledger": [
|
||||||
|
2908982,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_flow_plan": [
|
||||||
|
5444724,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_operator_build": [
|
||||||
|
152980,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_operator_solve": [
|
||||||
|
1604917,
|
||||||
|
2150
|
||||||
|
],
|
||||||
|
"enforce_capacity": [
|
||||||
|
879602,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"generation_products": [
|
||||||
|
550010,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"generation_withdrawal": [
|
||||||
|
1834842,
|
||||||
|
150
|
||||||
|
],
|
||||||
|
"generations": [
|
||||||
|
7827667,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"initialize": [
|
||||||
|
300448,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"newborn_batches": [
|
||||||
|
379245,
|
||||||
|
8322
|
||||||
|
],
|
||||||
|
"physical_amounts_build": [
|
||||||
|
1360704,
|
||||||
|
900
|
||||||
|
],
|
||||||
|
"production": [
|
||||||
|
1417179,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"trends": [
|
||||||
|
884554,
|
||||||
|
50
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"repeat": 1,
|
||||||
|
"throughput": 0.47575097291074
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cycles": 50,
|
||||||
|
"cycles_per_second": 2.3567861205283,
|
||||||
|
"final_stellar_cohorts": 125,
|
||||||
|
"game_years": "1000000",
|
||||||
|
"max_ms": 461.919,
|
||||||
|
"mean_ms": 424.30664,
|
||||||
|
"min_ms": 355.62,
|
||||||
|
"model": "cycle",
|
||||||
|
"p95_ms": 459.138,
|
||||||
|
"peak_stellar_cohorts": 127,
|
||||||
|
"profile": {
|
||||||
|
"assign_homes": [
|
||||||
|
59817,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"civilization_flow_capacity": [
|
||||||
|
314882,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_flow_colonies": [
|
||||||
|
279378,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_flow_finish": [
|
||||||
|
442443,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_flow_ledger": [
|
||||||
|
2950938,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_flow_plan": [
|
||||||
|
5516132,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_operator_build": [
|
||||||
|
156869,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_operator_solve": [
|
||||||
|
1618413,
|
||||||
|
2150
|
||||||
|
],
|
||||||
|
"enforce_capacity": [
|
||||||
|
892637,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"generation_products": [
|
||||||
|
529169,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"generation_withdrawal": [
|
||||||
|
1861386,
|
||||||
|
150
|
||||||
|
],
|
||||||
|
"generations": [
|
||||||
|
7833909,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"initialize": [
|
||||||
|
304443,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"newborn_batches": [
|
||||||
|
332349,
|
||||||
|
7522
|
||||||
|
],
|
||||||
|
"physical_amounts_build": [
|
||||||
|
1382887,
|
||||||
|
900
|
||||||
|
],
|
||||||
|
"production": [
|
||||||
|
1444907,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"trends": [
|
||||||
|
896615,
|
||||||
|
50
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"repeat": 1,
|
||||||
|
"throughput": 0.471357224105661
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cycles": 50,
|
||||||
|
"cycles_per_second": 2.33373492243879,
|
||||||
|
"final_stellar_cohorts": 125,
|
||||||
|
"game_years": "1000000",
|
||||||
|
"max_ms": 471.891,
|
||||||
|
"mean_ms": 428.49768,
|
||||||
|
"min_ms": 363.562,
|
||||||
|
"model": "cycle",
|
||||||
|
"p95_ms": 458.377,
|
||||||
|
"peak_stellar_cohorts": 127,
|
||||||
|
"profile": {
|
||||||
|
"assign_homes": [
|
||||||
|
60419,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"civilization_flow_capacity": [
|
||||||
|
317546,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_flow_colonies": [
|
||||||
|
281187,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_flow_finish": [
|
||||||
|
447446,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_flow_ledger": [
|
||||||
|
2973320,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_flow_plan": [
|
||||||
|
5561963,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_operator_build": [
|
||||||
|
157327,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_operator_solve": [
|
||||||
|
1631869,
|
||||||
|
2150
|
||||||
|
],
|
||||||
|
"enforce_capacity": [
|
||||||
|
900410,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"generation_products": [
|
||||||
|
541714,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"generation_withdrawal": [
|
||||||
|
1875079,
|
||||||
|
150
|
||||||
|
],
|
||||||
|
"generations": [
|
||||||
|
7926735,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"initialize": [
|
||||||
|
307215,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"newborn_batches": [
|
||||||
|
336903,
|
||||||
|
7522
|
||||||
|
],
|
||||||
|
"physical_amounts_build": [
|
||||||
|
1400661,
|
||||||
|
900
|
||||||
|
],
|
||||||
|
"production": [
|
||||||
|
1457871,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"trends": [
|
||||||
|
908259,
|
||||||
|
50
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"repeat": 2,
|
||||||
|
"throughput": 0.466746984487757
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cycles": 50,
|
||||||
|
"cycles_per_second": 2.31693373652923,
|
||||||
|
"final_stellar_cohorts": 130,
|
||||||
|
"game_years": "1000000",
|
||||||
|
"max_ms": 466.374,
|
||||||
|
"mean_ms": 431.60492,
|
||||||
|
"min_ms": 366.359,
|
||||||
|
"model": "legacy",
|
||||||
|
"p95_ms": 465.621,
|
||||||
|
"peak_stellar_cohorts": 132,
|
||||||
|
"profile": {
|
||||||
|
"assign_homes": [
|
||||||
|
60684,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"civilization_flow_capacity": [
|
||||||
|
318805,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_flow_colonies": [
|
||||||
|
282225,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_flow_finish": [
|
||||||
|
448335,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_flow_ledger": [
|
||||||
|
2980134,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_flow_plan": [
|
||||||
|
5579243,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_operator_build": [
|
||||||
|
157141,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"civilization_operator_solve": [
|
||||||
|
1638102,
|
||||||
|
2150
|
||||||
|
],
|
||||||
|
"enforce_capacity": [
|
||||||
|
904255,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"generation_products": [
|
||||||
|
565486,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"generation_withdrawal": [
|
||||||
|
1885470,
|
||||||
|
150
|
||||||
|
],
|
||||||
|
"generations": [
|
||||||
|
8034541,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"initialize": [
|
||||||
|
308996,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"newborn_batches": [
|
||||||
|
388637,
|
||||||
|
8322
|
||||||
|
],
|
||||||
|
"physical_amounts_build": [
|
||||||
|
1400258,
|
||||||
|
900
|
||||||
|
],
|
||||||
|
"production": [
|
||||||
|
1465783,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"trends": [
|
||||||
|
913581,
|
||||||
|
50
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"repeat": 2,
|
||||||
|
"throughput": 0.463386747305846
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"speed": 6
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,345 @@
|
|||||||
|
{
|
||||||
|
"cycles_per_run": 40,
|
||||||
|
"delta_seconds": 0.2,
|
||||||
|
"profile_enabled": true,
|
||||||
|
"repeats": 2,
|
||||||
|
"runs": [
|
||||||
|
{
|
||||||
|
"cycles": 40,
|
||||||
|
"cycles_per_second": 1.6323701614814,
|
||||||
|
"final_stellar_cohorts": 105,
|
||||||
|
"game_years": "800000",
|
||||||
|
"max_ms": 628.888,
|
||||||
|
"mean_ms": 612.60615,
|
||||||
|
"min_ms": 564.108,
|
||||||
|
"model": "legacy",
|
||||||
|
"p95_ms": 624.987,
|
||||||
|
"peak_stellar_cohorts": 4560,
|
||||||
|
"profile": {
|
||||||
|
"assign_homes": [
|
||||||
|
48558,
|
||||||
|
160
|
||||||
|
],
|
||||||
|
"civilization_flow_capacity": [
|
||||||
|
263456,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"civilization_flow_colonies": [
|
||||||
|
2192836,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"civilization_flow_finish": [
|
||||||
|
401558,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"civilization_flow_ledger": [
|
||||||
|
4523753,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"civilization_flow_plan": [
|
||||||
|
4491368,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"civilization_operator_build": [
|
||||||
|
128185,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"civilization_operator_solve": [
|
||||||
|
1314272,
|
||||||
|
1720
|
||||||
|
],
|
||||||
|
"enforce_capacity": [
|
||||||
|
755412,
|
||||||
|
160
|
||||||
|
],
|
||||||
|
"generation_products": [
|
||||||
|
621550,
|
||||||
|
80
|
||||||
|
],
|
||||||
|
"generation_withdrawal": [
|
||||||
|
2524452,
|
||||||
|
120
|
||||||
|
],
|
||||||
|
"generations": [
|
||||||
|
8393123,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"initialize": [
|
||||||
|
293736,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"newborn_batches": [
|
||||||
|
1166060,
|
||||||
|
19424
|
||||||
|
],
|
||||||
|
"physical_amounts_build": [
|
||||||
|
1707597,
|
||||||
|
675
|
||||||
|
],
|
||||||
|
"production": [
|
||||||
|
2026863,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"trends": [
|
||||||
|
716666,
|
||||||
|
40
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"repeat": 1,
|
||||||
|
"throughput": 0.32647403229628
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cycles": 40,
|
||||||
|
"cycles_per_second": 1.88577938012452,
|
||||||
|
"final_stellar_cohorts": 99,
|
||||||
|
"game_years": "800000",
|
||||||
|
"max_ms": 564.379,
|
||||||
|
"mean_ms": 530.284725,
|
||||||
|
"min_ms": 448.092,
|
||||||
|
"model": "cycle",
|
||||||
|
"p95_ms": 560.287,
|
||||||
|
"peak_stellar_cohorts": 607,
|
||||||
|
"profile": {
|
||||||
|
"assign_homes": [
|
||||||
|
39924,
|
||||||
|
132
|
||||||
|
],
|
||||||
|
"civilization_flow_capacity": [
|
||||||
|
265954,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"civilization_flow_colonies": [
|
||||||
|
2204837,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"civilization_flow_finish": [
|
||||||
|
404568,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"civilization_flow_ledger": [
|
||||||
|
4540902,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"civilization_flow_plan": [
|
||||||
|
4517593,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"civilization_operator_build": [
|
||||||
|
128322,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"civilization_operator_solve": [
|
||||||
|
1324328,
|
||||||
|
1720
|
||||||
|
],
|
||||||
|
"enforce_capacity": [
|
||||||
|
672871,
|
||||||
|
132
|
||||||
|
],
|
||||||
|
"generation_products": [
|
||||||
|
184761,
|
||||||
|
52
|
||||||
|
],
|
||||||
|
"generation_withdrawal": [
|
||||||
|
2150050,
|
||||||
|
92
|
||||||
|
],
|
||||||
|
"generations": [
|
||||||
|
5519639,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"initialize": [
|
||||||
|
295834,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"newborn_batches": [
|
||||||
|
118202,
|
||||||
|
3115
|
||||||
|
],
|
||||||
|
"physical_amounts_build": [
|
||||||
|
1594387,
|
||||||
|
612
|
||||||
|
],
|
||||||
|
"production": [
|
||||||
|
1526313,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"trends": [
|
||||||
|
723713,
|
||||||
|
40
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"repeat": 1,
|
||||||
|
"throughput": 0.377155876024903
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cycles": 40,
|
||||||
|
"cycles_per_second": 1.87765994001252,
|
||||||
|
"final_stellar_cohorts": 99,
|
||||||
|
"game_years": "800000",
|
||||||
|
"max_ms": 566.428,
|
||||||
|
"mean_ms": 532.5778,
|
||||||
|
"min_ms": 456.191,
|
||||||
|
"model": "cycle",
|
||||||
|
"p95_ms": 565.345,
|
||||||
|
"peak_stellar_cohorts": 607,
|
||||||
|
"profile": {
|
||||||
|
"assign_homes": [
|
||||||
|
40238,
|
||||||
|
132
|
||||||
|
],
|
||||||
|
"civilization_flow_capacity": [
|
||||||
|
264957,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"civilization_flow_colonies": [
|
||||||
|
2218466,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"civilization_flow_finish": [
|
||||||
|
405624,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"civilization_flow_ledger": [
|
||||||
|
4564735,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"civilization_flow_plan": [
|
||||||
|
4543992,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"civilization_operator_build": [
|
||||||
|
127427,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"civilization_operator_solve": [
|
||||||
|
1338172,
|
||||||
|
1720
|
||||||
|
],
|
||||||
|
"enforce_capacity": [
|
||||||
|
672773,
|
||||||
|
132
|
||||||
|
],
|
||||||
|
"generation_products": [
|
||||||
|
185633,
|
||||||
|
52
|
||||||
|
],
|
||||||
|
"generation_withdrawal": [
|
||||||
|
2159985,
|
||||||
|
92
|
||||||
|
],
|
||||||
|
"generations": [
|
||||||
|
5547513,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"initialize": [
|
||||||
|
297516,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"newborn_batches": [
|
||||||
|
119187,
|
||||||
|
3115
|
||||||
|
],
|
||||||
|
"physical_amounts_build": [
|
||||||
|
1590461,
|
||||||
|
612
|
||||||
|
],
|
||||||
|
"production": [
|
||||||
|
1516716,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"trends": [
|
||||||
|
731042,
|
||||||
|
40
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"repeat": 2,
|
||||||
|
"throughput": 0.375531988002504
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cycles": 40,
|
||||||
|
"cycles_per_second": 1.60095961519335,
|
||||||
|
"final_stellar_cohorts": 105,
|
||||||
|
"game_years": "800000",
|
||||||
|
"max_ms": 660.704,
|
||||||
|
"mean_ms": 624.625375,
|
||||||
|
"min_ms": 562.732,
|
||||||
|
"model": "legacy",
|
||||||
|
"p95_ms": 638.671,
|
||||||
|
"peak_stellar_cohorts": 4560,
|
||||||
|
"profile": {
|
||||||
|
"assign_homes": [
|
||||||
|
49183,
|
||||||
|
160
|
||||||
|
],
|
||||||
|
"civilization_flow_capacity": [
|
||||||
|
268901,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"civilization_flow_colonies": [
|
||||||
|
2229856,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"civilization_flow_finish": [
|
||||||
|
406135,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"civilization_flow_ledger": [
|
||||||
|
4623708,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"civilization_flow_plan": [
|
||||||
|
4578330,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"civilization_operator_build": [
|
||||||
|
130249,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"civilization_operator_solve": [
|
||||||
|
1340466,
|
||||||
|
1720
|
||||||
|
],
|
||||||
|
"enforce_capacity": [
|
||||||
|
765788,
|
||||||
|
160
|
||||||
|
],
|
||||||
|
"generation_products": [
|
||||||
|
635386,
|
||||||
|
80
|
||||||
|
],
|
||||||
|
"generation_withdrawal": [
|
||||||
|
2573324,
|
||||||
|
120
|
||||||
|
],
|
||||||
|
"generations": [
|
||||||
|
8560126,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"initialize": [
|
||||||
|
297396,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"newborn_batches": [
|
||||||
|
1191081,
|
||||||
|
19424
|
||||||
|
],
|
||||||
|
"physical_amounts_build": [
|
||||||
|
1738195,
|
||||||
|
675
|
||||||
|
],
|
||||||
|
"production": [
|
||||||
|
2069255,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"trends": [
|
||||||
|
735591,
|
||||||
|
40
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"repeat": 2,
|
||||||
|
"throughput": 0.320191923038669
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"speed": 6
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
extends SceneTree
|
||||||
|
## Full-cycle throughput benchmark; diagnostic input is never modified.
|
||||||
|
const E = preload("res://world/owniverse/math/exact.gd")
|
||||||
|
|
||||||
|
func _initialize():
|
||||||
|
call_deferred("run")
|
||||||
|
|
||||||
|
func restore_json_integers(value):
|
||||||
|
# JSON parses ordinary integer tokens as float. Large integers are $exact.
|
||||||
|
if value is float and value == floorf(value) and absf(value) <= 9007199254740991:
|
||||||
|
return int(value)
|
||||||
|
if value is Dictionary:
|
||||||
|
for key in value: value[key] = restore_json_integers(value[key])
|
||||||
|
elif value is Array:
|
||||||
|
for i in value.size(): value[i] = restore_json_integers(value[i])
|
||||||
|
return value
|
||||||
|
|
||||||
|
func run():
|
||||||
|
var args = OS.get_cmdline_user_args()
|
||||||
|
if args.is_empty():
|
||||||
|
print("Usage: --script tests/benchmark_civilization_flows.gd -- /path/to/save.adventure.json [delta_seconds] [profile] [cycles=100]")
|
||||||
|
quit(1)
|
||||||
|
return
|
||||||
|
var data = JSON.parse_string(FileAccess.get_file_as_string(args[0]))
|
||||||
|
if not data is Dictionary or data.get("format_version") != 6:
|
||||||
|
push_error("Expected diagnostic JSON format 6")
|
||||||
|
quit(1)
|
||||||
|
return
|
||||||
|
var initial: Dictionary = E.decode(restore_json_integers(data)).state
|
||||||
|
var validation: String = root.get_node("SaveManager").validate_data(E.decode(restore_json_integers(data)))
|
||||||
|
print("Save validation: ", "OK" if validation.is_empty() else validation)
|
||||||
|
var delta: float = args[1].to_float() if args.size() > 1 else 1.0 / 60.0
|
||||||
|
if not is_finite(delta) or delta <= 0:
|
||||||
|
quit(1)
|
||||||
|
return
|
||||||
|
for speed in [6]:
|
||||||
|
var world = load("res://world/owniverse/owniverse.gd").new()
|
||||||
|
world.catalog.load_definitions(root.get_node("Global").OwniverseEntities)
|
||||||
|
world.state = initial.duplicate(true)
|
||||||
|
world.speed = speed
|
||||||
|
world.profile_enabled = args.has("profile")
|
||||||
|
var elapsed: Array = []
|
||||||
|
var cycles: int = 100
|
||||||
|
for arg in args:
|
||||||
|
if arg.begins_with("cycles="): cycles = maxi(1, arg.trim_prefix("cycles=").to_int())
|
||||||
|
var initial_clock: Variant = world.state.time.datetime
|
||||||
|
for cycle in cycles:
|
||||||
|
var start: int = Time.get_ticks_usec()
|
||||||
|
world.evolute(delta)
|
||||||
|
elapsed.append((Time.get_ticks_usec() - start) / 1000.0)
|
||||||
|
print("Speed %d, %d complete %.3f-second steps" % [speed, cycles, delta])
|
||||||
|
print("Min/max ms: ", elapsed.min(), "/", elapsed.max())
|
||||||
|
print("Game years applied: ", E.fixed(E.subtract(world.state.time.datetime, initial_clock)))
|
||||||
|
var total_ms: float = 0.0
|
||||||
|
for sample in elapsed: total_ms += sample
|
||||||
|
var throughput: float = float(cycles) * delta / (total_ms / 1000.0)
|
||||||
|
print("Mean complete cycle ms: ", total_ms / cycles)
|
||||||
|
print("Full cycles/s: ", float(cycles) * 1000.0 / total_ms)
|
||||||
|
print("Simulation throughput: %.3f real-time seconds processed per CPU second; needs >= 1.0 to keep up" % throughput)
|
||||||
|
if world.profile_enabled: print("CPU profile (usec, calls): ", world.profile)
|
||||||
|
for entity in world.catalog.entities.values(): entity.free()
|
||||||
|
world.free()
|
||||||
|
quit()
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://biwpwcsboh0s7
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
extends SceneTree
|
||||||
|
const E = preload("res://world/owniverse/math/exact.gd")
|
||||||
|
func _initialize(): call_deferred("run")
|
||||||
|
func restore(value):
|
||||||
|
if value is float and value == floorf(value) and absf(value) <= 9007199254740991: return int(value)
|
||||||
|
if value is Dictionary:
|
||||||
|
for k in value: value[k] = restore(value[k])
|
||||||
|
elif value is Array:
|
||||||
|
for i in value.size(): value[i] = restore(value[i])
|
||||||
|
return value
|
||||||
|
func run():
|
||||||
|
var payload = E.decode(restore(JSON.parse_string(FileAccess.get_file_as_string("res://tests/artifacts/all_objects_speed6.adventure.json"))))
|
||||||
|
var scene = load("res://world/world.tscn").instantiate()
|
||||||
|
var stage = scene.get_node("Stage")
|
||||||
|
stage.owniverse.free()
|
||||||
|
stage.set_script(load("res://tests/fixtures/benchmark_ui_stage.gd"))
|
||||||
|
root.add_child(scene)
|
||||||
|
await process_frame
|
||||||
|
stage.owniverse.state = payload.state.duplicate(true)
|
||||||
|
stage.owniverse.restore_frame_checkpoint(payload.get("simulation", {}))
|
||||||
|
stage.owniverse.presentation.refresh(stage.owniverse.state, stage.owniverse.catalog)
|
||||||
|
stage.set_owniverse_item_value()
|
||||||
|
stage.stage_page_scroller.scroll_horizontal = 4 * stage.PAGE_WIDTH
|
||||||
|
var initial_requested: Variant = stage.owniverse.frame_clock.get("datetime", stage.owniverse.state.time.datetime)
|
||||||
|
var initial_published: Variant = stage.owniverse.state.time.datetime
|
||||||
|
stage.owniverse.profile_enabled = true
|
||||||
|
stage.measuring = true
|
||||||
|
for i in 600: await process_frame
|
||||||
|
stage.measuring = false
|
||||||
|
var samples = stage.frame_samples
|
||||||
|
var total: float = 0
|
||||||
|
for sample in samples: total += sample
|
||||||
|
samples.sort()
|
||||||
|
print("Saved UI: FPS=%.2f mean=%.2fms p95=%.2fms max=%.2fms commits=%d" % [1000.0/(total/samples.size()),total/samples.size(),samples[int(ceil(samples.size()*0.95))-1],samples.back(),stage.owniverse.frame_commits])
|
||||||
|
var requested_advance: Variant = E.subtract(stage.owniverse.frame_clock.datetime, initial_requested)
|
||||||
|
var published_advance: Variant = E.subtract(stage.owniverse.state.time.datetime, initial_published)
|
||||||
|
print("Requested years advanced=", requested_advance, " published=", published_advance, " throughput=", E.divide(published_advance, requested_advance))
|
||||||
|
print("UI CPU profile: ", stage.owniverse.profile)
|
||||||
|
var remaining_objects: int = 0
|
||||||
|
for id in stage.owniverse.catalog.entities:
|
||||||
|
if E.gt(stage.owniverse.ledger.physical_amount(stage.owniverse.state, id), 0): remaining_objects += 1
|
||||||
|
print("Remaining objects: ", remaining_objects)
|
||||||
|
print("Simulation step: ", stage.owniverse.frame_step_seconds)
|
||||||
|
for entity in stage.owniverse.catalog.entities.values(): entity.free()
|
||||||
|
stage.owniverse.free()
|
||||||
|
scene.free()
|
||||||
|
for i in 3: await process_frame
|
||||||
|
quit()
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://3xjh23kg5vrn
|
||||||
@@ -0,0 +1,130 @@
|
|||||||
|
extends SceneTree
|
||||||
|
## Paired old/new cohort timing on separate generated large diagnostic saves.
|
||||||
|
const E = preload("res://world/owniverse/math/exact.gd")
|
||||||
|
var cycles: int = 50
|
||||||
|
var repeats: int = 2
|
||||||
|
var artifact_prefix: String = "large_star_cohorts"
|
||||||
|
|
||||||
|
func _initialize(): call_deferred("run")
|
||||||
|
|
||||||
|
func restore_json_integers(value):
|
||||||
|
if value is float and value == floorf(value) and absf(value) <= 9007199254740991: return int(value)
|
||||||
|
if value is Dictionary:
|
||||||
|
for key in value: value[key] = restore_json_integers(value[key])
|
||||||
|
elif value is Array:
|
||||||
|
for i in value.size(): value[i] = restore_json_integers(value[i])
|
||||||
|
return value
|
||||||
|
|
||||||
|
func dispose(world):
|
||||||
|
for entity in world.catalog.entities.values(): entity.free()
|
||||||
|
world.free()
|
||||||
|
|
||||||
|
func world_from(state: Dictionary, use_cycles: bool):
|
||||||
|
var world = load("res://world/owniverse/owniverse.gd").new()
|
||||||
|
world.catalog.load_definitions(root.get_node("Global").OwniverseEntities)
|
||||||
|
world.state = state.duplicate(true)
|
||||||
|
world.speed = 6
|
||||||
|
world.batches.cycle_stars = use_cycles
|
||||||
|
return world
|
||||||
|
|
||||||
|
func cohort_count(world) -> int:
|
||||||
|
var total: int = 0
|
||||||
|
for id in world.state.batches:
|
||||||
|
if world.catalog.entities[id].group_as == "Star": total += world.state.batches[id].size()
|
||||||
|
return total
|
||||||
|
|
||||||
|
func make_state(initial: Dictionary, use_cycles: bool) -> Dictionary:
|
||||||
|
var world = world_from(initial, use_cycles)
|
||||||
|
var anchor: Variant = E.of("1e12")
|
||||||
|
var shift: Variant = E.subtract(anchor, world.state.time.datetime)
|
||||||
|
for id in world.state.batches:
|
||||||
|
for batch: Dictionary in world.state.batches[id]:
|
||||||
|
for field in ["created_from", "created_to", "start_year", "end_year", "processed_until"]:
|
||||||
|
if batch.has(field): batch[field] = E.add(batch[field], shift)
|
||||||
|
for id in world.state.batch_origins:
|
||||||
|
world.state.batch_origins[id] = E.add(world.state.batch_origins[id], shift)
|
||||||
|
world.state.time = {"datetime": anchor, "year": anchor}
|
||||||
|
var physical: Dictionary = world.ledger.physical_amounts(world.state)
|
||||||
|
var populations: Dictionary = {}
|
||||||
|
for id in world.catalog.entities:
|
||||||
|
var entity = world.catalog.entities[id]
|
||||||
|
if entity.group_as != "Star" or E.le(entity.lifespan, 0) or E.le(physical.get(id, 0), 0): continue
|
||||||
|
world.state.batches[id] = []
|
||||||
|
world.state.batch_origins.erase(id)
|
||||||
|
var lifespan: Variant = world.batches.effective_lifespan(world.state, id)
|
||||||
|
var birth_from: Variant = E.subtract(anchor, lifespan)
|
||||||
|
var duration: Variant = E.minimum(lifespan, 2000000)
|
||||||
|
world.batches.append_batch(world.state, id, physical[id], birth_from, E.add(birth_from, duration))
|
||||||
|
populations[id] = E.fixed(physical[id])
|
||||||
|
var payload: Dictionary = {"format_version": 6, "app_version": "0.7.0", "ui": {"current_page": 0}, "state": world.state,
|
||||||
|
"simulation": {"active_clock": {}, "requested_clock": {}, "productions": [], "speed": 6}}
|
||||||
|
var error: String = root.get_node("SaveManager").validate_data(payload)
|
||||||
|
assert(error.is_empty(), error)
|
||||||
|
var suffix: String = "cycle" if use_cycles else "legacy"
|
||||||
|
var path: String = "res://tests/artifacts/%s_%s.adventure.json" % [artifact_prefix, suffix]
|
||||||
|
var output = FileAccess.open(path, FileAccess.WRITE)
|
||||||
|
assert(output != null)
|
||||||
|
output.store_string(JSON.stringify(E.encode(payload), " ", true, true))
|
||||||
|
output.close()
|
||||||
|
print("Generated %s: star_types=%d stellar_cohorts=%d populations=%s" % [suffix, populations.size(), cohort_count(world), str(populations)])
|
||||||
|
var restored: Dictionary = E.decode(restore_json_integers(JSON.parse_string(FileAccess.get_file_as_string(path))))
|
||||||
|
assert(E.eq(restored.state, world.state), "Diagnostic file roundtrip changed initial state")
|
||||||
|
dispose(world)
|
||||||
|
return restored.state
|
||||||
|
|
||||||
|
func measure(initial: Dictionary, use_cycles: bool, run_index: int) -> Dictionary:
|
||||||
|
var world = world_from(initial, use_cycles)
|
||||||
|
world.profile_enabled = true
|
||||||
|
var samples: Array = []
|
||||||
|
var total_usec: int = 0
|
||||||
|
var initial_year: Variant = world.state.time.datetime
|
||||||
|
var peak_cohorts: int = cohort_count(world)
|
||||||
|
for cycle in cycles:
|
||||||
|
var started: int = Time.get_ticks_usec()
|
||||||
|
world.evolute(0.2)
|
||||||
|
var elapsed: int = Time.get_ticks_usec() - started
|
||||||
|
total_usec += elapsed
|
||||||
|
samples.append(elapsed / 1000.0)
|
||||||
|
peak_cohorts = maxi(peak_cohorts, cohort_count(world))
|
||||||
|
var applied: Variant = E.subtract(world.state.time.datetime, initial_year)
|
||||||
|
assert(E.eq(applied, cycles * 20000))
|
||||||
|
var error: String = root.get_node("SaveManager").validate_data({"format_version": 6, "app_version": "0.7.0", "ui": {"current_page": 0}, "state": world.state})
|
||||||
|
assert(error.is_empty(), error)
|
||||||
|
samples.sort()
|
||||||
|
var result: Dictionary = {"model": "cycle" if use_cycles else "legacy", "repeat": run_index, "cycles": cycles,
|
||||||
|
"mean_ms": total_usec / (1000.0 * cycles), "min_ms": samples.front(), "max_ms": samples.back(), "p95_ms": samples[int(ceil(samples.size() * 0.95)) - 1],
|
||||||
|
"cycles_per_second": cycles * 1000000.0 / total_usec, "throughput": cycles * 200000.0 / total_usec,
|
||||||
|
"game_years": E.fixed(applied), "peak_stellar_cohorts": peak_cohorts, "final_stellar_cohorts": cohort_count(world), "profile": world.profile.duplicate(true)}
|
||||||
|
print("PAIRED_RESULT ", JSON.stringify(result))
|
||||||
|
dispose(world)
|
||||||
|
return result
|
||||||
|
|
||||||
|
func run():
|
||||||
|
for arg in OS.get_cmdline_user_args():
|
||||||
|
if arg.begins_with("cycles="): cycles = maxi(1, arg.trim_prefix("cycles=").to_int())
|
||||||
|
if arg.begins_with("repeats="): repeats = maxi(1, arg.trim_prefix("repeats=").to_int())
|
||||||
|
var raw = JSON.parse_string(FileAccess.get_file_as_string("res://tests/artifacts/all_objects_speed6.adventure.json"))
|
||||||
|
var payload: Dictionary = E.decode(restore_json_integers(raw))
|
||||||
|
assert(root.get_node("SaveManager").validate_data(payload).is_empty())
|
||||||
|
var legacy: Dictionary = make_state(payload.state, false)
|
||||||
|
var current: Dictionary = make_state(payload.state, true)
|
||||||
|
var reference = world_from(legacy, false)
|
||||||
|
var candidate = world_from(current, true)
|
||||||
|
assert(E.eq(reference.ledger.physical_amounts(reference.state), candidate.ledger.physical_amounts(candidate.state)))
|
||||||
|
assert(E.eq(reference.state.ethics, candidate.state.ethics))
|
||||||
|
assert(cohort_count(candidate) <= cohort_count(reference), "Dynamic widening increased the fixture cohort count")
|
||||||
|
dispose(reference)
|
||||||
|
dispose(candidate)
|
||||||
|
if OS.get_cmdline_user_args().has("generate_only"):
|
||||||
|
print("Generated states validate and survive disk roundtrip; physical amounts and ethics match")
|
||||||
|
quit()
|
||||||
|
return
|
||||||
|
var results: Array = []
|
||||||
|
for repeat_index in repeats:
|
||||||
|
var order: Array = [false, true] if repeat_index % 2 == 0 else [true, false]
|
||||||
|
for use_cycles in order:
|
||||||
|
results.append(measure(current if use_cycles else legacy, use_cycles, repeat_index + 1))
|
||||||
|
var output = FileAccess.open("res://tests/artifacts/%s_results.json" % artifact_prefix, FileAccess.WRITE)
|
||||||
|
output.store_string(JSON.stringify({"delta_seconds": 0.2, "speed": 6, "cycles_per_run": cycles, "repeats": repeats, "profile_enabled": true, "runs": results}, " "))
|
||||||
|
output.close()
|
||||||
|
quit()
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://hl20vbt440nb
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
extends "res://tests/benchmark_large_star_cohorts.gd"
|
||||||
|
## Fresh all-object stress world with many valid cohorts sharing death cycles.
|
||||||
|
const Fixture = preload("res://tests/fixtures/civilization_benchmark.gd")
|
||||||
|
var death_cycles: int = 40
|
||||||
|
var fragments_per_cycle: int = 8
|
||||||
|
|
||||||
|
func _initialize():
|
||||||
|
artifact_prefix = "many_objects_fragmented_stars"
|
||||||
|
cycles = 40
|
||||||
|
call_deferred("run")
|
||||||
|
|
||||||
|
func make_state(_initial: Dictionary, use_cycles: bool) -> Dictionary:
|
||||||
|
var world = load("res://world/owniverse/owniverse.gd").new()
|
||||||
|
world.catalog.load_definitions(root.get_node("Global").OwniverseEntities)
|
||||||
|
var global: Node = root.get_node("Global")
|
||||||
|
Fixture.seed(world, global)
|
||||||
|
world.batches.cycle_stars = use_cycles
|
||||||
|
var anchor: Variant = E.of("1e12")
|
||||||
|
var stock: Variant = E.of("1e60")
|
||||||
|
var planets: Variant = E.of("1e28")
|
||||||
|
world.state.time = {"datetime": anchor, "year": anchor}
|
||||||
|
world.state.energy = E.of("1e100")
|
||||||
|
world.state.batches = {}
|
||||||
|
world.state.batch_origins = {}
|
||||||
|
world.state.binds = {}
|
||||||
|
world.state.ethics = {}
|
||||||
|
for id in world.catalog.entities:
|
||||||
|
world.state.amount[id] = 0 if world.catalog.is_group(id) else (planets if world.catalog.entities[id].group_as == "Planet" else stock)
|
||||||
|
world.state.stats.total_amount[id] = world.state.amount[id]
|
||||||
|
# Keep the synthetic universe sparse enough for blast damage to coexist
|
||||||
|
# with all life stages instead of sterilizing them on the first cycle.
|
||||||
|
world.state.amount.S = E.of("1e300")
|
||||||
|
world.state.amount.H = E.of("1e80")
|
||||||
|
world.state.amount.He = E.of("1e79")
|
||||||
|
world.state.amount.Met = E.of("1e79")
|
||||||
|
var dwarfs: Array = ["RD", "OD", "YD", "WYD"]
|
||||||
|
var stages: int = 0
|
||||||
|
for id in global.CivilizationRules:
|
||||||
|
world.state.amount[id] = planets
|
||||||
|
var weights: Array = [0.35, 0.2, 0.15, 0.12, 0.1, 0.08]
|
||||||
|
var profile: Dictionary = {}
|
||||||
|
var ethics: Array = ["m", "l", "w", "d", "c", "b"]
|
||||||
|
for e in 6: profile[ethics[e]] = weights[(e + stages) % 6]
|
||||||
|
world.state.ethics[id] = profile
|
||||||
|
stages += 1
|
||||||
|
# Planetary stages are hosted by all four kinds of dwarf stars.
|
||||||
|
for id in world.catalog.entities:
|
||||||
|
if world.catalog.entities[id].group_as != "Planet" or world.catalog.is_group(id): continue
|
||||||
|
if global.CivilizationRules.has(id) and str(global.CivilizationRules[id].home) != "": continue
|
||||||
|
var held: Variant = E.divide(world.state.amount[id], 4)
|
||||||
|
world.state.amount[id] = 0
|
||||||
|
for dwarf in dwarfs:
|
||||||
|
if not world.state.binds.has(dwarf): world.state.binds[dwarf] = {}
|
||||||
|
world.state.binds[dwarf][id] = held
|
||||||
|
# Bound stars remain physical and continue producing inside structures.
|
||||||
|
var structures: Array = ["SCD", "SCM", "SCG", "GEM", "GSD"]
|
||||||
|
var stellar_types: int = 0
|
||||||
|
for id in world.catalog.entities:
|
||||||
|
if world.catalog.entities[id].group_as != "Star" or E.le(world.catalog.entities[id].lifespan, 0): continue
|
||||||
|
var held: Variant = E.divide(stock, 4)
|
||||||
|
var owner: String = structures[stellar_types % structures.size()]
|
||||||
|
if not world.state.binds.has(owner): world.state.binds[owner] = {}
|
||||||
|
world.state.binds[owner][id] = held
|
||||||
|
world.state.amount[id] = E.subtract(stock, held)
|
||||||
|
stellar_types += 1
|
||||||
|
world.ledger.refresh_groups(world.state)
|
||||||
|
var physical: Dictionary = world.ledger.physical_amounts(world.state)
|
||||||
|
var active_types: int = 0
|
||||||
|
for id in world.catalog.entities:
|
||||||
|
if world.catalog.is_group(id) or E.le(physical.get(id, 0), 0): continue
|
||||||
|
active_types += 1
|
||||||
|
world.state.stats.total_amount[id] = physical[id]
|
||||||
|
var entity = world.catalog.entities[id]
|
||||||
|
if E.le(entity.lifespan, 0) or global.CivilizationRules.has(id): continue
|
||||||
|
if entity.group_as != "Star":
|
||||||
|
world.batches.append_batch(world.state, id, physical[id], anchor, anchor)
|
||||||
|
continue
|
||||||
|
# Valid but deliberately fragmented historical age cohorts. The test
|
||||||
|
# stresses merge eligibility, rather than claiming these are produced
|
||||||
|
# by the ordinary steady-state creation path with one fixed origin.
|
||||||
|
var span: Variant = world.batches.effective_lifespan(world.state, id)
|
||||||
|
var count: int = death_cycles * fragments_per_cycle
|
||||||
|
var assigned: Variant = 0
|
||||||
|
world.state.batches[id] = []
|
||||||
|
for n in count:
|
||||||
|
var cycle: int = n / fragments_per_cycle
|
||||||
|
var fragment: int = n % fragments_per_cycle
|
||||||
|
var start: Variant = E.add(anchor, cycle * 20000 + (fragment + 1) * 1800)
|
||||||
|
var end: Variant = E.add(start, 500)
|
||||||
|
var quota: Variant = E.floor_value(E.mul_div(physical[id], n + 1, count))
|
||||||
|
world.state.batches[id].append({"amount": E.subtract(quota, assigned), "created_from": E.subtract(start, span), "created_to": E.subtract(end, span), "start_year": start, "end_year": end})
|
||||||
|
assigned = quota
|
||||||
|
assert(E.eq(assigned, physical[id]))
|
||||||
|
world.state.batch_origins[id] = world.state.batches[id][0].created_from
|
||||||
|
var raw_cohorts: int = cohort_count(world)
|
||||||
|
world.batches.coarsen(world.state)
|
||||||
|
var payload: Dictionary = {"format_version": 6, "app_version": "0.7.0", "ui": {"current_page": 0}, "state": world.state,
|
||||||
|
"simulation": {"active_clock": {}, "requested_clock": {}, "productions": [], "speed": 6}}
|
||||||
|
var error: String = root.get_node("SaveManager").validate_data(payload)
|
||||||
|
assert(error.is_empty(), error)
|
||||||
|
var suffix: String = "cycle" if use_cycles else "legacy"
|
||||||
|
var path: String = "res://tests/artifacts/%s_%s.adventure.json" % [artifact_prefix, suffix]
|
||||||
|
var output = FileAccess.open(path, FileAccess.WRITE)
|
||||||
|
assert(output != null)
|
||||||
|
output.store_string(JSON.stringify(E.encode(payload), " ", true, true))
|
||||||
|
output.close()
|
||||||
|
var restored: Dictionary = E.decode(restore_json_integers(JSON.parse_string(FileAccess.get_file_as_string(path))))
|
||||||
|
assert(E.eq(restored.state, world.state), "Save roundtrip changed the stress state")
|
||||||
|
print("Generated %s: active_types=%d civilization_stages=%d stellar_types=%d raw_cohorts=%d stored_stellar_cohorts=%d" % [suffix, active_types, stages, stellar_types, raw_cohorts, cohort_count(world)])
|
||||||
|
dispose(world)
|
||||||
|
return restored.state
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://d0plagt7blmcf
|
||||||
@@ -27,6 +27,8 @@ func run():
|
|||||||
quit(1)
|
quit(1)
|
||||||
return
|
return
|
||||||
var initial: Dictionary = E.decode(restore_json_integers(data)).state
|
var initial: Dictionary = E.decode(restore_json_integers(data)).state
|
||||||
|
var validation: String = root.get_node("SaveManager").validate_data(E.decode(restore_json_integers(data)))
|
||||||
|
print("Save validation: ", "OK" if validation.is_empty() else validation)
|
||||||
var delta: float = args[1].to_float() if args.size() > 1 else 1.0 / 60.0
|
var delta: float = args[1].to_float() if args.size() > 1 else 1.0 / 60.0
|
||||||
if not is_finite(delta) or delta <= 0:
|
if not is_finite(delta) or delta <= 0:
|
||||||
quit(1)
|
quit(1)
|
||||||
@@ -36,12 +38,18 @@ func run():
|
|||||||
world.catalog.load_definitions(root.get_node("Global").OwniverseEntities)
|
world.catalog.load_definitions(root.get_node("Global").OwniverseEntities)
|
||||||
world.state = initial.duplicate(true)
|
world.state = initial.duplicate(true)
|
||||||
world.speed = speed
|
world.speed = speed
|
||||||
|
world.profile_enabled = args.has("profile")
|
||||||
var elapsed: Array = []
|
var elapsed: Array = []
|
||||||
for cycle in 6:
|
for cycle in 6:
|
||||||
var start: int = Time.get_ticks_usec()
|
var start: int = Time.get_ticks_usec()
|
||||||
world.evolute(delta)
|
world.evolute(delta)
|
||||||
elapsed.append((Time.get_ticks_usec() - start) / 1000.0)
|
elapsed.append((Time.get_ticks_usec() - start) / 1000.0)
|
||||||
print("Speed %d, six consecutive %s-second steps, ms: %s" % [speed, delta, elapsed])
|
print("Speed %d, six consecutive %s-second steps, ms: %s" % [speed, delta, elapsed])
|
||||||
|
var total_ms: float = 0.0
|
||||||
|
for sample in elapsed: total_ms += sample
|
||||||
|
var throughput: float = 6.0 * delta / (total_ms / 1000.0)
|
||||||
|
print("Simulation throughput: %.3f real-time seconds processed per CPU second; needs >= 1.0 to keep up" % throughput)
|
||||||
|
if world.profile_enabled: print("CPU profile (usec, calls): ", world.profile)
|
||||||
for entity in world.catalog.entities.values(): entity.free()
|
for entity in world.catalog.entities.values(): entity.free()
|
||||||
world.free()
|
world.free()
|
||||||
quit()
|
quit()
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
extends SceneTree
|
||||||
|
## Reproducible stress save; never writes to the player's user:// directory.
|
||||||
|
const E = preload("res://world/owniverse/math/exact.gd")
|
||||||
|
const State = preload("res://world/owniverse/civilization_state.gd")
|
||||||
|
func _initialize(): call_deferred("run")
|
||||||
|
func run():
|
||||||
|
var global: Node = root.get_node("Global")
|
||||||
|
var world = load("res://world/owniverse/owniverse.gd").new()
|
||||||
|
world.catalog.load_definitions(global.OwniverseEntities)
|
||||||
|
world.speed = 6
|
||||||
|
world.state.time = {"datetime": 1000000000000000, "year": 1000000000000000, "tick_remainder": 0}
|
||||||
|
world.state.energy = E.of("1e100")
|
||||||
|
for id in world.catalog.entities:
|
||||||
|
world.state.amount[id] = E.of("6e60")
|
||||||
|
world.state.stats.total_amount[id] = world.state.amount[id]
|
||||||
|
if global.CivilizationRules.has(id): world.state.amount[id] = E.of("6e20")
|
||||||
|
world.state.amount.S = E.of("1e90")
|
||||||
|
world.state.amount.H = E.of("1e90")
|
||||||
|
world.state.amount.He = E.of("1e80")
|
||||||
|
world.state.amount.Met = E.of("1e80")
|
||||||
|
world.ledger.refresh_groups(world.state)
|
||||||
|
State.enforce_capacity(world, world.state, global.CivilizationRules, world.state.time.year)
|
||||||
|
State.reconcile(world, world.state, global.CivilizationRules)
|
||||||
|
var cohorts: int = 0
|
||||||
|
for id in world.catalog.entities:
|
||||||
|
if world.catalog.is_group(id): continue
|
||||||
|
var lifespan: Variant = State.effective_span(world, world.state, id, global.CivilizationRules)
|
||||||
|
if E.le(lifespan, 0): continue
|
||||||
|
world.state.batches[id] = []
|
||||||
|
var width: Variant = E.divide(lifespan, 10)
|
||||||
|
for i in 10:
|
||||||
|
var start: Variant = E.add(world.state.time.year, E.multiply(width, i))
|
||||||
|
var end: Variant = E.add(start, width)
|
||||||
|
var birth: Variant = E.subtract(start, lifespan)
|
||||||
|
world.state.batches[id].append({"amount": E.divide(world.state.amount[id], 10), "created_from": birth, "created_to": E.add(birth, width), "start_year": start, "end_year": end})
|
||||||
|
cohorts += 1
|
||||||
|
world.state.batch_origins[id] = world.state.batches[id][0].created_from
|
||||||
|
world.state.stats.total_amount = world.state.amount.duplicate(true)
|
||||||
|
var manager: Node = root.get_node("SaveManager")
|
||||||
|
var folder: String = ProjectSettings.globalize_path("res://tests/artifacts")
|
||||||
|
DirAccess.make_dir_recursive_absolute(folder)
|
||||||
|
manager.save_directory = folder
|
||||||
|
global.save_plaintext_copy = true
|
||||||
|
var success: bool = manager.save_data("all_objects_speed6", "qwerty", {"state": world.state, "simulation": world.frame_checkpoint(), "ui": {"current_page": 4}})
|
||||||
|
var empty: Array = []
|
||||||
|
for id in world.catalog.entities:
|
||||||
|
if E.le(world.state.amount.get(id, 0), 0): empty.append(id)
|
||||||
|
print("Full save: objects=%d civilization stages=%d cohorts=%d empty=%s success=%s" % [world.catalog.entities.size(), global.CivilizationRules.size(), cohorts, empty, success])
|
||||||
|
for entity in world.catalog.entities.values(): entity.free()
|
||||||
|
world.free()
|
||||||
|
quit(0 if success and empty.is_empty() else 1)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://1icskkk5nld8
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
extends "res://world/owniverse/object_ledger.gd"
|
||||||
|
var checks: int = 0
|
||||||
|
var failures: int = 0
|
||||||
|
|
||||||
|
func round_object_allocations(target: Dictionary, affected: Variant = null) -> void:
|
||||||
|
var reference: Dictionary = target.duplicate(true)
|
||||||
|
super.round_object_allocations(reference)
|
||||||
|
super.round_object_allocations(target, affected)
|
||||||
|
checks += 1
|
||||||
|
if not E.eq(target, reference):
|
||||||
|
failures += 1
|
||||||
|
push_error("Selective rounding differs from full rounding")
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
uid://csew6jyuiwxh0
|
||||||
Vendored
+8
@@ -1,4 +1,12 @@
|
|||||||
extends "res://stage/stage.gd"
|
extends "res://stage/stage.gd"
|
||||||
|
var actions_refreshes: int = 0
|
||||||
|
|
||||||
|
func tick_ui(delta: float) -> void:
|
||||||
|
super._process(delta)
|
||||||
|
|
||||||
|
func _set_active_page_actions() -> void:
|
||||||
|
actions_refreshes += 1
|
||||||
|
super._set_active_page_actions()
|
||||||
|
|
||||||
# Keep scene wiring and display logic, without accessing the player's save.
|
# Keep scene wiring and display logic, without accessing the player's save.
|
||||||
func load_data() -> bool:
|
func load_data() -> bool:
|
||||||
|
|||||||
@@ -88,6 +88,15 @@ func run() -> void:
|
|||||||
manager.flush_saves()
|
manager.flush_saves()
|
||||||
check(E.eq(manager.load_data("incompatible", "test-password").state, data.state), "New format saves and reloads after incompatible file")
|
check(E.eq(manager.load_data("incompatible", "test-password").state, data.state), "New format saves and reloads after incompatible file")
|
||||||
|
|
||||||
|
var readable_path: String = directory.path_join("readable-incompatible.adventure")
|
||||||
|
var readable = FileAccess.open_encrypted_with_pass(readable_path, FileAccess.WRITE, "test-password")
|
||||||
|
readable.store_var(manager._snapshot("readable-incompatible", "test-password", data).payload, false)
|
||||||
|
readable.close()
|
||||||
|
manager.blocked_saves["readable-incompatible"] = true
|
||||||
|
check(manager.archive_incompatible_save("readable-incompatible"), "Readable incompatible save is archived")
|
||||||
|
check((not FileAccess.file_exists(readable_path)) and FileAccess.file_exists(E.add(readable_path, ".incompatible.bak")), "Archived save no longer occupies the active path")
|
||||||
|
check(not manager.blocked_saves.has("readable-incompatible"), "Archiving an incompatible save permits a fresh save")
|
||||||
|
|
||||||
# Expected failures below must leave the last good encrypted file intact.
|
# Expected failures below must leave the last good encrypted file intact.
|
||||||
data.state.energy = E.neg(1)
|
data.state.energy = E.neg(1)
|
||||||
manager.request_save("latest", "test-password", data)
|
manager.request_save("latest", "test-password", data)
|
||||||
|
|||||||
@@ -38,6 +38,43 @@ func dispose(world) -> void:
|
|||||||
|
|
||||||
func run() -> void:
|
func run() -> void:
|
||||||
var world = fixture()
|
var world = fixture()
|
||||||
|
world.catalog.entities.N.lifespan = 100
|
||||||
|
world.batches.append_batch(world.state, "N", 2, 10, 10)
|
||||||
|
world.batches.append_batch(world.state, "N", 3, 10, 10)
|
||||||
|
check(world.state.batches.N.size() == 1 and E.eq(world.state.batches.N[0].amount, 5), "Repeated insertion merges using the cohort index")
|
||||||
|
world.batches.append_batch(world.state, "N", 1, 0, 0)
|
||||||
|
check(E.eq(world.state.batches.N[0].created_from, 0), "Earlier insertion preserves chronological order")
|
||||||
|
var replaced: Array = world.state.batches.N.duplicate(true)
|
||||||
|
world.state.batches.N = replaced
|
||||||
|
world.batches.append_batch(world.state, "N", 7, 10, 10)
|
||||||
|
check(E.eq(replaced[1].amount, 12), "Replacing cohort array invalidates cached references")
|
||||||
|
var separate: Dictionary = world.state.duplicate(true)
|
||||||
|
world.batches.append_batch(separate, "N", 9, 10, 10)
|
||||||
|
check(E.eq(separate.batches.N[1].amount, 21) and E.eq(world.state.batches.N[1].amount, 12), "Index is isolated between transaction states")
|
||||||
|
dispose(world)
|
||||||
|
world = fixture()
|
||||||
|
for speed in range(1, 7):
|
||||||
|
world.state.speed = speed
|
||||||
|
check(E.eq(world.batches.window_duration(world.state, 100), 2.5 if speed < 4 else pow(10, speed - 2)), "Windows follow selected speed")
|
||||||
|
check(E.eq(world.batches.window_duration(world.state, 5), 5), "Short explosions retain their timing")
|
||||||
|
var huge: Variant = E.of("10000000000000000000000000000000000000000")
|
||||||
|
world.catalog.entities.N.lifespan = 100
|
||||||
|
world.state.batches.N = [
|
||||||
|
{"amount": huge, "start_year": 100, "end_year": 110, "created_from": 0, "created_to": 10, "withdraw_remainder": 0.25},
|
||||||
|
{"amount": 7, "start_year": 120, "end_year": 130, "created_from": 20, "created_to": 30, "withdraw_remainder": 0.5}
|
||||||
|
]
|
||||||
|
world.batches.coarsen(world.state)
|
||||||
|
check(world.state.batches.N.size() == 1, "High speed combines nearby cohorts")
|
||||||
|
check(E.eq(world.state.batches.N[0].amount, E.add(huge, 7)), "Coarsening preserves exact large whole counts")
|
||||||
|
check(E.eq(world.state.batches.N[0].withdraw_remainder, 0.75), "Coarsening preserves withdrawal carry")
|
||||||
|
var combined: Dictionary = world.state.batches.N[0].duplicate(true)
|
||||||
|
world.batches.coarsen(world.state)
|
||||||
|
check(world.state.batches.N[0] == combined, "Coarsening is idempotent")
|
||||||
|
world.state.speed = 1
|
||||||
|
world.batches.coarsen(world.state)
|
||||||
|
check(world.state.batches.N[0] == combined, "Slowing down does not invent finer history")
|
||||||
|
dispose(world)
|
||||||
|
world = fixture()
|
||||||
world.state.batch_origins.LGRB = E.of("10357034.80000000074505806")
|
world.state.batch_origins.LGRB = E.of("10357034.80000000074505806")
|
||||||
var boundary: Variant = E.of("41215289.79999999701976776")
|
var boundary: Variant = E.of("41215289.79999999701976776")
|
||||||
for interval in [[E.subtract(boundary, E.of("2.5")), E.add(boundary, E.of("2.25"))], [boundary, E.add(boundary, 2)]]:
|
for interval in [[E.subtract(boundary, E.of("2.5")), E.add(boundary, E.of("2.25"))], [boundary, E.add(boundary, 2)]]:
|
||||||
@@ -54,5 +91,121 @@ func run() -> void:
|
|||||||
check(E.eq(total, 100), "Boundary correction preserves all objects")
|
check(E.eq(total, 100), "Boundary correction preserves all objects")
|
||||||
check(E.le(world.state.batches.LGRB.size(), 7), "Finite number of windows")
|
check(E.le(world.state.batches.LGRB.size(), 7), "Finite number of windows")
|
||||||
dispose(world)
|
dispose(world)
|
||||||
|
world = fixture()
|
||||||
|
world.batches.append_batch(world.state, "N", 100, 100, 100)
|
||||||
|
var first: Dictionary = world.state.batches.N[0].duplicate(true)
|
||||||
|
world.batches.append_batch(world.state, "N", 7, 100, 100)
|
||||||
|
check(world.state.batches.N.size() == 1 and E.eq(world.state.batches.N[0].amount, 107), "Repeated births merge directly into one window")
|
||||||
|
check(E.eq(world.state.batches.N[0].start_year, first.start_year), "Direct merge preserves transition time")
|
||||||
|
check(world.batches.withdraw_batches(world.state, "N", 0).is_empty(), "Future cohorts are not withdrawn")
|
||||||
|
var untouched: Array = world.state.batches.N
|
||||||
|
check(world.batches.withdraw_batches(world.state, "N", 1).is_empty() and is_same(untouched, world.state.batches.N), "Readiness index skips future cohorts")
|
||||||
|
world.state.batches.N = [{"amount": 7, "start_year": 0, "end_year": 0, "created_from": 0, "created_to": 0}]
|
||||||
|
check(world.batches.withdraw_batches(world.state, "N", 1).size() == 1, "Replacing cohorts invalidates readiness index")
|
||||||
|
world.batches.append_batch(world.state, "N", 3, 100, 100)
|
||||||
|
check(E.eq(world.state.batches.N[0].amount, 3), "Replacing cohorts invalidates instant merge cache")
|
||||||
|
world.batches.withdraw_batches(world.state, "N", 0)
|
||||||
|
world.batches.scale_batches(world.state, "N", 0)
|
||||||
|
world.batches.withdraw_batches(world.state, "N", 1)
|
||||||
|
check(world.state.batches.N.is_empty(), "Scaling invalidates readiness and removes zero cohorts")
|
||||||
|
dispose(world)
|
||||||
|
for selected_speed in [4, 5, 6]:
|
||||||
|
world = fixture()
|
||||||
|
world.speed = selected_speed
|
||||||
|
world.state.time = {"datetime": 37, "year": 37}
|
||||||
|
var cycle_width: Variant = E.multiply(E.power(10, selected_speed - 1), E.of("0.2"))
|
||||||
|
world.catalog.entities.HG.lifespan = E.multiply(cycle_width, 3)
|
||||||
|
world.state.batches = {}
|
||||||
|
var life: Variant = world.batches.effective_lifespan(world.state, "HG")
|
||||||
|
var deadline: Variant = E.add(37, E.multiply(cycle_width, 4))
|
||||||
|
world.batches.append_batch(world.state, "HG", huge, E.add(37, 1), E.add(37, 1))
|
||||||
|
world.batches.append_batch(world.state, "HG", 7, E.add(37, 2), E.add(37, 2))
|
||||||
|
check(world.state.batches.HG.size() == 1 and E.eq(world.state.batches.HG[0].amount, E.add(huge, 7)), "Births in the same death cycle merge exactly")
|
||||||
|
var point: Dictionary = world.state.batches.HG[0]
|
||||||
|
check(E.eq(point.start_year, deadline) and E.eq(point.end_year, deadline), "High-speed stellar cohort transitions at one cycle boundary")
|
||||||
|
var born: Variant = E.add(37, 1)
|
||||||
|
var delay: Variant = E.subtract(deadline, E.add(born, life))
|
||||||
|
check(E.ge(delay, 0) and E.le(delay, cycle_width), "Transition is delayed by at most one cycle")
|
||||||
|
var encoded: Dictionary = E.decode(E.encode(world.state))
|
||||||
|
check(E.eq(encoded.batches, world.state.batches), "Cycle cohorts survive exact save roundtrip")
|
||||||
|
check(world.batches.withdraw_batches(world.state, "HG", E.subtract(deadline, 1)).is_empty(), "Cycle cohort is not withdrawn partially")
|
||||||
|
var expired: Array = world.batches.withdraw_batches(world.state, "HG", deadline)
|
||||||
|
check(expired.size() == 1 and E.eq(expired[0].amount, E.add(huge, 7)) and world.state.batches.HG.is_empty(), "Boundary withdraws the exact whole cohort once")
|
||||||
|
check(world.batches.withdraw_batches(world.state, "HG", deadline).is_empty(), "Repeated boundary cannot withdraw twice")
|
||||||
|
world.batches.append_batch(world.state, "HG", 3, E.add(37, 1), E.add(37, 1))
|
||||||
|
check(E.eq(world.state.batches.HG[0].amount, 3), "Withdrawal invalidates cycle insertion references")
|
||||||
|
world.state.batches.HG = []
|
||||||
|
world.batches.append_batch(world.state, "HG", 11, 37, E.add(37, E.multiply(cycle_width, 3)))
|
||||||
|
var total: Variant = 0
|
||||||
|
for batch: Dictionary in world.state.batches.HG:
|
||||||
|
total = E.add(total, batch.amount)
|
||||||
|
check(E.eq(batch.start_year, batch.end_year), "Distributed births create point cohorts")
|
||||||
|
check(E.eq(total, 11) and world.state.batches.HG.size() == 3, "Distributed births retain all integers across death cycles")
|
||||||
|
var before_coarsen: Dictionary = world.state.duplicate(true)
|
||||||
|
world.batches.coarsen(world.state)
|
||||||
|
check(E.eq(before_coarsen, world.state), "Coarsening cannot smear point stellar transitions")
|
||||||
|
world.state.batches.HG = []
|
||||||
|
var completed: Dictionary = {}
|
||||||
|
var cutoff: Variant = E.add(37, E.multiply(cycle_width, 10))
|
||||||
|
var integral: Variant = world.batches.append_batch(world.state, "HG", 11, 37, E.add(37, E.multiply(cycle_width, 3)), completed, cutoff)
|
||||||
|
var reference_integral: Variant = 0
|
||||||
|
total = 0
|
||||||
|
for part: Dictionary in completed.HG:
|
||||||
|
total = E.add(total, part.amount)
|
||||||
|
reference_integral = E.add(reference_integral, E.multiply(part.amount, E.subtract(cutoff, part.to)))
|
||||||
|
reference_integral = E.subtract(E.multiply(11, E.subtract(cutoff, E.add(37, E.multiply(cycle_width, E.of("1.5"))))), reference_integral)
|
||||||
|
check(E.eq(total, 11) and world.state.batches.HG.is_empty(), "Already completed stars retain counts without stored batches")
|
||||||
|
check(E.eq(integral, reference_integral), "Lifetime production agrees with point transitions")
|
||||||
|
world.speed = 1
|
||||||
|
world.state.batches.HG = []
|
||||||
|
world.batches.append_batch(world.state, "HG", 10, 100, 100)
|
||||||
|
check(E.gt(world.state.batches.HG[0].end_year, world.state.batches.HG[0].start_year), "Low speed retains gradual stellar transitions")
|
||||||
|
dispose(world)
|
||||||
|
world = fixture()
|
||||||
|
world.speed = 6
|
||||||
|
world.state.amount.RHG = 5
|
||||||
|
world.batches.append_batch(world.state, "RHG", 5, 0, 0)
|
||||||
|
world.ledger.refresh_groups(world.state)
|
||||||
|
var validation: String = root.get_node("SaveManager").validate_data({"format_version": 6, "app_version": "", "ui": {"current_page": 0}, "state": world.state})
|
||||||
|
check(validation.is_empty(), "Cycle-star state born at zero validates: " + validation)
|
||||||
|
var lifespan: Variant = world.batches.effective_lifespan(world.state, "RHG")
|
||||||
|
check(E.eq(world.state.batches.RHG[0].start_year, lifespan), "Birth exactly aligned with a death boundary adds no extra cycle")
|
||||||
|
dispose(world)
|
||||||
|
world = fixture()
|
||||||
|
world.speed = 6
|
||||||
|
world.state.batches.RD = []
|
||||||
|
world.batches.append_batch(world.state, "RD", huge, 0, 2000000)
|
||||||
|
check(world.state.batches.RD.size() == 1, "Long-lived stars are not subdivided into cycle buckets")
|
||||||
|
var long_cohort: Dictionary = world.state.batches.RD[0].duplicate(true)
|
||||||
|
world.batches.append_batch(world.state, "RD", 7, 10000, 20000)
|
||||||
|
check(world.state.batches.RD.size() == 1 and E.eq(world.state.batches.RD[0].amount, E.add(huge, 7)), "New births still merge into their original wide stellar group")
|
||||||
|
check(E.eq(world.state.batches.RD[0].start_year, long_cohort.start_year) and E.eq(world.state.batches.RD[0].end_year, long_cohort.end_year), "Long-lived transition interval is preserved")
|
||||||
|
world.state.batches.RD = [
|
||||||
|
{"amount": huge, "start_year": 1000, "end_year": 2000, "withdraw_remainder": 0.25},
|
||||||
|
{"amount": 7, "start_year": 3000, "end_year": 4000, "withdraw_remainder": 0.5},
|
||||||
|
{"amount": 9, "start_year": 19000, "end_year": 21000},
|
||||||
|
{"amount": 11, "start_year": 22000, "end_year": 1000000},
|
||||||
|
{"amount": 13, "start_year": 21000, "end_year": 22000},
|
||||||
|
]
|
||||||
|
var spanning: Dictionary = world.state.batches.RD[2].duplicate(true)
|
||||||
|
var wide: Dictionary = world.state.batches.RD[3].duplicate(true)
|
||||||
|
world.batches.coarsen(world.state)
|
||||||
|
check(world.state.batches.RD.size() == 4, "Only cohorts ending entirely within the same cycle are merged")
|
||||||
|
var merged: Dictionary = {}
|
||||||
|
var broad_kept: bool = false
|
||||||
|
var crossing_kept: bool = false
|
||||||
|
for batch: Dictionary in world.state.batches.RD:
|
||||||
|
if E.eq(batch.start_year, 20000) and E.eq(batch.end_year, 20000): merged = batch
|
||||||
|
if E.eq(batch, wide): broad_kept = true
|
||||||
|
if E.eq(batch, spanning): crossing_kept = true
|
||||||
|
check(not merged.is_empty() and E.eq(merged.amount, E.add(huge, 7)) and E.eq(merged.withdraw_remainder, 0.75), "Merged stellar cohort retains exact population and carries")
|
||||||
|
check(broad_kept and crossing_kept, "Wide and cycle-crossing cohorts remain unchanged")
|
||||||
|
var once: Dictionary = world.state.duplicate(true)
|
||||||
|
world.batches.coarsen(world.state)
|
||||||
|
check(E.eq(world.state, once), "Dynamic stellar merging is idempotent")
|
||||||
|
world.state.batches.HG = [{"amount": 3, "start_year": 20000, "end_year": 20000}, {"amount": 4, "start_year": 20001, "end_year": 21000}]
|
||||||
|
world.batches.coarsen(world.state)
|
||||||
|
check(world.state.batches.HG.size() == 2, "An exact boundary belongs to the preceding cycle")
|
||||||
|
dispose(world)
|
||||||
print(("Batch boundaries: %d checks, %d failures" % [checks, failures]))
|
print(("Batch boundaries: %d checks, %d failures" % [checks, failures]))
|
||||||
quit((0 if E.eq(failures, 0) else 1))
|
quit((0 if E.eq(failures, 0) else 1))
|
||||||
|
|||||||
@@ -1,165 +1,136 @@
|
|||||||
extends SceneTree
|
extends SceneTree
|
||||||
const E = preload("res://world/owniverse/math/exact.gd")
|
const E = preload("res://world/owniverse/math/exact.gd")
|
||||||
const Clock = preload("res://world/owniverse/simulation_time.gd")
|
const State = preload("res://world/owniverse/civilization_state.gd")
|
||||||
var checks: int = 0
|
var checks: int = 0
|
||||||
var failures: int = 0
|
var failures: int = 0
|
||||||
|
|
||||||
func _initialize() -> void:
|
func _initialize(): call_deferred("run")
|
||||||
call_deferred("run")
|
func check(value: bool, message: String) -> void:
|
||||||
|
checks += 1
|
||||||
func check(condition: bool, message: String) -> void:
|
if not value:
|
||||||
checks = E.add(checks, 1)
|
failures += 1
|
||||||
if (not condition):
|
|
||||||
failures = E.add(failures, 1)
|
|
||||||
push_error(message)
|
push_error(message)
|
||||||
|
|
||||||
func fixture():
|
func fixture():
|
||||||
var world = load("res://world/owniverse/owniverse.gd").new()
|
var world = load("res://world/owniverse/owniverse.gd").new()
|
||||||
var global: Node = root.get_node("Global")
|
world.catalog.load_definitions(root.get_node("Global").OwniverseEntities)
|
||||||
for id in global.OwniverseEntities:
|
for id in world.catalog.entities:
|
||||||
var entity = load("res://world/owniverse/owniverse_entity.gd").new(global.OwniverseEntities[id])
|
|
||||||
world.catalog.entities[id] = entity
|
|
||||||
world.state.amount[id] = 0
|
world.state.amount[id] = 0
|
||||||
world.state.stats.total_amount[id] = 0
|
world.state.stats.total_amount[id] = 0
|
||||||
if E.ne(entity.group_as, ""):
|
for id in ["RD", "OD", "YD", "WYD", "BG", "TWD", "SNS", "MGT", "BH25", "SMBH", "SCD", "SCS", "SCM", "SCL", "SCG", "GED", "GES", "GEM", "GEL", "GEG", "LGG", "LSC", "LGF", "LGW", "LUB"]:
|
||||||
world.state.amount[entity.group_as] = 0
|
if world.state.amount.has(id): world.state.amount[id] = E.of("1e60")
|
||||||
world.state.stats.total_amount[entity.group_as] = 0
|
|
||||||
world.catalog.entities["N"].life_product = {}
|
|
||||||
world.catalog.entities["N"].product_per_year_type = "H"
|
|
||||||
world.catalog.entities["N"].product_per_year_amount = 10
|
|
||||||
world.catalog.entities["N"].auto = 0
|
|
||||||
world.state.amount.N = 1
|
|
||||||
return world
|
return world
|
||||||
|
|
||||||
func dispose(world) -> void:
|
func dispose(world):
|
||||||
for entity in world.catalog.entities.values():
|
for entity in world.catalog.entities.values(): entity.free()
|
||||||
entity.free()
|
|
||||||
world.free()
|
world.free()
|
||||||
|
|
||||||
func seed_population(world, id: String, count: Variant, time: Variant = 1.0) -> void:
|
func population(world) -> Variant:
|
||||||
world.state.amount.N = 0
|
|
||||||
world.state.amount[id] = count
|
|
||||||
world.state.batches[id] = [{"amount": count, "start_year": time, "end_year": time}]
|
|
||||||
world.evolution.initialize_life_batches()
|
|
||||||
|
|
||||||
func sum_ethics(world, id: String) -> Variant:
|
|
||||||
var result: Variant = 0
|
var result: Variant = 0
|
||||||
for n in world.state.ethics.get(id, {}).values(): result = E.add(result, n)
|
for id in world.ledger.physical_amounts(world.state):
|
||||||
|
if root.get_node("Global").CivilizationRules.has(id) or world.catalog.entities[id].group_as == "Planet":
|
||||||
|
result = E.add(result, world.ledger.physical_amount(world.state, id))
|
||||||
return result
|
return result
|
||||||
|
|
||||||
func invariants(world) -> void:
|
func invariants(world) -> void:
|
||||||
var physical: Dictionary = world.ledger.physical_amounts(world.state)
|
var physical: Dictionary = world.ledger.physical_amounts(world.state)
|
||||||
|
for id in physical:
|
||||||
|
check(E.ge(physical[id], 0) and E.eq(physical[id], E.floor_value(physical[id])), "Physical counts remain nonnegative whole: " + id)
|
||||||
for id in world.state.ethics:
|
for id in world.state.ethics:
|
||||||
check(E.eq(sum_ethics(world, id), physical.get(id, 0)), E.add("Ethics equal physical population for ", id))
|
var total: float = 0.0
|
||||||
for n in world.state.ethics[id].values():
|
for value in world.state.ethics[id].values():
|
||||||
if (E.lt(n, 0) or E.ne(n, E.floor_value(n))): check(false, "Invalid ethic amount")
|
check(is_finite(value) and value >= 0.0 and value <= 1.0, "Finite normalized ethic shares")
|
||||||
check(E.eq(root.get_node("SaveManager").validate_data({"format_version": 5, "app_version": "", "ui": {"current_page": 0}, "state": world.state}), ""), "Civilization state validates")
|
total += value
|
||||||
|
check(absf(total - 1.0) < 1e-12, "Ethic shares sum to one: " + id)
|
||||||
|
|
||||||
func run() -> void:
|
func configure(rules: Dictionary, progress: float, degradation: float, span: int = 100) -> void:
|
||||||
|
for id in rules:
|
||||||
|
if rules[id].ethics.is_empty(): continue
|
||||||
|
rules[id].span = span
|
||||||
|
rules[id].fights = false
|
||||||
|
rules[id].colonizes = false
|
||||||
|
rules[id].diplomacy = false
|
||||||
|
for row in rules[id].ethics.values():
|
||||||
|
row.progress = progress
|
||||||
|
row.degradation = degradation
|
||||||
|
row.war = 0
|
||||||
|
row.colonization = 0
|
||||||
|
row.fall = rules[id].previous + ":1"
|
||||||
|
|
||||||
|
func run():
|
||||||
var global: Node = root.get_node("Global")
|
var global: Node = root.get_node("Global")
|
||||||
var baseline: Dictionary = global.CivilizationRules.duplicate(true)
|
var baseline: Dictionary = global.CivilizationRules.duplicate(true)
|
||||||
|
configure(global.CivilizationRules, 1.0, 0.0)
|
||||||
var world = fixture()
|
var world = fixture()
|
||||||
seed_population(world, "C0.2", 60000)
|
var count: Variant = E.of("10000000000000000000000000000000000000007")
|
||||||
world.evolution.evolve_batches(world.state, 1)
|
world.state.amount["C0.2"] = count
|
||||||
check(E.gt(world.state.amount["C0.3"], 0), "C0.2 actually progresses")
|
world.state.ethics["C0.2"] = State.empty_profile()
|
||||||
check(E.gt(world.state.amount["C0.1"], 0), "C0.2 actually degrades")
|
world.civilization_flow.evolve(world.state, 0, 100)
|
||||||
check(E.eq(world.state.civilization_stats.get("wars", 0), 0), "Table disables early wars")
|
check(E.eq(population(world), count), "Continuous chain conserves arbitrary-size whole population")
|
||||||
check(E.eq(E.add(E.add(world.state.amount["C0.2"], world.state.amount["C0.3"]), world.state.amount["C0.1"]), 60000), "Ordinary evolution conserves population")
|
check(absf(E.approx(E.divide(world.state.amount["C0.2"], count)) - exp(-1.0)) < 1e-12, "Survival follows the exponential interval law")
|
||||||
check(E.eq(world.state.stats.total_amount["C0.2"], 0), "Survivors do not count as new civilizations")
|
check(E.gt(world.state.amount["C0.4"], 0), "One interval includes multiple successive stages")
|
||||||
check(E.gt(world.state.civilization_stats.worship, 0), "Worship derived from surviving ethics")
|
check(not world.state.batches.has("C0.2") and not world.state.batches.has("C0.3"), "Civilizations do not create age batches")
|
||||||
invariants(world)
|
invariants(world)
|
||||||
var restored = fixture()
|
var half = fixture()
|
||||||
restored.state = E.decode(bytes_to_var(var_to_bytes(E.encode(world.state))))
|
half.state.amount["C0.2"] = count
|
||||||
world.evolution.evolve_batches(world.state, 2100)
|
half.state.ethics["C0.2"] = State.empty_profile()
|
||||||
restored.evolution.evolve_batches(restored.state, 2100)
|
half.civilization_flow.evolve(half.state, 0, 50)
|
||||||
check(E.eq(world.state, restored.state), "Save resumes deterministic ethical evolution")
|
half.civilization_flow.evolve(half.state, 50, 100)
|
||||||
invariants(world)
|
for id in global.CivilizationRules:
|
||||||
dispose(restored)
|
check(E.approx(E.divide(E.absolute(E.subtract(world.state.amount.get(id, 0), half.state.amount.get(id, 0))), count)) < 1e-12, "Splitting the interval preserves continuous dynamics: " + id)
|
||||||
|
dispose(half)
|
||||||
dispose(world)
|
dispose(world)
|
||||||
|
|
||||||
|
configure(global.CivilizationRules, 0.0, 0.0)
|
||||||
world = fixture()
|
world = fixture()
|
||||||
world.state.amount.RD = 100000000
|
world.state.amount["C0.2"] = 10001
|
||||||
seed_population(world, "C2.0", 60000)
|
world.state.ethics["C0.2"] = {"m": 1.0, "l": 0.0, "w": 0.0, "d": 0.0, "c": 0.0, "b": 0.0}
|
||||||
world.state.amount["C1.9"] = 10000
|
world.civilization_flow.evolve(world.state, 0, 100)
|
||||||
world.evolution.initialize_life_batches()
|
check(E.eq(world.state.amount["C0.2"], 10001), "Disabled stage movement retains every individual")
|
||||||
world.evolution.evolve_batches(world.state, 1)
|
check(world.state.ethics["C0.2"].m < 1.0 and world.state.ethics["C0.2"].m > 0.9, "Analytical drift changes shares without materializing populations")
|
||||||
check(E.gt(world.state.civilization_stats.wars, 0), "Wars execute when enabled")
|
|
||||||
check(E.gt(world.state.civilization_stats.collateral, 0), "Wars affect previous-stage populations")
|
|
||||||
check(E.gt(world.state.amount["C2.1"], 0), "Winners and peaceful progress reach next stage")
|
|
||||||
invariants(world)
|
invariants(world)
|
||||||
dispose(world)
|
dispose(world)
|
||||||
|
|
||||||
|
configure(global.CivilizationRules, 1.0, 0.0)
|
||||||
world = fixture()
|
world = fixture()
|
||||||
world.state.amount.RD = 1
|
for id in ["RD", "OD", "YD", "WYD"]: world.state.amount[id] = 0
|
||||||
world.state.binds.RD = {"HP": 5, "GG": 5, "AB": 5, "RP": 5}
|
world.state.amount["C1.9"] = 101
|
||||||
seed_population(world, "C1.6", 60000)
|
world.civilization_flow.evolve(world.state, 0, 100)
|
||||||
for row : Dictionary in global.CivilizationRules["C1.6"].ethics.values(): row.degradation = "0"
|
check(E.eq(world.state.amount["C1.9"], 101), "Unfunded interstellar flows return to their source")
|
||||||
world.evolution.evolve_batches(world.state, 1)
|
check(E.eq(population(world), 101), "Resource admission conserves exact population")
|
||||||
var after: Dictionary = world.ledger.physical_amounts(world.state)
|
dispose(world)
|
||||||
check(E.eq(world.state.civilization_stats.colonies, 20), "Colonization limited to real targets")
|
|
||||||
check(E.eq(E.add(E.add(E.add(after.HP, after.GG), after.AB), after.RP), 0), "Colonized objects consumed once")
|
configure(global.CivilizationRules, 0.0, 0.0, 1)
|
||||||
check(E.eq(world.state.binds.RD.get("C1.4", 0), 20), "Colonies retain target host and use two-stages-earlier level")
|
world = fixture()
|
||||||
var totals: Variant = 0
|
world.state.amount["C1.6"] = 60000
|
||||||
for id in after:
|
world.state.binds.RD = {"HP": 5, "RP": 5, "GG": 5, "AB": 5}
|
||||||
if E.eq(world.catalog.entities[id].group_as, "Planet"): totals = E.add(totals, after[id])
|
global.CivilizationRules["C1.6"].colonizes = true
|
||||||
check(E.eq(totals, 60020), "Colonization replaces planets, does not create extra worlds")
|
for row in global.CivilizationRules["C1.6"].ethics.values(): row.colonization = 1
|
||||||
|
world.civilization_flow.evolve(world.state, 0, 1)
|
||||||
|
check(E.eq(world.state.civilization_stats.colonies, 20), "Integrated colonization is limited by real planet stock")
|
||||||
|
check(E.eq(world.state.binds.RD.get("C1.4", 0), 20), "Colonies retain the target stellar owner")
|
||||||
|
check(E.eq(population(world), 60020), "Colonization creates precisely the consumed number of occupied worlds")
|
||||||
|
var physical: Dictionary = world.ledger.physical_amounts(world.state)
|
||||||
|
for resource in ["HP", "RP", "GG", "AB"]: check(E.eq(physical[resource], 0), "Planet stock consumed once: " + resource)
|
||||||
invariants(world)
|
invariants(world)
|
||||||
dispose(world)
|
dispose(world)
|
||||||
|
|
||||||
global.CivilizationRules = baseline.duplicate(true)
|
global.CivilizationRules = baseline.duplicate(true)
|
||||||
world = fixture()
|
world = fixture()
|
||||||
world.state.amount.RD = E.of("1e25")
|
world.state.amount["C2.0"] = 60000
|
||||||
world.state.amount.BG = E.of("1e25")
|
world.state.amount["C1.9"] = 10000
|
||||||
world.state.amount.TWD = E.of("1e25")
|
world.civilization_flow.evolve(world.state, 0, 20000)
|
||||||
world.state.amount.SNS = E.of("1e25")
|
check(E.gt(world.state.civilization_stats.wars, 0), "War rewards integrate encounters during the interval")
|
||||||
world.state.amount.MGT = E.of("1e25")
|
check(E.gt(world.state.civilization_stats.collateral, 0), "Collateral damage reaches previous stages")
|
||||||
world.state.amount.BH25 = E.of("1e25")
|
check(E.eq(population(world), 70000), "War outcomes and collateral conserve occupied-world counts")
|
||||||
world.state.amount.SMBH = E.of("1e26")
|
|
||||||
for id in world.catalog.entities:
|
|
||||||
if E.ne(world.catalog.entities[id].claim, ""): world.state.amount[id] = E.of("1e12")
|
|
||||||
# Accelerated deterministic fixture traverses every enabled stage, including Ct.
|
|
||||||
for id in global.CivilizationRules:
|
|
||||||
if E.eq(id, "Ct"): continue
|
|
||||||
global.CivilizationRules[id].fights = false
|
|
||||||
global.CivilizationRules[id].colonizes = false
|
|
||||||
global.CivilizationRules[id].diplomacy = false
|
|
||||||
for row : Dictionary in global.CivilizationRules[id].ethics.values():
|
|
||||||
row.progress = "1"
|
|
||||||
row.degradation = "0"
|
|
||||||
world.catalog.entities[id].lifespan = 1
|
|
||||||
world.catalog.entities[id].lifespan_delta = 1
|
|
||||||
global.CivilizationRules[id].span = 1
|
|
||||||
seed_population(world, "C0.2", 6)
|
|
||||||
world.evolution.evolve_batches(world.state, 1000)
|
|
||||||
check(E.eq(world.state.amount.Ct, 6), "Complete C0.2 -> C4.4 -> Ct chain runs")
|
|
||||||
check((not world.state.batches.has("Ct")), "Transcendence is terminal")
|
|
||||||
invariants(world)
|
invariants(world)
|
||||||
|
var restored = fixture()
|
||||||
|
restored.state = E.decode(E.encode(world.state))
|
||||||
|
world.civilization_flow.evolve(world.state, 20000, 30000)
|
||||||
|
restored.civilization_flow.evolve(restored.state, 20000, 30000)
|
||||||
|
check(E.eq(world.state, restored.state), "Save resume reproduces flow populations and carries")
|
||||||
|
dispose(restored)
|
||||||
dispose(world)
|
dispose(world)
|
||||||
global.CivilizationRules = baseline
|
global.CivilizationRules = baseline
|
||||||
|
print("Civilization flows: %d checks, %d failures" % [checks, failures])
|
||||||
world = fixture()
|
quit(1 if failures else 0)
|
||||||
world.state.amount.RD = 10000
|
|
||||||
world.state.amount.SCS = 1
|
|
||||||
world.state.amount["C2.4"] = 1
|
|
||||||
world.evolution.initialize_life_batches()
|
|
||||||
var span: Variant = world.state.batches["C2.4"][0].start_year
|
|
||||||
check(E.near(span, E.divide(20000, E.of("3.6"))), "Structure bonus shortens newly registered lifespan")
|
|
||||||
dispose(world)
|
|
||||||
var evolution = load("res://world/owniverse/civilization_evolution.gd")
|
|
||||||
var balanced: Dictionary = {"m": 10000, "l": 10000, "w": 10000, "d": 10000, "c": 10000, "b": 10000}
|
|
||||||
var neutral: Dictionary = evolution.drift({}, "test", balanced, global.CivilizationRules["C2.0"].ethics)
|
|
||||||
var diplomatic: Dictionary = evolution.drift({}, "test", balanced, global.CivilizationRules["C2.0"].ethics, true)
|
|
||||||
check(E.eq(neutral, balanced), "Ordinary drift preserves balanced ethics")
|
|
||||||
check(E.gt(diplomatic.d, diplomatic.w), "Diplomacy uses per-ethic influence")
|
|
||||||
check(E.eq(evolution.total(diplomatic), 60000), "Diplomacy conserves population")
|
|
||||||
|
|
||||||
world = fixture()
|
|
||||||
world.state.amount.RD = E.of("1e15")
|
|
||||||
world.state.amount.BG = E.of("1e15")
|
|
||||||
world.state.amount["C3.0"] = 6
|
|
||||||
world.evolution.initialize_life_batches()
|
|
||||||
check((E.eq(world.state.amount["C3.0"], 0) and E.eq(world.state.amount["C2.9"], 6)), "Missing mandatory structures degrade existing civilizations")
|
|
||||||
invariants(world)
|
|
||||||
dispose(world)
|
|
||||||
print(("Civilization evolution: %d checks, %d failures" % [checks, failures]))
|
|
||||||
quit((0 if E.eq(failures, 0) else 1))
|
|
||||||
|
|||||||
@@ -48,18 +48,23 @@ func run() -> void:
|
|||||||
world.evolution.initialize_life_batches()
|
world.evolution.initialize_life_batches()
|
||||||
check((E.eq(world.state.amount["C2.0"], 12) and E.eq(world.state.binds.RD["C2.0"], 0)), "Old space civilizations detach without loss")
|
check((E.eq(world.state.amount["C2.0"], 12) and E.eq(world.state.binds.RD["C2.0"], 0)), "Old space civilizations detach without loss")
|
||||||
check(E.eq(world.state.binds.RD["C1.9"], 3), "Planetary civilizations retain their host")
|
check(E.eq(world.state.binds.RD["C1.9"], 3), "Planetary civilizations retain their host")
|
||||||
check(E.eq(world.state.ethics["C0.2"], {"m": 2, "l": 2, "w": 1, "d": 1, "c": 1, "b": 1}), "Migration uses equal ethics and deterministic remainder")
|
check(world.state.ethics["C0.2"].values().all(func ( n ) : return E.near(n, 1.0 / 6.0)), "Migration initializes equal ethic shares")
|
||||||
check(world.state.ethics["C2.0"].values().all(func ( n ) : return E.eq(n, 2)), "Bound civilization ethics count physical population")
|
check(world.state.ethics["C2.0"].values().all(func ( n ) : return E.near(n, 1.0 / 6.0)), "Bound civilization ethics are population-independent shares")
|
||||||
var before: Dictionary = world.state.duplicate(true)
|
var before: Dictionary = world.state.duplicate(true)
|
||||||
world.evolution.initialize_life_batches()
|
world.evolution.initialize_life_batches()
|
||||||
check(E.eq(world.state, before), "Repeated initialization preserves ethics")
|
var profiles_stable: bool = true
|
||||||
|
for ethic_id in before.ethics:
|
||||||
|
for ethic in before.ethics[ethic_id]:
|
||||||
|
profiles_stable = profiles_stable and E.near(world.state.ethics[ethic_id][ethic], before.ethics[ethic_id][ethic])
|
||||||
|
check(profiles_stable, "Repeated initialization preserves ethics")
|
||||||
world.state.ethics["C0.2"] = {"m": 8, "l": 0, "w": 0, "d": 0, "c": 0, "b": 0}
|
world.state.ethics["C0.2"] = {"m": 8, "l": 0, "w": 0, "d": 0, "c": 0, "b": 0}
|
||||||
world.evolution.initialize_life_batches()
|
world.evolution.initialize_life_batches()
|
||||||
check(E.eq(world.state.ethics["C0.2"].m, 8), "Existing unequal distribution is retained")
|
check(E.eq(world.state.ethics["C0.2"].m, 1.0), "Existing unequal distribution is retained")
|
||||||
world.state.amount["C0.2"] = 3
|
world.state.amount["C0.2"] = 3
|
||||||
world.evolution.initialize_life_batches()
|
world.evolution.initialize_life_batches()
|
||||||
check(E.eq(world.state.ethics["C0.2"].m, 3), "Losses reduce ethics without inventing population")
|
check(E.eq(world.state.ethics["C0.2"].m, 1.0), "Losses retain normalized ethical composition")
|
||||||
check(E.eq(root.get_node("SaveManager").validate_data({"format_version": 5, "app_version": "", "ui": {"current_page": 0}, "state": world.state}), ""), "Ethics state validates")
|
check(E.eq(world.ledger.physical_amounts(world.state)["C0.2"], 3), "Exact population remains in the object ledger")
|
||||||
|
check(E.eq(root.get_node("SaveManager").validate_data({"format_version": 6, "app_version": "", "ui": {"current_page": 0}, "state": world.state}), ""), "Ethics state validates")
|
||||||
var restored = fixture()
|
var restored = fixture()
|
||||||
restored.state = E.decode(bytes_to_var(var_to_bytes(E.encode(world.state))))
|
restored.state = E.decode(bytes_to_var(var_to_bytes(E.encode(world.state))))
|
||||||
restored.evolution.initialize_life_batches()
|
restored.evolution.initialize_life_batches()
|
||||||
@@ -74,7 +79,8 @@ func run() -> void:
|
|||||||
row.colonization = "0"
|
row.colonization = "0"
|
||||||
world.state.binds.RD = {"C1.9": 10}
|
world.state.binds.RD = {"C1.9": 10}
|
||||||
world.state.batches["C1.9"] = [{"amount": 10, "start_year": 1, "end_year": 1}]
|
world.state.batches["C1.9"] = [{"amount": 10, "start_year": 1, "end_year": 1}]
|
||||||
world.evolution.evolve_batches(world.state, 1)
|
global.CivilizationRules["C1.9"].span = E.of("0.001")
|
||||||
|
world.civilization_flow.evolve(world.state, 0, 1)
|
||||||
check((E.eq(world.state.amount["C2.0"], 10) and E.eq(world.state.binds.RD.get("C2.0", 0), 0)), "Space successor does not inherit planetary binding")
|
check((E.eq(world.state.amount["C2.0"], 10) and E.eq(world.state.binds.RD.get("C2.0", 0), 0)), "Space successor does not inherit planetary binding")
|
||||||
dispose(world)
|
dispose(world)
|
||||||
var capacity = load("res://world/owniverse/civilization_state.gd")
|
var capacity = load("res://world/owniverse/civilization_state.gd")
|
||||||
@@ -117,7 +123,7 @@ func run() -> void:
|
|||||||
world.evolution.initialize_life_batches()
|
world.evolution.initialize_life_batches()
|
||||||
check(E.eq(world.state.amount["C4.2"], 2), "SMBH capacity uses stellar mass equivalent")
|
check(E.eq(world.state.amount["C4.2"], 2), "SMBH capacity uses stellar mass equivalent")
|
||||||
check(E.eq(world.ledger.physical_amounts(world.state)["C1.9"], 1), "Unsupported civilization degrades through missing habitat families")
|
check(E.eq(world.ledger.physical_amounts(world.state)["C1.9"], 1), "Unsupported civilization degrades through missing habitat families")
|
||||||
check(E.eq(root.get_node("SaveManager").validate_data({"format_version": 5, "app_version": "", "ui": {"current_page": 0}, "state": world.state}), ""), "Capacity-limited state validates")
|
check(E.eq(root.get_node("SaveManager").validate_data({"format_version": 6, "app_version": "", "ui": {"current_page": 0}, "state": world.state}), ""), "Capacity-limited state validates")
|
||||||
dispose(world)
|
dispose(world)
|
||||||
|
|
||||||
world = fixture()
|
world = fixture()
|
||||||
@@ -128,7 +134,7 @@ func run() -> void:
|
|||||||
row.colonization = "0"
|
row.colonization = "0"
|
||||||
world.state.binds.RD = {"C1.9": 5}
|
world.state.binds.RD = {"C1.9": 5}
|
||||||
world.state.batches["C1.9"] = [{"amount": 5, "start_year": 1, "end_year": 1}]
|
world.state.batches["C1.9"] = [{"amount": 5, "start_year": 1, "end_year": 1}]
|
||||||
world.evolution.evolve_batches(world.state, 1)
|
world.civilization_flow.evolve(world.state, 0, 1)
|
||||||
check((E.eq(world.state.amount["C2.0"], 2) and E.eq(world.state.binds.RD["C1.9"], 3)), "Unfunded transition retains the original planetary civilization")
|
check((E.eq(world.state.amount["C2.0"], 2) and E.eq(world.state.binds.RD["C1.9"], 3)), "Unfunded transition retains the original planetary civilization")
|
||||||
dispose(world)
|
dispose(world)
|
||||||
print(("Civilization state: %d checks, %d failures" % [checks, failures]))
|
print(("Civilization state: %d checks, %d failures" % [checks, failures]))
|
||||||
|
|||||||
@@ -0,0 +1,83 @@
|
|||||||
|
extends SceneTree
|
||||||
|
const E = preload("res://world/owniverse/math/exact.gd")
|
||||||
|
var checks: int = 0
|
||||||
|
var failures: int = 0
|
||||||
|
|
||||||
|
func _initialize(): call_deferred("run")
|
||||||
|
func check(condition: bool, message: String):
|
||||||
|
checks += 1
|
||||||
|
if not condition:
|
||||||
|
failures += 1
|
||||||
|
push_error(message)
|
||||||
|
|
||||||
|
func fixture(id: String, speed: int):
|
||||||
|
var world = load("res://world/owniverse/owniverse.gd").new()
|
||||||
|
world.catalog.load_definitions(root.get_node("Global").OwniverseEntities)
|
||||||
|
for entity in world.catalog.entities.values():
|
||||||
|
world.state.amount[entity.id] = 0
|
||||||
|
world.state.stats.total_amount[entity.id] = 0
|
||||||
|
if entity.group_as != "":
|
||||||
|
world.state.amount[entity.group_as] = 0
|
||||||
|
world.state.stats.total_amount[entity.group_as] = 0
|
||||||
|
world.state.amount.RD = 1
|
||||||
|
world.state.binds.RD = {id: 40000}
|
||||||
|
world.state.batches[id] = [{"amount": 40000, "start_year": 1, "end_year": 1}]
|
||||||
|
# A saved origin off the new grid must not backdate rounded successors.
|
||||||
|
world.state.batch_origins[id] = 500
|
||||||
|
world.speed = speed
|
||||||
|
world.profile_enabled = true
|
||||||
|
return world
|
||||||
|
|
||||||
|
func dispose(world):
|
||||||
|
for entity in world.catalog.entities.values(): entity.free()
|
||||||
|
world.free()
|
||||||
|
|
||||||
|
func run():
|
||||||
|
for id in ["C0.0", "C0.1", "C0.2"]:
|
||||||
|
var world = fixture(id, 6)
|
||||||
|
world.evolution.evolute_to_datetime(10000)
|
||||||
|
var physical: Dictionary = world.ledger.physical_amounts(world.state)
|
||||||
|
var population: Variant = 0
|
||||||
|
for stage in physical:
|
||||||
|
if world.catalog.entities[stage].group_as == "Planet":
|
||||||
|
population = E.add(population, physical[stage])
|
||||||
|
check(E.eq(population, 40000), "Coarse transitions preserve all whole populations: " + id)
|
||||||
|
for batches: Array in world.state.batches.values():
|
||||||
|
for batch: Dictionary in batches:
|
||||||
|
check(E.gt(batch.start_year, 10000), "Successors cannot expire inside their birth bucket: " + id)
|
||||||
|
if id == "C0.0":
|
||||||
|
check(E.eq(physical.get("C0.0", 0), 38300), "C0.0 attempts evolution once")
|
||||||
|
check(E.eq(physical.get("C0.1", 0), 700), "C0.0 progress rate is applied once")
|
||||||
|
check(E.eq(physical.get("EON5", 0), 1000), "C0.0 degradation rate is applied once")
|
||||||
|
elif id == "C0.1":
|
||||||
|
check(E.eq(physical.get("C0.1", 0), 38300), "C0.1 attempts evolution once")
|
||||||
|
check(E.eq(physical.get("C0.2", 0), 700), "C0.1 successor does not immediately attempt again")
|
||||||
|
else:
|
||||||
|
check(world.profile.civilization_flow_plan[1] == 1, "Ethical civilization uses one continuous interval plan")
|
||||||
|
var before: Dictionary = world.state.duplicate(true)
|
||||||
|
world.evolution.evolute_to_datetime(10000)
|
||||||
|
check(E.eq(world.state, before), "Repeating completed clock does not repeat transitions")
|
||||||
|
var validation: String = root.get_node("SaveManager").validate_data({"format_version": 6, "app_version": "", "ui": {"current_page": 0}, "state": world.state})
|
||||||
|
check(validation.is_empty(), "Coarse state validates: " + validation)
|
||||||
|
world.evolution.evolute_to_datetime(20000)
|
||||||
|
if id in ["C0.0", "C0.1"]:
|
||||||
|
check(E.lt(world.ledger.physical_amounts(world.state)[id], 38300), "The next bucket still processes legitimate evolution: " + id)
|
||||||
|
dispose(world)
|
||||||
|
var fine = fixture("C0.0", 1)
|
||||||
|
fine.evolution.evolute_to_datetime(10000)
|
||||||
|
check(E.lt(fine.ledger.physical_amounts(fine.state)["C0.0"], 38300), "Low speeds retain multiple chronological generations")
|
||||||
|
dispose(fine)
|
||||||
|
var large = fixture("C0.0", 6)
|
||||||
|
var count: Variant = E.of("10000000000000000000000000000000000000001")
|
||||||
|
large.state.binds.RD["C0.0"] = count
|
||||||
|
large.state.batches["C0.0"][0].amount = count
|
||||||
|
var reference: Dictionary = large.state.duplicate(true)
|
||||||
|
var products: Dictionary = large.life.life_products(reference, large.catalog.entities["C0.0"], count)
|
||||||
|
large.evolution.evolute_to_datetime(10000)
|
||||||
|
var physical: Dictionary = large.ledger.physical_amounts(large.state)
|
||||||
|
for id in products:
|
||||||
|
check(E.eq(physical.get(id, 0), products[id]), "Large whole population undergoes one transition: " + id)
|
||||||
|
check(E.eq(large.state.life_remainders, reference.life_remainders), "Coarse timing preserves the single attempt's fractional carry")
|
||||||
|
dispose(large)
|
||||||
|
print("Coarse generations: %d checks, %d failures" % [checks, failures])
|
||||||
|
quit(1 if failures else 0)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://ggml5q061lwh
|
||||||
@@ -31,6 +31,10 @@ func run():
|
|||||||
verify(not E.eq(E.of("1e1000"), INF), "huge number is not infinity")
|
verify(not E.eq(E.of("1e1000"), INF), "huge number is not infinity")
|
||||||
verify(E.eq(E.floor_sum(huge, 2, 1, 2), E.divide(E.multiply(huge, E.subtract(huge, 1)), 2)), "floor sum supports huge window counts")
|
verify(E.eq(E.floor_sum(huge, 2, 1, 2), E.divide(E.multiply(huge, E.subtract(huge, 1)), 2)), "floor sum supports huge window counts")
|
||||||
var rows = JSON.parse_string(FileAccess.get_file_as_string("res://tests/fixtures/big_integer_oracle.json"))
|
var rows = JSON.parse_string(FileAccess.get_file_as_string("res://tests/fixtures/big_integer_oracle.json"))
|
||||||
|
for row in rows.slice(0, 20):
|
||||||
|
var scaled = B.divmod(B.parse(row[0] + "000000000000000000"), B.parse(row[1] + "000000000000000000"))
|
||||||
|
verify(B.decimal(scaled[0]) == row[4], "cancel shared blocks preserves quotient")
|
||||||
|
verify(B.compare(scaled[1], B.multiply(B.parse(row[5]), B.parse("1000000000000000000"))) == 0, "cancel shared blocks restores original remainder")
|
||||||
for row in rows:
|
for row in rows:
|
||||||
var a: Array = B.parse(row[0])
|
var a: Array = B.parse(row[0])
|
||||||
var b: Array = B.parse(row[1])
|
var b: Array = B.parse(row[1])
|
||||||
|
|||||||
@@ -0,0 +1,44 @@
|
|||||||
|
extends SceneTree
|
||||||
|
|
||||||
|
var checks: int = 0
|
||||||
|
var failures: int = 0
|
||||||
|
|
||||||
|
|
||||||
|
func _initialize() -> void:
|
||||||
|
call_deferred("run")
|
||||||
|
|
||||||
|
|
||||||
|
func check(condition: bool, message: String) -> void:
|
||||||
|
checks += 1
|
||||||
|
if not condition:
|
||||||
|
failures += 1
|
||||||
|
push_error(message)
|
||||||
|
|
||||||
|
|
||||||
|
func run() -> void:
|
||||||
|
var player := OwniverseEffectsPlayer.new()
|
||||||
|
root.add_child(player)
|
||||||
|
|
||||||
|
check(player.play_effect("select"), "Known effect starts")
|
||||||
|
check(player.stream == player._effects.select and player.playing, "Selected effect is playing")
|
||||||
|
var selected_stream: AudioStream = player.stream
|
||||||
|
check(not player.play_effect("select"), "Playing effect is not restarted")
|
||||||
|
check(player.stream == selected_stream and player.playing, "Rejected duplicate keeps current playback")
|
||||||
|
player.stop()
|
||||||
|
check(player.play_effect("select"), "Stopped effect can start again immediately")
|
||||||
|
check(player.play_effect("blast"), "Different effect starts immediately")
|
||||||
|
check(not player.play_effect("missing_effect"), "Unknown effect is rejected")
|
||||||
|
check(player.stream == player._effects.blast, "Unknown effect does not interrupt playback")
|
||||||
|
|
||||||
|
player.set_enabled(false)
|
||||||
|
check(player.stream_paused, "Disabling effects pauses current playback")
|
||||||
|
check(not player.play_effect("select") and player.stream == player._effects.blast, "Disabled player rejects new effects")
|
||||||
|
player.set_enabled(true)
|
||||||
|
check(not player.stream_paused, "Enabling effects resumes current playback")
|
||||||
|
|
||||||
|
player.stop()
|
||||||
|
player.stream = null
|
||||||
|
player.free()
|
||||||
|
await process_frame
|
||||||
|
print("Effects player: %d checks, %d failures" % [checks, failures])
|
||||||
|
quit(0 if failures == 0 else 1)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://cj2kk1vx5umtc
|
||||||
@@ -94,7 +94,7 @@ func run():
|
|||||||
check(str(world.state.auto_star_deficits).length() < 500, "true", "fraction storage stays bounded")
|
check(str(world.state.auto_star_deficits).length() < 500, "true", "fraction storage stays bounded")
|
||||||
print("100 changing-composition cycles: %d ms" % (Time.get_ticks_msec() - started))
|
print("100 changing-composition cycles: %d ms" % (Time.get_ticks_msec() - started))
|
||||||
var saves = root.get_node("SaveManager")
|
var saves = root.get_node("SaveManager")
|
||||||
check(saves.validate_data({"format_version": 5, "app_version": "", "ui": {"current_page": 0}, "state": world.state}), "", "long-running state saves")
|
check(saves.validate_data({"format_version": 6, "app_version": "", "ui": {"current_page": 0}, "state": world.state}), "", "long-running state saves")
|
||||||
for entity in world.catalog.entities.values(): entity.free()
|
for entity in world.catalog.entities.values(): entity.free()
|
||||||
world.free()
|
world.free()
|
||||||
print("Exact math: %d checks, %d failures" % [checks, failures])
|
print("Exact math: %d checks, %d failures" % [checks, failures])
|
||||||
|
|||||||
@@ -0,0 +1,54 @@
|
|||||||
|
extends SceneTree
|
||||||
|
const E = preload("res://world/owniverse/math/exact.gd")
|
||||||
|
const Extra = preload("res://data/owniverse_extra_param_loader.gd")
|
||||||
|
const Parameters = preload("res://world/owniverse/world_parameters.gd")
|
||||||
|
var checks: int = 0
|
||||||
|
var failures: int = 0
|
||||||
|
func _initialize(): call_deferred("run")
|
||||||
|
func check(ok: bool, label: String):
|
||||||
|
checks += 1
|
||||||
|
if not ok:
|
||||||
|
failures += 1
|
||||||
|
push_error(label)
|
||||||
|
func run():
|
||||||
|
var global = root.get_node("Global")
|
||||||
|
check(E.eq(global.ExtraParams, Extra.get_data()), "Global table equals loader data")
|
||||||
|
check(E.eq(global.ExtraParams.E, E.of("1e27")), "Energy parsed as exact integer")
|
||||||
|
check(E.eq(global.ExtraParams.DA, 65536), "Export column is used, not formatted display column")
|
||||||
|
var saved: Dictionary = global.ExtraParams.duplicate()
|
||||||
|
global.ExtraParams.E = E.of("1e40")
|
||||||
|
var world = load("res://world/owniverse/owniverse.gd").new()
|
||||||
|
world.catalog.load_definitions(global.OwniverseEntities)
|
||||||
|
check(E.eq(world.state.energy, E.of("1e40")), "New world uses configured energy")
|
||||||
|
var initial: Dictionary = world.environment.stellar_environment(world.state)
|
||||||
|
global.ExtraParams.DA = E.multiply(saved.DA, 4)
|
||||||
|
check(E.near(world.environment.stellar_environment(world.state).density, E.multiply(initial.density, 2)), "Base mass changes density")
|
||||||
|
global.ExtraParams.DA = saved.DA
|
||||||
|
global.ExtraParams.NPC = E.multiply(saved.NPC, 2)
|
||||||
|
check(E.near(world.environment.stellar_environment(world.state).density, E.multiply(initial.density, 2)), "NPC changes density")
|
||||||
|
global.ExtraParams.NPC = saved.NPC
|
||||||
|
world.state.amount.S = E.of("1e24")
|
||||||
|
world.state.amount.LGF = 1
|
||||||
|
var old_density = world.environment.stellar_environment(world.state).density
|
||||||
|
global.ExtraParams.VoidSize = E.multiply(saved.VoidSize, 100)
|
||||||
|
check(E.lt(world.environment.stellar_environment(world.state).density, old_density), "Void volume uses configured size")
|
||||||
|
global.ExtraParams.bigcrunch1 = E.of("0.5")
|
||||||
|
global.ExtraParams.bigcrunch2 = E.of("0.6")
|
||||||
|
global.ExtraParams.bigcrunch3 = E.of("0.7")
|
||||||
|
check(Parameters.density_display(E.of("0.6")).mode == "DensityCrunch", "Configured crunch start")
|
||||||
|
check(E.near(Parameters.density_display(E.of("0.6")).position, E.of("0.5")), "Crunch indicator uses configured interval")
|
||||||
|
check(Parameters.density_warning_color(E.of("0.6")) == Color.html("20b0dfbf"), "Configured middle crunch warning")
|
||||||
|
global.ExtraParams.bigrip1 = E.of("0.01")
|
||||||
|
global.ExtraParams.bigrip2 = E.of("0.001")
|
||||||
|
global.ExtraParams.bigrip3 = E.of("0.0001")
|
||||||
|
check(Parameters.density_display(E.of("0.001")).mode == "DensityRip", "Configured rip start")
|
||||||
|
check(E.near(Parameters.density_display(E.of("0.001")).position, E.of("0.5")), "Rip indicator uses configured interval")
|
||||||
|
check(Parameters.density_warning_color(E.of("0.001")) == Color.html("df2020bf"), "Configured middle rip warning")
|
||||||
|
world.state.world_parameters.Bur = 19
|
||||||
|
global.ExtraParams.combustibility_bonus = 1
|
||||||
|
check(E.eq(Parameters.production(world.state, world.catalog.entities.RD), Parameters.effective(world.state, "Bur")), "Configured combustion exponent")
|
||||||
|
global.ExtraParams.merge(saved, true)
|
||||||
|
for entity in world.catalog.entities.values(): entity.free()
|
||||||
|
world.free()
|
||||||
|
print("Extra params: %d checks, %d failures" % [checks, failures])
|
||||||
|
quit(1 if failures else 0)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://doertyqlkrm26
|
||||||
@@ -35,7 +35,7 @@ func run():
|
|||||||
direct = fixture()
|
direct = fixture()
|
||||||
sliced = fixture()
|
sliced = fixture()
|
||||||
var initial_h: Variant = sliced.state.amount.H
|
var initial_h: Variant = sliced.state.amount.H
|
||||||
sliced.evolute_frame(1.0 / 60.0, self)
|
sliced.evolute_frame(0.2, self)
|
||||||
check(sliced.frame_busy, "Heavy transaction yields before publishing")
|
check(sliced.frame_busy, "Heavy transaction yields before publishing")
|
||||||
check(E.eq(sliced.state.time.year, 0), "Published clock stays at completed transaction")
|
check(E.eq(sliced.state.time.year, 0), "Published clock stays at completed transaction")
|
||||||
sliced.request_production("H", 1, true)
|
sliced.request_production("H", 1, true)
|
||||||
@@ -45,7 +45,7 @@ func run():
|
|||||||
sliced.speed = 3
|
sliced.speed = 3
|
||||||
check(sliced.speed == 3 and sliced.state.speed == 6, "Speed change is visible and cannot mutate an unfinished transaction")
|
check(sliced.speed == 3 and sliced.state.speed == 6, "Speed change is visible and cannot mutate an unfinished transaction")
|
||||||
while sliced.frame_busy: await process_frame
|
while sliced.frame_busy: await process_frame
|
||||||
direct.evolute(1.0 / 60.0)
|
direct.evolute(0.2)
|
||||||
direct.production.produce_hs("H", 1)
|
direct.production.produce_hs("H", 1)
|
||||||
direct.speed = 3
|
direct.speed = 3
|
||||||
check(E.eq(direct.state, sliced.state), "Queued action and speed change survive publication")
|
check(E.eq(direct.state, sliced.state), "Queued action and speed change survive publication")
|
||||||
@@ -60,7 +60,7 @@ func run():
|
|||||||
dispose(direct)
|
dispose(direct)
|
||||||
dispose(sliced)
|
dispose(sliced)
|
||||||
var original = fixture()
|
var original = fixture()
|
||||||
original.evolute_frame(1.0 / 60.0, self)
|
original.evolute_frame(0.2, self)
|
||||||
original.request_production("H", 123, true)
|
original.request_production("H", 123, true)
|
||||||
original.evolute_frame(0.01, self)
|
original.evolute_frame(0.01, self)
|
||||||
original.speed = 3
|
original.speed = 3
|
||||||
@@ -84,7 +84,7 @@ func run():
|
|||||||
dispose(resumed)
|
dispose(resumed)
|
||||||
dispose(expected)
|
dispose(expected)
|
||||||
var cancelled = fixture()
|
var cancelled = fixture()
|
||||||
cancelled.evolute_frame(0.133333333333, self)
|
cancelled.evolute_frame(0.2, self)
|
||||||
check(cancelled.frame_busy, "Cancellation fixture has suspended work")
|
check(cancelled.frame_busy, "Cancellation fixture has suspended work")
|
||||||
var budget_ref: RefCounted = cancelled.frame_budget
|
var budget_ref: RefCounted = cancelled.frame_budget
|
||||||
dispose(cancelled)
|
dispose(cancelled)
|
||||||
@@ -96,5 +96,26 @@ func run():
|
|||||||
invalid.evolute(1e308)
|
invalid.evolute(1e308)
|
||||||
check(not invalid.frame_busy and invalid.frame_clock.is_empty() and E.eq(before, invalid.state), "Overflowing elapsed float cannot enter either clock API")
|
check(not invalid.frame_busy and invalid.frame_clock.is_empty() and E.eq(before, invalid.state), "Overflowing elapsed float cannot enter either clock API")
|
||||||
dispose(invalid)
|
dispose(invalid)
|
||||||
|
for selected_speed in range(1, 7):
|
||||||
|
var scheduled = fixture()
|
||||||
|
scheduled.speed = selected_speed
|
||||||
|
scheduled.evolute_frame(0.1, self)
|
||||||
|
check(not scheduled.frame_busy and scheduled.frame_commits == 0, "Wait for a full step at speed %d" % selected_speed)
|
||||||
|
scheduled.evolute_frame(0.1, self)
|
||||||
|
while scheduled.frame_busy: await process_frame
|
||||||
|
var cadence_clock: Dictionary = Clock.advance({"datetime": 0, "year": 0}, 0.2, selected_speed)
|
||||||
|
check(scheduled.frame_commits == 1 and E.eq(scheduled.state.time, cadence_clock), "One complete 0.2 second cycle at speed %d" % selected_speed)
|
||||||
|
scheduled.evolute_frame(0.0, self)
|
||||||
|
check(not scheduled.frame_busy and scheduled.frame_commits == 1, "No extra cycle without elapsed time")
|
||||||
|
dispose(scheduled)
|
||||||
|
var behind = fixture()
|
||||||
|
behind.evolute_frame(1.0, self)
|
||||||
|
while behind.frame_busy: await process_frame
|
||||||
|
check(E.eq(behind.state.time.datetime, 20000) and E.eq(behind.frame_clock.datetime, 100000), "Debt keeps the fixed step and preserves all requested time")
|
||||||
|
for cycle in 4:
|
||||||
|
behind.evolute_frame(0.0, self)
|
||||||
|
while behind.frame_busy: await process_frame
|
||||||
|
check(behind.frame_commits == 5 and E.eq(behind.state.time, behind.frame_clock), "One second is processed in exactly five full cycles")
|
||||||
|
dispose(behind)
|
||||||
print("Frame evolution: %d checks, %d failures" % [checks, failures])
|
print("Frame evolution: %d checks, %d failures" % [checks, failures])
|
||||||
quit(1 if failures else 0)
|
quit(1 if failures else 0)
|
||||||
|
|||||||
+6
-4
@@ -46,7 +46,7 @@ func run() -> void:
|
|||||||
var before: Dictionary = world.state.duplicate(true)
|
var before: Dictionary = world.state.duplicate(true)
|
||||||
world.evolution.initialize_life_batches()
|
world.evolution.initialize_life_batches()
|
||||||
check(E.eq(world.state, before), "Initialization is idempotent")
|
check(E.eq(world.state, before), "Initialization is idempotent")
|
||||||
world.evolution.evolve_batches(world.state, E.add(5000000, E.divide(5000000, 40)))
|
world.evolution.evolve_batches(world.state, E.add(5000000, E.divide(5000000, root.get_node("Global").batch_count)))
|
||||||
check(E.eq(world.state.amount.EON1, 10), "HP abiogenesis follows source probability")
|
check(E.eq(world.state.amount.EON1, 10), "HP abiogenesis follows source probability")
|
||||||
check(E.eq(world.state.amount.RP, 100), "HP degradation produces RP")
|
check(E.eq(world.state.amount.RP, 100), "HP degradation produces RP")
|
||||||
check(E.eq(world.state.amount.HP, 39890), "Unchanged planets retry, not disappear")
|
check(E.eq(world.state.amount.HP, 39890), "Unchanged planets retry, not disappear")
|
||||||
@@ -54,7 +54,7 @@ func run() -> void:
|
|||||||
check(E.gt(world.state.batches.HP.size(), 0), "Survivors get next attempt")
|
check(E.gt(world.state.batches.HP.size(), 0), "Survivors get next attempt")
|
||||||
var physical: Dictionary = world.ledger.physical_amounts(world.state)
|
var physical: Dictionary = world.ledger.physical_amounts(world.state)
|
||||||
check(E.eq(E.add(E.add(physical.HP, physical.EON1), physical.RP), 40000), "Life conserves planets")
|
check(E.eq(E.add(E.add(physical.HP, physical.EON1), physical.RP), 40000), "Life conserves planets")
|
||||||
check(E.eq(root.get_node("SaveManager").validate_data({"format_version": 5, "app_version": "", "ui": {"current_page": 0}, "state": world.state}), ""), "Life save validates")
|
check(E.eq(root.get_node("SaveManager").validate_data({"format_version": 6, "app_version": "", "ui": {"current_page": 0}, "state": world.state}), ""), "Life save validates")
|
||||||
var restored = fixture()
|
var restored = fixture()
|
||||||
restored.state = E.decode(bytes_to_var(var_to_bytes(E.encode(world.state))))
|
restored.state = E.decode(bytes_to_var(var_to_bytes(E.encode(world.state))))
|
||||||
world.evolution.evolve_batches(world.state, 11000000)
|
world.evolution.evolve_batches(world.state, 11000000)
|
||||||
@@ -66,8 +66,10 @@ func run() -> void:
|
|||||||
world = fixture()
|
world = fixture()
|
||||||
world.state.amount.RD = 1
|
world.state.amount.RD = 1
|
||||||
world.state.binds.RD = {"EON5": 40000}
|
world.state.binds.RD = {"EON5": 40000}
|
||||||
|
# Test host preservation with a fixed rate, independent of game balance.
|
||||||
|
world.catalog.entities.EON5.life_rule.progress = "0.00025"
|
||||||
world.evolution.initialize_life_batches()
|
world.evolution.initialize_life_batches()
|
||||||
world.evolution.evolve_batches(world.state, E.add(500000, E.divide(500000, 40)))
|
world.evolution.evolve_batches(world.state, E.add(500000, E.divide(500000, root.get_node("Global").batch_count)))
|
||||||
check(E.eq(world.state.binds.RD["C0.0"], 10), "Intelligence emerges at the same host star")
|
check(E.eq(world.state.binds.RD["C0.0"], 10), "Intelligence emerges at the same host star")
|
||||||
check(E.eq(world.state.amount["C0.0"], 0), "Life transition keeps planet bound")
|
check(E.eq(world.state.amount["C0.0"], 0), "Life transition keeps planet bound")
|
||||||
check(world.state.batches.has("C0.0"), "New C0.0 starts civilization evolution")
|
check(world.state.batches.has("C0.0"), "New C0.0 starts civilization evolution")
|
||||||
@@ -118,7 +120,7 @@ func run() -> void:
|
|||||||
world.evolution.evolve_batches(world.state, 2050)
|
world.evolution.evolve_batches(world.state, 2050)
|
||||||
check(E.eq(world.state.binds.RD["C0.2"], 700), "C0.1 reaches ethical civilization without losing host")
|
check(E.eq(world.state.binds.RD["C0.2"], 700), "C0.1 reaches ethical civilization without losing host")
|
||||||
check(E.eq(world.state.binds.RD["C0.0"], 1000), "C0.1 degradation follows Unity")
|
check(E.eq(world.state.binds.RD["C0.0"], 1000), "C0.1 degradation follows Unity")
|
||||||
check(E.eq(root.get_node("SaveManager").validate_data({"format_version": 5, "app_version": "", "ui": {"current_page": 0}, "state": world.state}), ""), "Extended life save validates")
|
check(E.eq(root.get_node("SaveManager").validate_data({"format_version": 6, "app_version": "", "ui": {"current_page": 0}, "state": world.state}), ""), "Extended life save validates")
|
||||||
dispose(world)
|
dispose(world)
|
||||||
print(("Life: %d checks, %d failures" % [checks, failures]))
|
print(("Life: %d checks, %d failures" % [checks, failures]))
|
||||||
quit((0 if E.eq(failures, 0) else 1))
|
quit((0 if E.eq(failures, 0) else 1))
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ func run() -> void:
|
|||||||
var World = load("res://world/owniverse/owniverse.gd")
|
var World = load("res://world/owniverse/owniverse.gd")
|
||||||
var first = World.new()
|
var first = World.new()
|
||||||
var second = World.new()
|
var second = World.new()
|
||||||
var names: Array = ["batches", "ledger", "production", "automatic", "stellar", "life", "environment", "evolution"]
|
var names: Array = ["batches", "ledger", "production", "automatic", "stellar", "life", "environment", "evolution", "civilization_flow"]
|
||||||
var references: Array = []
|
var references: Array = []
|
||||||
for name in names:
|
for name in names:
|
||||||
check(E.ne(first.get(name), second.get(name)), E.add("World has its own ", name))
|
check(E.ne(first.get(name), second.get(name)), E.add("World has its own ", name))
|
||||||
|
|||||||
@@ -0,0 +1,54 @@
|
|||||||
|
extends SceneTree
|
||||||
|
|
||||||
|
var checks: int = 0
|
||||||
|
var failures: int = 0
|
||||||
|
|
||||||
|
|
||||||
|
func _initialize() -> void:
|
||||||
|
call_deferred("run")
|
||||||
|
|
||||||
|
|
||||||
|
func check(condition: bool, message: String) -> void:
|
||||||
|
checks += 1
|
||||||
|
if not condition:
|
||||||
|
failures += 1
|
||||||
|
push_error(message)
|
||||||
|
|
||||||
|
|
||||||
|
func run() -> void:
|
||||||
|
var player := OwniverseMusicPlayer.new()
|
||||||
|
root.add_child(player)
|
||||||
|
await process_frame
|
||||||
|
|
||||||
|
check(player.last_track == "", "Music player starts with silence")
|
||||||
|
check(player._pause_timer.time_left >= player.MIN_PAUSE_SECONDS and player._pause_timer.time_left <= player.MAX_PAUSE_SECONDS, "Initial pause is between two and five minutes")
|
||||||
|
player._pause_timer.stop()
|
||||||
|
player._play_next()
|
||||||
|
check(player.last_track != "", "Music player selects an initial track")
|
||||||
|
check(player.last_track != player.EXCLUDED_TRACK, "Normal playlist excludes apocalypse")
|
||||||
|
var previous: String = player.last_track
|
||||||
|
player._play_next()
|
||||||
|
check(player.last_track != previous, "Consecutive tracks do not repeat")
|
||||||
|
check(player.last_track != player.EXCLUDED_TRACK, "Subsequent tracks exclude apocalypse")
|
||||||
|
|
||||||
|
var last_normal_track: String = player.last_track
|
||||||
|
player.play_apocalypse()
|
||||||
|
check(player.stream == player._music[player.EXCLUDED_TRACK] and player.playing, "Apocalypse music starts immediately")
|
||||||
|
check(player.last_track == last_normal_track, "Apocalypse does not replace the last normal track")
|
||||||
|
|
||||||
|
player._schedule_pause()
|
||||||
|
check(player._pause_timer.time_left >= player.MIN_PAUSE_SECONDS and player._pause_timer.time_left <= player.MAX_PAUSE_SECONDS, "Pause is between two and five minutes")
|
||||||
|
player.set_enabled(false)
|
||||||
|
check(player.stream_paused and player._pause_timer.paused, "Disabling music pauses playback and scheduling")
|
||||||
|
var disabled_stream: AudioStream = player.stream
|
||||||
|
player.play_apocalypse()
|
||||||
|
check(player.stream == disabled_stream, "Apocalypse does not start while music is disabled")
|
||||||
|
player.set_enabled(true)
|
||||||
|
check(not player.stream_paused and not player._pause_timer.paused, "Enabling music resumes playback and scheduling")
|
||||||
|
|
||||||
|
player.stop()
|
||||||
|
player.stream = null
|
||||||
|
player.free()
|
||||||
|
await process_frame
|
||||||
|
print("Music player: %d checks, %d failures" % [checks, failures])
|
||||||
|
quit(0 if failures == 0 else 1)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://nue2ifdplt25
|
||||||
@@ -30,6 +30,9 @@ func run() -> void:
|
|||||||
for id in requests: requests[id] = E.multiply(requests[id], E.of("1e40"))
|
for id in requests: requests[id] = E.multiply(requests[id], E.of("1e40"))
|
||||||
var limit: Variant = E.multiply(rng.randi_range(0, 600), E.of("1e40")) if sample % 3 == 0 else rng.randi_range(0, 600)
|
var limit: Variant = E.multiply(rng.randi_range(0, 600), E.of("1e40")) if sample % 3 == 0 else rng.randi_range(0, 600)
|
||||||
check(E.eq(Math.allocate_whole(requests, limit), Legacy.allocate_whole(requests, limit)), "Allocation matches legacy with limits, ties and big integers")
|
check(E.eq(Math.allocate_whole(requests, limit), Legacy.allocate_whole(requests, limit)), "Allocation matches legacy with limits, ties and big integers")
|
||||||
|
var whole_requests: Dictionary = {}
|
||||||
|
for id in requests: whole_requests[id] = E.floor_value(E.maximum(0, requests[id]))
|
||||||
|
check(E.eq(Math.allocate_whole(whole_requests, limit), Math.allocate_whole_with_total(whole_requests, limit, Math.sum(whole_requests))), "Known-total allocation matches ordinary allocation")
|
||||||
var count: Variant = limit
|
var count: Variant = limit
|
||||||
check(E.eq(Math.split(new_remainders, "population", count, weights), Legacy.split(old_remainders, "population", count, weights)), "Split matches legacy rounding")
|
check(E.eq(Math.split(new_remainders, "population", count, weights), Legacy.split(old_remainders, "population", count, weights)), "Split matches legacy rounding")
|
||||||
check(E.eq(new_remainders, old_remainders), "Signed remainder debt matches legacy")
|
check(E.eq(new_remainders, old_remainders), "Signed remainder debt matches legacy")
|
||||||
|
|||||||
@@ -0,0 +1,111 @@
|
|||||||
|
extends SceneTree
|
||||||
|
const E = preload("res://world/owniverse/math/exact.gd")
|
||||||
|
const Civ = preload("res://world/owniverse/civilization_evolution.gd")
|
||||||
|
const Q = preload("res://world/owniverse/quantity_math.gd")
|
||||||
|
const Fixture = preload("res://tests/fixtures/civilization_benchmark.gd")
|
||||||
|
var checks: int = 0
|
||||||
|
var failures: int = 0
|
||||||
|
func _initialize(): call_deferred("run")
|
||||||
|
func check(value: bool, message: String):
|
||||||
|
checks += 1
|
||||||
|
if not value:
|
||||||
|
failures += 1
|
||||||
|
push_error(message)
|
||||||
|
|
||||||
|
func run():
|
||||||
|
for count in [0, 1, 7, 999999999, E.of("1e40"), E.of("1e400")]:
|
||||||
|
var carry: Dictionary = {}
|
||||||
|
for round_index in 20:
|
||||||
|
var weights: Dictionary = {"m": round_index + 1.0, "l": 0.0, "w": 9.0, "d": 4.0, "c": 137.0, "b": 2.0}
|
||||||
|
var profile: Dictionary = Civ.State.normalize_profile(weights)
|
||||||
|
var shares: Array = []
|
||||||
|
for ethic in Civ.ETHICS: shares.append(profile[ethic])
|
||||||
|
var result: Dictionary = Q.split_profile(carry, "profile", count, Civ.ETHICS, shares)
|
||||||
|
check(E.eq(Q.sum(result), count), "Profile quotas conserve arbitrary-size whole totals")
|
||||||
|
for value in result.values(): check(E.ge(value, 0) and E.eq(value, E.floor_value(value)), "Profile quotas stay nonnegative whole")
|
||||||
|
for value in carry.values(): check(is_finite(value) and value >= -1.0 and value <= 1.0, "Signed profile carries stay bounded")
|
||||||
|
check(absf(E.ratio_approx(E.of("1e400"), E.of("3e400")) - 1.0 / 3.0) < 1e-15, "Float profile ratio handles values beyond float range")
|
||||||
|
for count in [1, 101, E.of("1e40"), E.of("1e400")]:
|
||||||
|
var stocks: Dictionary = {"a": count, "b": E.add(count, 1), "c": 0}
|
||||||
|
var total: Variant = Q.sum(stocks)
|
||||||
|
for limit in [0, count, E.subtract(total, 1), total]:
|
||||||
|
var allocated: Dictionary = Q.allocate_profiled(stocks, limit)
|
||||||
|
check(E.eq(Q.sum(allocated), limit), "Profiled stock allocation retains the exact granted total")
|
||||||
|
for id in stocks: check(E.ge(allocated[id], 0) and E.le(allocated[id], stocks[id]), "Profiled stock allocation respects every owner ceiling")
|
||||||
|
for probability in [0.1, 1.0 / 3.0, 1.23456789]:
|
||||||
|
var carries: Dictionary = {}
|
||||||
|
var old_carry: Variant = 0
|
||||||
|
for iteration in 20:
|
||||||
|
var expected: Variant = E.add(E.multiply(count, probability), old_carry)
|
||||||
|
var whole: Variant = E.floor_value(expected)
|
||||||
|
old_carry = E.maximum(0, E.subtract(expected, whole))
|
||||||
|
var actual: Variant = Q.accumulate_rate(carries, "rate", count, probability)
|
||||||
|
check(E.eq(actual, whole), "Fast float carries preserve the whole result of rate accumulation")
|
||||||
|
check(E.near(carries.rate, old_carry), "Fast float carries preserve the fractional remainder")
|
||||||
|
for speed in [1, 4, 6]:
|
||||||
|
var world = load("res://world/owniverse/owniverse.gd").new()
|
||||||
|
world.catalog.load_definitions(root.get_node("Global").OwniverseEntities)
|
||||||
|
Fixture.seed(world, root.get_node("Global"), true, true)
|
||||||
|
var rules: Dictionary = root.get_node("Global").CivilizationRules
|
||||||
|
var id: String = rules.keys()[0]
|
||||||
|
var modifiers: Dictionary = {"progress": 1, "degradation": 1, "war": 1, "colonization": 1}
|
||||||
|
var original: Dictionary = Civ.coefficients(world, rules, id, modifiers).duplicate(true)
|
||||||
|
modifiers.progress = 2
|
||||||
|
var changed: Dictionary = Civ.coefficients(world, rules, id, modifiers)
|
||||||
|
var row: Dictionary = rules[id].ethics.m
|
||||||
|
var p: Variant = E.maximum(0, E.multiply(E.of(row.progress), 2))
|
||||||
|
var d: Variant = E.maximum(0, E.of(row.degradation))
|
||||||
|
check(E.near(changed.m.pro, E.divide(p, E.maximum(1, E.add(p, d)))), "Coefficient cache follows modifiers")
|
||||||
|
modifiers.progress = 1
|
||||||
|
check(E.eq(Civ.coefficients(world, rules, id, modifiers), original), "Coefficient cache restores original rates")
|
||||||
|
var local_rules: Dictionary = rules.duplicate(true)
|
||||||
|
local_rules[id].ethics.m.progress = "0.375"
|
||||||
|
changed = Civ.coefficients(world, local_rules, id, modifiers)
|
||||||
|
check(E.near(changed.m.pro, E.divide(E.of("0.375"), E.maximum(1, E.add(E.of("0.375"), d)))), "Coefficient cache follows rule edits")
|
||||||
|
var target: Dictionary = {"ethics": {}}
|
||||||
|
target.amount = {}
|
||||||
|
target.binds = {}
|
||||||
|
target.stats = {"total_amount": {}}
|
||||||
|
target.amount[id] = 60
|
||||||
|
target.stats.total_amount[id] = 60
|
||||||
|
Civ.State.reconcile(world, target, rules, {id: 60})
|
||||||
|
target.ethics[id] = {"m": 1.0, "l": 0.0, "w": 0.0, "d": 0.0, "c": 0.0, "b": 0.0}
|
||||||
|
Civ.State.reconcile(world, target, rules, {id: 60})
|
||||||
|
check(E.eq(target.ethics[id].m, 1.0), "Reconcile cache detects changed ethics")
|
||||||
|
Civ.State.reconcile(world, target, rules, {id: 120})
|
||||||
|
check(E.eq(target.ethics[id].m, 1.0), "Reconcile cache detects changed population")
|
||||||
|
target.amount[id] = 120
|
||||||
|
Civ.worship(world, target, rules)
|
||||||
|
target.ethics[id].m = 0.5
|
||||||
|
target.ethics[id].l = 0.5
|
||||||
|
var expected: float = 0.0
|
||||||
|
for stage in rules:
|
||||||
|
if rules[stage].worships:
|
||||||
|
for ethic in target.ethics[stage]:
|
||||||
|
var n: float = (0.0 + target.ethics[stage][ethic]) * E.approx(E.of(rules[stage].ethics[ethic].worship))
|
||||||
|
n *= E.approx(target.amount.get(stage, 0))
|
||||||
|
expected += n
|
||||||
|
check(E.near(Civ.worship(world, target, rules), expected), "Worship cache detects changed ethics")
|
||||||
|
var worship_rules: Dictionary = rules.duplicate(true)
|
||||||
|
for stage in worship_rules:
|
||||||
|
if worship_rules[stage].worships:
|
||||||
|
worship_rules[stage].ethics.m.worship = "0.375"
|
||||||
|
expected = 0.0
|
||||||
|
for stage in worship_rules:
|
||||||
|
if worship_rules[stage].worships:
|
||||||
|
for ethic in target.ethics[stage]:
|
||||||
|
var n: float = (0.0 + target.ethics[stage][ethic]) * E.approx(E.of(worship_rules[stage].ethics[ethic].worship))
|
||||||
|
n *= E.approx(target.amount.get(stage, 0))
|
||||||
|
expected += n
|
||||||
|
check(E.near(Civ.worship(world, target, worship_rules), expected), "Worship cache detects changed rules")
|
||||||
|
world.ledger = load("res://tests/fixtures/audit_rounding_ledger.gd").new(world)
|
||||||
|
# Civilizations no longer trigger batch generations. Seed an actual
|
||||||
|
# stellar completion so the selective-rounding path is exercised.
|
||||||
|
world.state.batches.BG = [{"amount": world.state.amount.BG, "start_year": 1, "end_year": 1}]
|
||||||
|
world.speed = speed
|
||||||
|
for i in 3: world.evolute(1.0 if speed == 1 else 0.1)
|
||||||
|
check(world.ledger.checks > 0 and world.ledger.failures == 0, "Selective and full rounding agree at speed %d" % speed)
|
||||||
|
for entity in world.catalog.entities.values(): entity.free()
|
||||||
|
world.free()
|
||||||
|
print("Simulation optimizations: %d checks, %d failures" % [checks, failures])
|
||||||
|
quit(1 if failures else 0)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://bcvertbh5uxys
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
extends SceneTree
|
||||||
|
const E = preload("res://world/owniverse/math/exact.gd")
|
||||||
|
const Q = preload("res://world/owniverse/quantity_math.gd")
|
||||||
|
var checks: int = 0
|
||||||
|
var failures: int = 0
|
||||||
|
func _initialize(): call_deferred("run")
|
||||||
|
func check(value: bool, message: String):
|
||||||
|
checks += 1
|
||||||
|
if not value:
|
||||||
|
failures += 1
|
||||||
|
push_error(message)
|
||||||
|
static func reference_split(remainders: Dictionary, key: String, count: Variant, weights: Dictionary) -> Dictionary:
|
||||||
|
var result: Dictionary = {}
|
||||||
|
var sum_weights: Variant = Q.sum(weights)
|
||||||
|
if (E.le(count, 0) or E.le(sum_weights, 0)): return result
|
||||||
|
var ids: Array = weights.keys()
|
||||||
|
var expected: Array = []
|
||||||
|
var remainder_keys: Array = []
|
||||||
|
var positive_sum: Variant = 0
|
||||||
|
for id in ids:
|
||||||
|
var remainder_key: String = key + ":" + str(id)
|
||||||
|
remainder_keys.append(remainder_key)
|
||||||
|
var value: Variant = E.add(E.mul_div(count, weights[id], sum_weights), remainders.get(remainder_key, 0))
|
||||||
|
expected.append(value)
|
||||||
|
positive_sum = E.add(positive_sum, E.maximum(0, value))
|
||||||
|
var order: Array = []
|
||||||
|
var rests: Array = []
|
||||||
|
var assigned: Variant = 0
|
||||||
|
for i in ids.size():
|
||||||
|
var normalized: Variant = E.mul_div(E.maximum(0, expected[i]), count, positive_sum) if E.gt(positive_sum, 0) else 0
|
||||||
|
result[ids[i]] = E.floor_value(normalized)
|
||||||
|
assigned = E.add(assigned, result[ids[i]])
|
||||||
|
rests.append(E.subtract(normalized, result[ids[i]]))
|
||||||
|
order.append(i)
|
||||||
|
order.sort_custom(func(a: int, b: int) -> bool: return E.gt(rests[a], rests[b]) if E.ne(rests[a], rests[b]) else str(ids[a]) < str(ids[b]))
|
||||||
|
for i in order:
|
||||||
|
if E.ge(assigned, count): break
|
||||||
|
result[ids[i]] = E.add(result[ids[i]], 1)
|
||||||
|
assigned = E.add(assigned, 1)
|
||||||
|
for i in ids.size():
|
||||||
|
remainders[remainder_keys[i]] = E.clamp_value(E.subtract(expected[i], result[ids[i]]), E.neg(1), 1)
|
||||||
|
return result
|
||||||
|
|
||||||
|
func run():
|
||||||
|
for count in [0, 1, 7, E.of("1.375"), 1000000, E.of("1e40"), E.of("1e80")]:
|
||||||
|
for weights in [{}, {"a": 0, "b": 0}, {"a": 0, "b": 7}, {"b": 0, "a": 7}, {"a": 1, "b": 1, "c": 1}, {"a": E.of("0.017"), "b": E.of("0.333333333333"), "c": 0}, {"a": E.of("1e40"), "b": 17, "c": 1}]:
|
||||||
|
for carry in [0, E.of("0.25"), E.of("-0.75")]:
|
||||||
|
var actual: Dictionary = {"case:a": carry}
|
||||||
|
var expected: Dictionary = actual.duplicate(true)
|
||||||
|
for iteration in 5:
|
||||||
|
var reference: Dictionary = reference_split(expected, "case", count, weights)
|
||||||
|
var result: Dictionary = Q.split(actual, "case", count, weights)
|
||||||
|
check(E.eq(result, reference), "Split preserves allocation")
|
||||||
|
check(E.eq(actual, expected), "Split preserves rounding carries")
|
||||||
|
for a in [0, 7, E.of("1e40"), E.of("-1e40"), E.of("1.375")]:
|
||||||
|
var values: Array = [0, 1, -7, E.of("0.017"), E.of("1e30")]
|
||||||
|
for divisor in [1, 3, E.of("0.017"), E.of("1e40")]:
|
||||||
|
var results: Array = E.mul_div_many(a, values, divisor)
|
||||||
|
for i in values.size(): check(E.eq(results[i], E.mul_div(a, values[i], divisor)), "Grouped ratios preserve scalar results")
|
||||||
|
for count in [1, 7, 1000000000, E.of("1e40"), E.of("1e80")]:
|
||||||
|
for factor in [200, 1000]:
|
||||||
|
var weights: Array = [0, 17, E.of("1e40"), E.multiply(count, factor)]
|
||||||
|
var results: Array = E.population_quotas(count, weights, factor)
|
||||||
|
for i in weights.size(): check(E.eq(results[i], E.mul_div(count, weights[i], E.multiply(count, factor))), "Cancelled population preserves exact scalar quotas")
|
||||||
|
print("Split optimizations: %d checks, %d failures" % [checks, failures])
|
||||||
|
quit(1 if failures else 0)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://b4e1nd22q1705
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
extends SceneTree
|
||||||
|
const E = preload("res://world/owniverse/math/exact.gd")
|
||||||
|
func _initialize():
|
||||||
|
# SceneTree initialization runs before Global._ready, like main scene construction.
|
||||||
|
var global = root.get_node("Global")
|
||||||
|
assert(not global.is_node_ready(), "Test must cover pre-ready initialization")
|
||||||
|
assert(global.ExtraParams.has("E"), "Energy table exists before Global._ready")
|
||||||
|
var scene = load("res://world/world.tscn").instantiate()
|
||||||
|
var stage = scene.get_node("Stage")
|
||||||
|
assert(E.eq(stage.owniverse.state.energy, global.ExtraParams.E), "Stage starts with configured energy")
|
||||||
|
stage.owniverse.free()
|
||||||
|
scene.free()
|
||||||
|
print("Startup params: 3 checks, 0 failures")
|
||||||
|
quit()
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://5cbgaqn5s1yw
|
||||||
@@ -70,7 +70,7 @@ func run() -> void:
|
|||||||
check(E.eq(world.stellar.evolution_products(world.state, world.catalog.entities.HRG, 37), restored.stellar.evolution_products(restored.state, restored.catalog.entities.HRG, 37)), "Evolution carry survives serialization")
|
check(E.eq(world.stellar.evolution_products(world.state, world.catalog.entities.HRG, 37), restored.stellar.evolution_products(restored.state, restored.catalog.entities.HRG, 37)), "Evolution carry survives serialization")
|
||||||
dispose(restored)
|
dispose(restored)
|
||||||
|
|
||||||
# Real RD lifespan, four stars spread over the existing lifespan/40 window.
|
# Real RD lifespan, four stars spread over one age-group window.
|
||||||
world.state.amount.N = 0
|
world.state.amount.N = 0
|
||||||
world.state.amount.RD = 4
|
world.state.amount.RD = 4
|
||||||
world.batches.append_batch(world.state, "RD", 4, 0, 0)
|
world.batches.append_batch(world.state, "RD", 4, 0, 0)
|
||||||
@@ -96,7 +96,7 @@ func run() -> void:
|
|||||||
check((E.eq(world.state.binds.RD.GG, 16) and E.eq(world.state.binds.RD.AB, 120)), "Planet multiplicity applied")
|
check((E.eq(world.state.binds.RD.GG, 16) and E.eq(world.state.binds.RD.AB, 120)), "Planet multiplicity applied")
|
||||||
check((E.eq(world.state.amount.HP, 0) and E.eq(world.state.stats.total_amount.HP, 1)), "Created planets are bound, counted once")
|
check((E.eq(world.state.amount.HP, 0) and E.eq(world.state.stats.total_amount.HP, 1)), "Created planets are bound, counted once")
|
||||||
var saves: Node = root.get_node("SaveManager")
|
var saves: Node = root.get_node("SaveManager")
|
||||||
check(E.eq(saves.validate_data({"format_version": 5, "app_version": "", "ui": {"current_page": 0}, "state": world.state}), ""), "Planet carry save validates")
|
check(E.eq(saves.validate_data({"format_version": 6, "app_version": "", "ui": {"current_page": 0}, "state": world.state}), ""), "Planet carry save validates")
|
||||||
restored = fixture()
|
restored = fixture()
|
||||||
restored.state = E.decode(bytes_to_var(var_to_bytes(E.encode(world.state))))
|
restored.state = E.decode(bytes_to_var(var_to_bytes(E.encode(world.state))))
|
||||||
world.stellar.create_planets(world.state, "RD", 37, 0, 0, E.of("0.7"))
|
world.stellar.create_planets(world.state, "RD", 37, 0, 0, E.of("0.7"))
|
||||||
@@ -118,7 +118,7 @@ func run() -> void:
|
|||||||
check((E.eq(world.state.amount.RP, 0) and E.eq(world.state.amount["C1.3"], 0)), "Inherited planets never become free")
|
check((E.eq(world.state.amount.RP, 0) and E.eq(world.state.amount["C1.3"], 0)), "Inherited planets never become free")
|
||||||
world.evolution.evolve_batches(world.state, E.add(lifespan, width))
|
world.evolution.evolve_batches(world.state, E.add(lifespan, width))
|
||||||
check((E.eq(world.state.binds.RD["C1.3"], 0) and E.eq(world.state.binds.TWD["C1.3"], 4)), "No planets left at extinct parent type")
|
check((E.eq(world.state.binds.RD["C1.3"], 0) and E.eq(world.state.binds.TWD["C1.3"], 4)), "No planets left at extinct parent type")
|
||||||
check(E.eq(saves.validate_data({"format_version": 5, "app_version": "", "ui": {"current_page": 0}, "state": world.state}), ""), "Inherited state validates")
|
check(E.eq(saves.validate_data({"format_version": 6, "app_version": "", "ui": {"current_page": 0}, "state": world.state}), ""), "Inherited state validates")
|
||||||
dispose(world)
|
dispose(world)
|
||||||
|
|
||||||
world = fixture()
|
world = fixture()
|
||||||
@@ -158,7 +158,7 @@ func run() -> void:
|
|||||||
check((E.eq(world.state.amount.SN, 0) and E.eq(world.state.amount.LNS, 1)), "Supernova produces a remnant")
|
check((E.eq(world.state.amount.SN, 0) and E.eq(world.state.amount.LNS, 1)), "Supernova produces a remnant")
|
||||||
check(((E.eq(world.state.amount.H, 8) and E.eq(world.state.amount.He, 50)) and E.eq(world.state.amount.Met, 11)), "Supernova returns table resources")
|
check(((E.eq(world.state.amount.H, 8) and E.eq(world.state.amount.He, 50)) and E.eq(world.state.amount.Met, 11)), "Supernova returns table resources")
|
||||||
check((not world.state.amount.has("blast")), "Supernova dispatches blast output")
|
check((not world.state.amount.has("blast")), "Supernova dispatches blast output")
|
||||||
check(E.eq(saves.validate_data({"format_version": 5, "app_version": "", "ui": {"current_page": 0}, "state": world.state}), ""), "Blast state validates")
|
check(E.eq(saves.validate_data({"format_version": 6, "app_version": "", "ui": {"current_page": 0}, "state": world.state}), ""), "Blast state validates")
|
||||||
dispose(world)
|
dispose(world)
|
||||||
|
|
||||||
world = fixture()
|
world = fixture()
|
||||||
@@ -176,8 +176,19 @@ func run() -> void:
|
|||||||
world.state.amount.Met = 100
|
world.state.amount.Met = 100
|
||||||
world.state.auto_resources.H = 100
|
world.state.auto_resources.H = 100
|
||||||
world.evolute(E.of("0.1"))
|
world.evolute(E.of("0.1"))
|
||||||
check((E.eq(world.state.amount.RD, 101) and E.eq(world.state.amount.H, 0)), "Automatic formation uses its resource budget")
|
check((E.eq(world.state.amount.RD, 1) and E.eq(world.state.amount.H, 100)), "Automatic formation cannot spend hydrogen retained from an earlier cycle")
|
||||||
check(E.ge(world.state.binds.RD.HP, 1), "Automatic formation also creates planets")
|
check(E.eq(world.state.auto_resources.get("H", 0), 0), "Unused automatic hydrogen becomes an ordinary free resource")
|
||||||
|
dispose(world)
|
||||||
|
|
||||||
|
world = fixture()
|
||||||
|
world.catalog.entities.N.auto = 1
|
||||||
|
world.state.amount.RD = 1
|
||||||
|
world.state.amount.H = 100
|
||||||
|
world.state.amount.Met = 100
|
||||||
|
world.evolute(100)
|
||||||
|
check(E.gt(world.state.amount.RD, 1), "Automatic formation can spend newly produced hydrogen")
|
||||||
|
check(E.ge(world.state.amount.H, 100), "Automatic formation preserves hydrogen available before the cycle")
|
||||||
|
check(E.ge(world.state.binds.get("RD", {}).get("HP", 0), 1), "Automatic formation also creates planets")
|
||||||
dispose(world)
|
dispose(world)
|
||||||
|
|
||||||
world = fixture()
|
world = fixture()
|
||||||
|
|||||||
+2
-2
@@ -51,10 +51,10 @@ func run() -> void:
|
|||||||
for invalid in [0, E.neg(1), NAN, INF, 1e308]:
|
for invalid in [0, E.neg(1), NAN, INF, 1e308]:
|
||||||
world.evolute(invalid)
|
world.evolute(invalid)
|
||||||
check(E.eq(world.state, before), "Invalid/overflow interval rejected")
|
check(E.eq(world.state, before), "Invalid/overflow interval rejected")
|
||||||
check(E.eq(saves.validate_data({"format_version": 5, "app_version": "", "ui": {"current_page": 0}, "state": world.state}), ""), "Fractional save is valid")
|
check(E.eq(saves.validate_data({"format_version": 6, "app_version": "", "ui": {"current_page": 0}, "state": world.state}), ""), "Fractional save is valid")
|
||||||
var invalid_save: Dictionary = world.state.duplicate(true)
|
var invalid_save: Dictionary = world.state.duplicate(true)
|
||||||
invalid_save.time.year = E.of("0.25")
|
invalid_save.time.year = E.of("0.25")
|
||||||
check(E.ne(saves.validate_data({"format_version": 5, "app_version": "", "ui": {"current_page": 0}, "state": invalid_save}), ""), "Reject inconsistent fractional clock")
|
check(E.ne(saves.validate_data({"format_version": 6, "app_version": "", "ui": {"current_page": 0}, "state": invalid_save}), ""), "Reject inconsistent fractional clock")
|
||||||
dispose(world)
|
dispose(world)
|
||||||
|
|
||||||
for fps in [30, 60, 144]:
|
for fps in [30, 60, 144]:
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ func run() -> void:
|
|||||||
root.add_child(scene)
|
root.add_child(scene)
|
||||||
await process_frame
|
await process_frame
|
||||||
await process_frame
|
await process_frame
|
||||||
|
check(stage.effects_player.stream == null, "Startup does not play a UI sound")
|
||||||
stage.stage_page_scroller.scroll_horizontal = stage.PAGE_WIDTH
|
stage.stage_page_scroller.scroll_horizontal = stage.PAGE_WIDTH
|
||||||
await process_frame
|
await process_frame
|
||||||
stage.owniverse.state.amount.H = 1000
|
stage.owniverse.state.amount.H = 1000
|
||||||
@@ -54,6 +55,38 @@ func run() -> void:
|
|||||||
stage.owniverse.state.time.year = E.of("1234.5")
|
stage.owniverse.state.time.year = E.of("1234.5")
|
||||||
stage._refresh_universe_ui()
|
stage._refresh_universe_ui()
|
||||||
check(E.eq(stage.date_time.text, "1 234.5"), "Time displays tenths with thousands separator")
|
check(E.eq(stage.date_time.text, "1 234.5"), "Time displays tenths with thousands separator")
|
||||||
|
stage.effects_player.set_enabled(true)
|
||||||
|
stage.owniverse.speed = 1
|
||||||
|
stage._change_speed(1)
|
||||||
|
check(stage.effects_player.stream == stage.effects_player._effects.time_plus, "Increasing speed plays its effect")
|
||||||
|
stage._change_speed(-1)
|
||||||
|
check(stage.effects_player.stream == stage.effects_player._effects.time_minus, "Decreasing speed plays its effect")
|
||||||
|
stage._on_topmenu_button_pressed("MainMenu")
|
||||||
|
check(stage.effects_player.stream == stage.effects_player._effects.window_open, "Opening a window plays its effect")
|
||||||
|
stage._on_topmenu_button_pressed("World")
|
||||||
|
check(stage.effects_player.stream == stage.effects_player._effects.window_close, "Closing a window plays its effect")
|
||||||
|
stage.indicator_elapsed = 1.0
|
||||||
|
stage.active_actions_elapsed = 1.0
|
||||||
|
stage.tick_ui(0.0)
|
||||||
|
var refreshes: int = stage.actions_refreshes
|
||||||
|
stage.date_time.text = "unchanged"
|
||||||
|
stage.active_actions_elapsed = 1.0
|
||||||
|
stage.tick_ui(0.0)
|
||||||
|
check(stage.actions_refreshes == refreshes, "Idle UI does not recalculate production limits")
|
||||||
|
check(stage.date_time.text == "unchanged", "Idle UI does not reformat the clock")
|
||||||
|
stage.owniverse.state.amount.H = 3456
|
||||||
|
stage.owniverse.presentation.refresh(stage.owniverse.state, stage.owniverse.catalog)
|
||||||
|
stage.tick_ui(0.0)
|
||||||
|
check(hydrogen.description.text == "3 456", "A manual publication updates idle UI")
|
||||||
|
check(stage.actions_refreshes == refreshes + 1, "A publication invalidates production limits")
|
||||||
|
stage.active_actions_dirty = true
|
||||||
|
stage.tick_ui(0.0)
|
||||||
|
check(stage.actions_refreshes == refreshes + 2, "Selection invalidation refreshes limits immediately")
|
||||||
|
var old_pointer: float = stage.world_indicators.pointers.Agg.position.x
|
||||||
|
stage.owniverse.environment.modify_world_parameter("Agg", 1)
|
||||||
|
stage.indicator_elapsed = 1.0
|
||||||
|
stage.tick_ui(0.0)
|
||||||
|
check(stage.world_indicators.pointers.Agg.position.x != old_pointer, "World parameter actions invalidate indicators")
|
||||||
for entity in stage.owniverse.catalog.entities.values(): entity.free()
|
for entity in stage.owniverse.catalog.entities.values(): entity.free()
|
||||||
stage.owniverse.free()
|
stage.owniverse.free()
|
||||||
scene.free()
|
scene.free()
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
extends SceneTree
|
extends SceneTree
|
||||||
const E = preload("res://world/owniverse/math/exact.gd")
|
const E = preload("res://world/owniverse/math/exact.gd")
|
||||||
const CivilizationState = preload("res://world/owniverse/civilization_state.gd")
|
const CivilizationState = preload("res://world/owniverse/civilization_state.gd")
|
||||||
const CivilizationEvolution = preload("res://world/owniverse/civilization_evolution.gd")
|
|
||||||
|
|
||||||
const Parameters = preload("res://world/owniverse/world_parameters.gd")
|
const Parameters = preload("res://world/owniverse/world_parameters.gd")
|
||||||
const Descriptions = preload("res://world/owniverse/item_description.gd")
|
const Descriptions = preload("res://world/owniverse/item_description.gd")
|
||||||
@@ -91,24 +90,24 @@ func run() -> void:
|
|||||||
|
|
||||||
world = fixture()
|
world = fixture()
|
||||||
world.state.amount["C0.2"] = 1000000
|
world.state.amount["C0.2"] = 1000000
|
||||||
world.state.ethics["C0.2"] = {"m": 1000000}
|
world.state.ethics["C0.2"] = {"m": 1.0, "l": 0.0, "w": 0.0, "d": 0.0, "c": 0.0, "b": 0.0}
|
||||||
var baseline: Dictionary = world.state.duplicate(true)
|
var baseline: Dictionary = world.state.duplicate(true)
|
||||||
var advanced: Dictionary = baseline.duplicate(true)
|
var advanced: Dictionary = baseline.duplicate(true)
|
||||||
advanced.world_parameters.Agg = 19
|
advanced.world_parameters.Agg = 19
|
||||||
var next_stage: String = global.CivilizationRules["C0.2"].next
|
var next_stage: String = global.CivilizationRules["C0.2"].next
|
||||||
var outcomes: Array = []
|
var outcomes: Array = []
|
||||||
for target in [baseline, advanced]:
|
for target in [baseline, advanced]:
|
||||||
var expired: Dictionary = {"C0.2": [{"amount": 1000000, "from": 0, "to": 1}]}
|
world.civilization_flow.evolve(target, 0, 2000)
|
||||||
var budget: Dictionary = CivilizationState.stellar_budget(world, target, global.CivilizationRules)
|
outcomes.append(target.amount.get(next_stage, 0))
|
||||||
CivilizationEvolution.prepare(world, target, expired, 1, budget, global.CivilizationRules)
|
|
||||||
outcomes.append(expired["C0.2"][0].products.get(next_stage, 0))
|
|
||||||
check(E.gt(outcomes[1], outcomes[0]), "Aggression changes actual ethical civilization transitions")
|
check(E.gt(outcomes[1], outcomes[0]), "Aggression changes actual ethical civilization transitions")
|
||||||
dispose(world)
|
dispose(world)
|
||||||
|
|
||||||
# Trends use ethical proportions and stage weights, not population magnitude.
|
# Trends use ethical proportions and stage weights, not population magnitude.
|
||||||
world = fixture()
|
world = fixture()
|
||||||
var rules: Dictionary = {"C2.0": {"home": "DwStar"}, "C2.1": {"home": "DwStar"}}
|
var rules: Dictionary = {"C2.0": {"home": "DwStar"}, "C2.1": {"home": "DwStar"}}
|
||||||
world.state.ethics = {"C2.0": {"d": 100}, "C2.1": {"d": 100}}
|
world.state.ethics = {"C2.0": {"m": 0.0, "l": 0.0, "w": 0.0, "d": 1.0, "c": 0.0, "b": 0.0}, "C2.1": {"m": 0.0, "l": 0.0, "w": 0.0, "d": 1.0, "c": 0.0, "b": 0.0}}
|
||||||
|
world.state.amount["C2.1"] = 10
|
||||||
|
world.state.binds["RD"] = {"C2.0": 10}
|
||||||
var source: Dictionary = world.state.duplicate(true)
|
var source: Dictionary = world.state.duplicate(true)
|
||||||
var single: Dictionary = source.duplicate(true)
|
var single: Dictionary = source.duplicate(true)
|
||||||
var split: Dictionary = source.duplicate(true)
|
var split: Dictionary = source.duplicate(true)
|
||||||
@@ -117,10 +116,17 @@ func run() -> void:
|
|||||||
check(E.near(single.trends.Integration, E.of("0.018")), "Trend integrates elapsed years and doubled stage weights")
|
check(E.near(single.trends.Integration, E.of("0.018")), "Trend integrates elapsed years and doubled stage weights")
|
||||||
for key in Parameters.TRENDS:
|
for key in Parameters.TRENDS:
|
||||||
check(E.near(single.trends[key], split.trends[key]), E.add("Trend is independent of frame partition: ", key))
|
check(E.near(single.trends[key], split.trends[key]), E.add("Trend is independent of frame partition: ", key))
|
||||||
source.ethics["C2.0"].d = 1000000
|
source.ethics["C2.0"].d = 1.0
|
||||||
var larger: Dictionary = world.state.duplicate(true)
|
var larger: Dictionary = world.state.duplicate(true)
|
||||||
|
larger.amount["C2.1"] = 1000000
|
||||||
|
larger.binds["RD"]["C2.0"] = 1000000
|
||||||
Parameters.advance(source, larger, rules, 1000000)
|
Parameters.advance(source, larger, rules, 1000000)
|
||||||
check(E.near(larger.trends.Integration, single.trends.Integration), "Population proportions determine trend influence")
|
check(E.near(larger.trends.Integration, single.trends.Integration), "Population proportions determine trend influence")
|
||||||
|
var vacant: Dictionary = world.state.duplicate(true)
|
||||||
|
vacant.amount["C2.1"] = 0
|
||||||
|
vacant.binds["RD"]["C2.0"] = 0
|
||||||
|
Parameters.advance(vacant, vacant, rules, 1000000)
|
||||||
|
check(vacant.trends.values().all(func (value): return E.eq(value, 0)), "Empty saved ethic profiles do not generate trends")
|
||||||
world.state.trends.Integration = E.of("0.99")
|
world.state.trends.Integration = E.of("0.99")
|
||||||
Parameters.advance(source, world.state, rules, 100000000)
|
Parameters.advance(source, world.state, rules, 100000000)
|
||||||
check(E.eq(world.state.civilization_stats["trend:Integration"], 2), "Long steps process every crossed threshold")
|
check(E.eq(world.state.civilization_stats["trend:Integration"], 2), "Long steps process every crossed threshold")
|
||||||
@@ -133,7 +139,7 @@ func run() -> void:
|
|||||||
Parameters.advance(source, world.state, rules, E.of("1.0e12"))
|
Parameters.advance(source, world.state, rules, E.of("1.0e12"))
|
||||||
check((E.ge(world.state.trends.Integration, 0) and E.lt(world.state.trends.Integration, 1)), "Very large intervals finish with a valid trend fraction")
|
check((E.ge(world.state.trends.Integration, 0) and E.lt(world.state.trends.Integration, 1)), "Very large intervals finish with a valid trend fraction")
|
||||||
check(E.ge(world.state.world_parameters.Agg, 1), "Repeated integration events cannot reduce aggression below the scale")
|
check(E.ge(world.state.world_parameters.Agg, 1), "Repeated integration events cannot reduce aggression below the scale")
|
||||||
var payload: Dictionary = {"format_version": 5, "app_version": "test", "ui": {"current_page": 1}, "state": world.state}
|
var payload: Dictionary = {"format_version": 6, "app_version": "test", "ui": {"current_page": 1}, "state": world.state}
|
||||||
var manager: Node = root.get_node("SaveManager")
|
var manager: Node = root.get_node("SaveManager")
|
||||||
check(E.eq(manager.validate_data(payload), ""), "New parameters and trends pass save validation")
|
check(E.eq(manager.validate_data(payload), ""), "New parameters and trends pass save validation")
|
||||||
var old: Dictionary = payload.duplicate(true)
|
var old: Dictionary = payload.duplicate(true)
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
class_name OwniverseEffectsPlayer
|
||||||
|
extends AudioStreamPlayer
|
||||||
|
|
||||||
|
var enabled: bool = true
|
||||||
|
var _effects: Dictionary = OwniverseAudioLoader.get_effects()
|
||||||
|
|
||||||
|
|
||||||
|
func set_enabled(value: bool) -> void:
|
||||||
|
enabled = value
|
||||||
|
stream_paused = not enabled
|
||||||
|
|
||||||
|
|
||||||
|
func play_effect(effect_id: String) -> bool:
|
||||||
|
if not enabled:
|
||||||
|
return false
|
||||||
|
if not _effects.has(effect_id):
|
||||||
|
push_warning("Unknown sound effect: " + effect_id)
|
||||||
|
return false
|
||||||
|
if playing and stream == _effects[effect_id]:
|
||||||
|
return false
|
||||||
|
|
||||||
|
stream = _effects[effect_id]
|
||||||
|
play()
|
||||||
|
return true
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://botb0k4qr0hqo
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
class_name OwniverseMusicPlayer
|
||||||
|
extends AudioStreamPlayer
|
||||||
|
|
||||||
|
const EXCLUDED_TRACK := "apocalypse_the_end"
|
||||||
|
const MIN_PAUSE_SECONDS := 2 * 60.0
|
||||||
|
const MAX_PAUSE_SECONDS := 5 * 60.0
|
||||||
|
|
||||||
|
var enabled: bool = true
|
||||||
|
var last_track: String = ""
|
||||||
|
var _pause_timer: Timer
|
||||||
|
var _rng := RandomNumberGenerator.new()
|
||||||
|
var _music: Dictionary = OwniverseAudioLoader.get_music()
|
||||||
|
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
_rng.randomize()
|
||||||
|
_pause_timer = Timer.new()
|
||||||
|
_pause_timer.one_shot = true
|
||||||
|
_pause_timer.timeout.connect(_play_next)
|
||||||
|
add_child(_pause_timer)
|
||||||
|
finished.connect(_schedule_pause)
|
||||||
|
if enabled:
|
||||||
|
_schedule_pause()
|
||||||
|
|
||||||
|
|
||||||
|
func set_enabled(value: bool) -> void:
|
||||||
|
enabled = value
|
||||||
|
if not is_node_ready():
|
||||||
|
return
|
||||||
|
|
||||||
|
stream_paused = not enabled
|
||||||
|
_pause_timer.paused = not enabled
|
||||||
|
if enabled and not playing and _pause_timer.is_stopped():
|
||||||
|
_play_next()
|
||||||
|
|
||||||
|
|
||||||
|
func play_apocalypse() -> void:
|
||||||
|
if not enabled:
|
||||||
|
return
|
||||||
|
if not _music.has(EXCLUDED_TRACK):
|
||||||
|
push_warning("Apocalypse music is unavailable.")
|
||||||
|
return
|
||||||
|
|
||||||
|
_pause_timer.stop()
|
||||||
|
stream = _music[EXCLUDED_TRACK]
|
||||||
|
play()
|
||||||
|
|
||||||
|
|
||||||
|
func _play_next() -> void:
|
||||||
|
if not enabled:
|
||||||
|
return
|
||||||
|
|
||||||
|
var candidates: Array = _music.keys()
|
||||||
|
candidates.erase(EXCLUDED_TRACK)
|
||||||
|
candidates.erase(last_track)
|
||||||
|
if candidates.is_empty():
|
||||||
|
push_warning("No music tracks available for playback.")
|
||||||
|
return
|
||||||
|
|
||||||
|
var track_id: String = str(candidates[_rng.randi_range(0, candidates.size() - 1)])
|
||||||
|
last_track = track_id
|
||||||
|
stream = _music[track_id]
|
||||||
|
play()
|
||||||
|
|
||||||
|
|
||||||
|
func _schedule_pause() -> void:
|
||||||
|
if not enabled:
|
||||||
|
return
|
||||||
|
_pause_timer.start(_rng.randf_range(MIN_PAUSE_SECONDS, MAX_PAUSE_SECONDS))
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://btsrt6rw3nr04
|
||||||
@@ -1 +1,81 @@
|
|||||||
extends VBoxContainer
|
extends VBoxContainer
|
||||||
|
|
||||||
|
const MIN_VOLUME_DB := -50.0
|
||||||
|
const SILENT_VOLUME_DB := -80.0
|
||||||
|
|
||||||
|
@onready var sound_button: TextureButton = $Media/Sound
|
||||||
|
@onready var music_button: TextureButton = $Media/Music
|
||||||
|
@onready var sound_volume: HSlider = $Volume/SoundVolume
|
||||||
|
@onready var music_volume: HSlider = $Volume/MusicVolume
|
||||||
|
@onready var english_button: TextureButton = $Language/English
|
||||||
|
@onready var russian_button: TextureButton = $Language/Russian
|
||||||
|
@onready var effects_player: OwniverseEffectsPlayer = $"../../FXPlayer"
|
||||||
|
@onready var music_player: OwniverseMusicPlayer = $"../../MusicPlayer"
|
||||||
|
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
SaveManager.load_settings()
|
||||||
|
sound_button.set_pressed_no_signal(bool(Global.Settings.sound_enabled))
|
||||||
|
music_button.set_pressed_no_signal(bool(Global.Settings.music_enabled))
|
||||||
|
sound_volume.set_value_no_signal(float(Global.Settings.sound_volume) * sound_volume.max_value)
|
||||||
|
music_volume.set_value_no_signal(float(Global.Settings.music_volume) * music_volume.max_value)
|
||||||
|
_update_locale_buttons()
|
||||||
|
_apply_sound_settings()
|
||||||
|
_apply_music_settings()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_sound_pressed() -> void:
|
||||||
|
Global.Settings.sound_enabled = sound_button.button_pressed
|
||||||
|
_apply_sound_settings()
|
||||||
|
SaveManager.save_settings()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_music_pressed() -> void:
|
||||||
|
Global.Settings.music_enabled = music_button.button_pressed
|
||||||
|
_apply_music_settings()
|
||||||
|
SaveManager.save_settings()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_sound_volume_value_changed(value: float) -> void:
|
||||||
|
Global.Settings.sound_volume = value / sound_volume.max_value
|
||||||
|
_apply_bus_volume("FX", float(Global.Settings.sound_volume))
|
||||||
|
SaveManager.save_settings()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_music_volume_value_changed(value: float) -> void:
|
||||||
|
Global.Settings.music_volume = value / music_volume.max_value
|
||||||
|
_apply_bus_volume("Music", float(Global.Settings.music_volume))
|
||||||
|
SaveManager.save_settings()
|
||||||
|
|
||||||
|
|
||||||
|
func _apply_sound_settings() -> void:
|
||||||
|
var bus_index: int = AudioServer.get_bus_index("FX")
|
||||||
|
AudioServer.set_bus_mute(bus_index, not bool(Global.Settings.sound_enabled))
|
||||||
|
effects_player.set_enabled(bool(Global.Settings.sound_enabled))
|
||||||
|
_apply_bus_volume("FX", float(Global.Settings.sound_volume))
|
||||||
|
|
||||||
|
|
||||||
|
func _apply_music_settings() -> void:
|
||||||
|
music_player.set_enabled(bool(Global.Settings.music_enabled))
|
||||||
|
_apply_bus_volume("Music", float(Global.Settings.music_volume))
|
||||||
|
|
||||||
|
|
||||||
|
func _apply_bus_volume(bus_name: String, value: float) -> void:
|
||||||
|
var bus_index: int = AudioServer.get_bus_index(bus_name)
|
||||||
|
if bus_index < 0:
|
||||||
|
push_warning("Missing audio bus: " + bus_name)
|
||||||
|
return
|
||||||
|
var normalized: float = clampf(value, 0.0, 1.0)
|
||||||
|
var volume_db: float = SILENT_VOLUME_DB if is_zero_approx(normalized) else lerpf(MIN_VOLUME_DB, 0.0, normalized)
|
||||||
|
AudioServer.set_bus_volume_db(bus_index, volume_db)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_change_locale_pressed(locale: String) -> void:
|
||||||
|
Global.set_locale(locale)
|
||||||
|
_update_locale_buttons()
|
||||||
|
SaveManager.save_settings()
|
||||||
|
|
||||||
|
|
||||||
|
func _update_locale_buttons() -> void:
|
||||||
|
english_button.set_pressed_no_signal(Global.Locale == "en")
|
||||||
|
russian_button.set_pressed_no_signal(Global.Locale == "ru")
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ Stage обращается непосредственно к `world.presentation
|
|||||||
| `automatic_production.gd` / `automatic` | Выпуск за период и жизнь новорождённых объектов, разделение ресурсов на обычные и автоматические, энергия, квоты звёзд и бурых карликов |
|
| `automatic_production.gd` / `automatic` | Выпуск за период и жизнь новорождённых объектов, разделение ресурсов на обычные и автоматические, энергия, квоты звёзд и бурых карликов |
|
||||||
| `stellar_rules.gd` / `stellar` | Продукты звёздной эволюции, создание планет, выбор звёздных преемников, два уровня разрушения и глобальные бласты |
|
| `stellar_rules.gd` / `stellar` | Продукты звёздной эволюции, создание планет, выбор звёздных преемников, два уровня разрушения и глобальные бласты |
|
||||||
| `life_evolution.gd` / `life` | Прогресс, деградация и повторная попытка планетарной жизни |
|
| `life_evolution.gd` / `life` | Прогресс, деградация и повторная попытка планетарной жизни |
|
||||||
| `civilization_evolution.gd`, `civilization_state.gd` | Существующие правила цивилизаций: этики, войны, колонизация, лимиты и места обитания |
|
| `civilization_flow.gd`, `civilization_state.gd` | Непрерывные потоки цивилизаций, доли этик, целые квоты, лимиты и места обитания |
|
||||||
| `universe_environment.gd` / `environment` | Плотность, металличность, доля попаданий бластов, изменение параметров мира с сохранением возраста звёзд |
|
| `universe_environment.gd` / `environment` | Плотность, металличность, доля попаданий бластов, изменение параметров мира с сохранением возраста звёзд |
|
||||||
| `evolution_coordinator.gd` / `evolution` | Порядок фаз шага, последовательные поколения и публикация нового состояния |
|
| `evolution_coordinator.gd` / `evolution` | Порядок фаз шага, последовательные поколения и публикация нового состояния |
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ Stage обращается непосредственно к `world.presentation
|
|||||||
|
|
||||||
1. Определить обработанную десятую года. При продвижении времени восстановить недостающие партии жизни и проверить вместимость.
|
1. Определить обработанную десятую года. При продвижении времени восстановить недостающие партии жизни и проверить вместимость.
|
||||||
2. Скопировать состояние, посчитать физические количества и производство за период.
|
2. Скопировать состояние, посчитать физические количества и производство за период.
|
||||||
3. Обработать поколения до конца интервала. Для каждого поколения: локальные разрушения → выбытие партий всех типов → план переходов → резервирование передачи привязок → зачисление преемников и их партий → производство новорождённых → применение привязок и округление → завершение переходов цивилизаций → глобальные бласты → проверка вместимости.
|
3. Интегрировать непрерывные потоки цивилизаций за весь интервал, затем обработать поколения звёзд и биологической жизни до конца интервала. Для каждого поколения: локальные разрушения → выбытие партий всех типов → план переходов → резервирование передачи привязок → зачисление преемников и их партий → производство новорождённых → применение привязок и округление → глобальные бласты → проверка вместимости.
|
||||||
4. Обновить групповые количества, ограничить автоматические ресурсы и продвинуть параметры мира.
|
4. Обновить групповые количества, ограничить автоматические ресурсы и продвинуть параметры мира.
|
||||||
5. Опубликовать новое состояние и обновить представление количеств.
|
5. Опубликовать новое состояние и обновить представление количеств.
|
||||||
|
|
||||||
|
|||||||
@@ -58,8 +58,10 @@ func produce_for_period(previous: Dictionary, target: Dictionary, quantities: Di
|
|||||||
amount = world.ledger.credit(target, id, amount)
|
amount = world.ledger.credit(target, id, amount)
|
||||||
world.batches.append_batch(target, id, amount, from_year, to_year)
|
world.batches.append_batch(target, id, amount, from_year, to_year)
|
||||||
|
|
||||||
# Keep unused automatic resources across cycles; they are part of free amounts.
|
# Automation may spend only the automatic output produced during this cycle.
|
||||||
var budget: Dictionary = previous.get("auto_resources", {}).duplicate(true)
|
# Any unused part becomes an ordinary free resource on the next cycle instead
|
||||||
|
# of remaining eligible for later automatic production.
|
||||||
|
var budget: Dictionary = {}
|
||||||
for id in automatic:
|
for id in automatic:
|
||||||
budget[id] = E.add(budget.get(id, 0), automatic[id])
|
budget[id] = E.add(budget.get(id, 0), automatic[id])
|
||||||
for id in budget:
|
for id in budget:
|
||||||
@@ -201,20 +203,12 @@ func auto_capacity(source: Dictionary, entity: OwniverseEntity, budget: Dictiona
|
|||||||
return (E.multiply(E.floor_value(E.divide(capacity, step)), step) if (E.finite(capacity) and E.finite(step)) else 0)
|
return (E.multiply(E.floor_value(E.divide(capacity, step)), step) if (E.finite(capacity) and E.finite(step)) else 0)
|
||||||
|
|
||||||
|
|
||||||
func produce_newborn_lifetime(target: Dictionary, id: String, count: Variant, born_from: Variant, born_to: Variant, to_year: Variant, before_batches: Array, remaining_object_years: Variant = NAN) -> void:
|
func produce_newborn_lifetime(target: Dictionary, id: String, count: Variant, born_from: Variant, born_to: Variant, to_year: Variant, newborn_past_years: Variant = 0, remaining_object_years: Variant = NAN) -> void:
|
||||||
var products: Dictionary = yearly_products(world.catalog.entities[id])
|
var products: Dictionary = yearly_products(world.catalog.entities[id])
|
||||||
if (products.is_empty() or E.le(count, 0)):
|
if (products.is_empty() or E.le(count, 0)):
|
||||||
return
|
return
|
||||||
var object_years: Variant = (remaining_object_years if E.finite(remaining_object_years) else E.multiply(count, E.maximum(0, E.subtract(to_year, E.multiply((E.add(born_from, born_to)), E.of("0.5"))))))
|
var object_years: Variant = (remaining_object_years if E.finite(remaining_object_years) else E.multiply(count, E.maximum(0, E.subtract(to_year, E.multiply((E.add(born_from, born_to)), E.of("0.5"))))))
|
||||||
var previous_amounts: Dictionary = {}
|
object_years = E.maximum(0, E.subtract(object_years, newborn_past_years))
|
||||||
for old : Dictionary in before_batches:
|
|
||||||
var start: Variant = old.get("created_from", E.neg(INF))
|
|
||||||
if (not previous_amounts.has(str(start))):
|
|
||||||
previous_amounts[str(start)] = old.amount
|
|
||||||
for batch : Dictionary in target.batches.get(id, []):
|
|
||||||
var added: Variant = E.subtract(batch.amount, previous_amounts.get(str(batch.get("created_from", INF)), 0))
|
|
||||||
object_years = E.subtract(object_years, E.multiply(E.maximum(0, added), world.batches.expired_years(to_year, batch.start_year, batch.end_year)))
|
|
||||||
object_years = E.maximum(0, object_years)
|
|
||||||
for resource in products:
|
for resource in products:
|
||||||
var coefficient: Variant = E.multiply(products[resource], WorldParameters.production(target, world.catalog.entities[id]))
|
var coefficient: Variant = E.multiply(products[resource], WorldParameters.production(target, world.catalog.entities[id]))
|
||||||
var output: Variant = E.multiply(object_years, coefficient)
|
var output: Variant = E.multiply(object_years, coefficient)
|
||||||
|
|||||||
@@ -1,255 +1,47 @@
|
|||||||
extends RefCounted
|
extends RefCounted
|
||||||
|
## Shared civilization coefficients and worship derived from float profiles.
|
||||||
const E = preload("res://world/owniverse/math/exact.gd")
|
const E = preload("res://world/owniverse/math/exact.gd")
|
||||||
|
|
||||||
const QuantityMath = preload("res://world/owniverse/quantity_math.gd")
|
|
||||||
|
|
||||||
const State = preload("res://world/owniverse/civilization_state.gd")
|
const State = preload("res://world/owniverse/civilization_state.gd")
|
||||||
const WorldParameters = preload("res://world/owniverse/world_parameters.gd")
|
|
||||||
const ETHICS = State.ETHICS
|
const ETHICS = State.ETHICS
|
||||||
const OPPOSITE = {"m": "l", "l": "m", "w": "d", "d": "w", "c": "b", "b": "c"}
|
const OPPOSITE = {"m": "l", "l": "m", "w": "d", "d": "w", "c": "b", "b": "c"}
|
||||||
|
|
||||||
static func total(pop: Dictionary) -> Variant:
|
# Cache the weighted float worship rate multiplied by the exact population.
|
||||||
return QuantityMath.sum(pop)
|
static func worship(world, target: Dictionary, rules: Dictionary) -> Variant:
|
||||||
|
var result: Variant = 0
|
||||||
static func add(to: Dictionary, from: Dictionary) -> void:
|
|
||||||
for key in from: to[key] = E.add(to.get(key, 0), from[key])
|
|
||||||
|
|
||||||
static func take(world, pop: Dictionary, count: Variant) -> Dictionary:
|
|
||||||
var taken: Dictionary = QuantityMath.allocate_whole(pop, count)
|
|
||||||
for key in taken: pop[key] = E.subtract(pop[key], taken[key])
|
|
||||||
return taken
|
|
||||||
|
|
||||||
static func rate(target: Dictionary, key: String, count: Variant, probability: Variant) -> Variant:
|
|
||||||
if (not target.has("civilization_remainders")): target.civilization_remainders = {}
|
|
||||||
return QuantityMath.accumulate_rate(target.civilization_remainders, key, count, probability)
|
|
||||||
|
|
||||||
# Fixed-size largest-remainder apportionment with saved signed rounding errors.
|
|
||||||
# Runtime depends on the number of branches, never the number of civilizations.
|
|
||||||
static func split(target: Dictionary, key: String, count: Variant, weights: Dictionary) -> Dictionary:
|
|
||||||
if E.le(count, 0): return {}
|
|
||||||
if (not target.has("civilization_remainders")): target.civilization_remainders = {}
|
|
||||||
return QuantityMath.split(target.civilization_remainders, key, count, weights)
|
|
||||||
|
|
||||||
static func drift(target: Dictionary, key: String, pop: Dictionary, rows: Dictionary, diplomacy: bool = false, colony: bool = false) -> Dictionary:
|
|
||||||
var weights: Dictionary = {}
|
|
||||||
for ethic in pop:
|
|
||||||
var influence: Variant = (E.of(rows[ethic].diplomacy_rate) if diplomacy else 1)
|
|
||||||
var contribution: Variant = E.multiply(pop[ethic], influence)
|
|
||||||
for other in ETHICS:
|
|
||||||
var weight: Variant = (9 if colony else 1)
|
|
||||||
if E.eq(other, ethic): weight = (960 if colony else 196)
|
|
||||||
elif E.eq(other, OPPOSITE[ethic]): weight = (4 if colony else 0)
|
|
||||||
weights[other] = E.add(weights.get(other, 0), E.multiply(contribution, weight))
|
|
||||||
if E.le(total(weights), 0): return pop.duplicate()
|
|
||||||
return split(target, key, total(pop), weights)
|
|
||||||
|
|
||||||
static func emit(plan: Dictionary, destination: String, pop: Dictionary) -> void:
|
|
||||||
if (not plan.outputs.has(destination)): plan.outputs[destination] = {}
|
|
||||||
add(plan.outputs[destination], pop)
|
|
||||||
|
|
||||||
static func fall(target: Dictionary, plan: Dictionary, rules: Dictionary, pop: Dictionary) -> void:
|
|
||||||
for ethic in pop:
|
|
||||||
if E.le(pop[ethic], 0): continue
|
|
||||||
var weights: Dictionary = {}
|
|
||||||
for term in str(rules[plan.id].ethics[ethic].fall).split("^", false):
|
|
||||||
var pair: PackedStringArray = term.split(":")
|
|
||||||
weights[pair[0]] = E.of(pair[1])
|
|
||||||
if weights.is_empty(): weights[rules[plan.id].previous] = 1
|
|
||||||
var shares: Dictionary = split(target, E.add(E.add(E.add("fall:", plan.id), ":"), ethic), pop[ethic], weights)
|
|
||||||
for stage in shares: emit(plan, stage, {ethic: shares[stage]})
|
|
||||||
|
|
||||||
static func progress(world, target: Dictionary, rules: Dictionary, budget: Dictionary, plan: Dictionary, pop: Dictionary) -> Dictionary:
|
|
||||||
var successor: String = rules[plan.id].next
|
|
||||||
var admitted: Variant = State.admit_transition(budget, rules, plan.id, successor, total(pop))
|
|
||||||
var accepted: Dictionary = take(world, pop, admitted)
|
|
||||||
emit(plan, successor, accepted)
|
|
||||||
return pop
|
|
||||||
|
|
||||||
static func new_plan(id: String, year: Variant) -> Dictionary:
|
|
||||||
return {"id": id, "from": year, "to": E.neg(INF), "amount": 0, "outputs": {}}
|
|
||||||
|
|
||||||
static func consume_untriggered(world, target: Dictionary, plan: Dictionary, pop: Dictionary, count: Variant, year: Variant) -> Dictionary:
|
|
||||||
var old_total: Variant = total(pop)
|
|
||||||
var removed: Dictionary = take(world, pop, count)
|
|
||||||
var actual: Variant = total(removed)
|
|
||||||
if E.gt(actual, 0):
|
|
||||||
world.batches.scale_batches(target, plan.id, E.divide((E.subtract(old_total, actual)), old_total))
|
|
||||||
plan.amount = E.add(plan.amount, actual)
|
|
||||||
plan.to = E.maximum(plan.to, year)
|
|
||||||
return removed
|
|
||||||
|
|
||||||
static func prepare(world, target: Dictionary, expired: Dictionary, year: Variant, budget: Dictionary, rules: Dictionary, physical: Dictionary = {}, budget_timer: RefCounted = null) -> Dictionary:
|
|
||||||
var profile_started: int = world.profile_start()
|
|
||||||
State.reconcile(world, target, rules, physical)
|
|
||||||
var remaining: Dictionary = target.ethics.duplicate()
|
|
||||||
var copied: Dictionary = {}
|
|
||||||
var plans: Dictionary = {}
|
|
||||||
var colonies: Array = []
|
|
||||||
var collateral: Dictionary = {}
|
|
||||||
var modifiers: Dictionary = WorldParameters.life_modifiers(target)
|
|
||||||
var order: Variant = WorldParameters.value(target, "Order")
|
|
||||||
if (not target.has("civilization_stats")): target.civilization_stats = {}
|
|
||||||
var ids: Array = expired.keys()
|
|
||||||
ids.sort()
|
|
||||||
for id in ids:
|
|
||||||
if budget_timer != null and not await budget_timer.pause(): return {}
|
|
||||||
if ((not rules.has(id)) or expired[id].is_empty()): continue
|
|
||||||
var plan: Dictionary = new_plan(id, year)
|
|
||||||
plans[id] = plan
|
|
||||||
for part : Dictionary in expired[id]:
|
|
||||||
plan.amount = E.add(plan.amount, part.amount)
|
|
||||||
plan.from = E.minimum(plan.from, part.from)
|
|
||||||
plan.to = E.maximum(plan.to, part.to)
|
|
||||||
remaining[id] = remaining[id].duplicate()
|
|
||||||
copied[id] = true
|
|
||||||
var triggered: Dictionary = take(world, remaining[id], plan.amount)
|
|
||||||
var successes: Dictionary = {}
|
|
||||||
var failures: Dictionary = {}
|
|
||||||
var warriors: Dictionary = {}
|
|
||||||
var settlers: Dictionary = {}
|
|
||||||
for ethic in triggered:
|
|
||||||
var row: Dictionary = rules[id].ethics[ethic]
|
|
||||||
var p: Variant = E.maximum(0, E.multiply(E.of(row.progress), modifiers.progress))
|
|
||||||
var d: Variant = E.maximum(0, E.multiply(E.of(row.degradation), modifiers.degradation))
|
|
||||||
var scale: Variant = E.maximum(1, E.add(p, d))
|
|
||||||
var pro: Variant = rate(target, E.add(E.add(E.add(id, ":"), ethic), ":pro"), triggered[ethic], E.divide(p, scale))
|
|
||||||
var deg: Variant = rate(target, E.add(E.add(E.add(id, ":"), ethic), ":deg"), triggered[ethic], E.divide(d, scale))
|
|
||||||
var bounded: Dictionary = QuantityMath.allocate_whole({"pro": pro, "deg": deg}, triggered[ethic])
|
|
||||||
if rules[id].fights: warriors[ethic] = rate(target, E.add(E.add(E.add(id, ":"), ethic), ":war"), triggered[ethic], E.minimum(1, E.multiply(E.of(row.war), modifiers.war)))
|
|
||||||
if rules[id].colonizes: settlers[ethic] = rate(target, E.add(E.add(E.add(id, ":"), ethic), ":col"), triggered[ethic], E.minimum(1, E.multiply(E.of(row.colonization), modifiers.colonization)))
|
|
||||||
successes[ethic] = bounded.pro
|
|
||||||
failures[ethic] = bounded.deg
|
|
||||||
triggered[ethic] = E.subtract(triggered[ethic], E.add(bounded.pro, bounded.deg))
|
|
||||||
var profile_transitions: int = world.profile_start()
|
|
||||||
add(triggered, progress(world, target, rules, budget, plan, successes))
|
|
||||||
fall(target, plan, rules, failures)
|
|
||||||
world.profile_end("civilization_transitions", profile_transitions)
|
|
||||||
if rules[id].fights:
|
|
||||||
var profile_wars: int = world.profile_start()
|
|
||||||
for ethic in warriors: warriors[ethic] = E.minimum(warriors[ethic], triggered[ethic])
|
|
||||||
var wars: Variant = E.minimum(total(warriors), E.floor_value(E.divide((E.add(total(triggered), total(remaining[id]))), 2)))
|
|
||||||
warriors = QuantityMath.allocate_whole(warriors, wars)
|
|
||||||
for ethic in warriors: triggered[ethic] = E.subtract(triggered[ethic], warriors[ethic])
|
|
||||||
var outcomes: Dictionary = split(target, E.add(id, ":wars"), wars, {"deg": 1, "pro25": 2, "pro50": 3, "pro75": 3})
|
|
||||||
var win_expected: Variant = E.add(E.add(E.multiply(outcomes.get("pro25", 0), E.of("0.25")), E.multiply(outcomes.get("pro50", 0), E.of("0.5"))), E.multiply(outcomes.get("pro75", 0), E.of("0.75")))
|
|
||||||
var loss_expected: Variant = E.add(E.add(E.add(E.multiply(outcomes.get("deg", 0), 2), outcomes.get("pro25", 0)), E.multiply(outcomes.get("pro50", 0), E.of("1.5"))), E.multiply(outcomes.get("pro75", 0), 2))
|
|
||||||
var winners: Dictionary = take(world, warriors, rate(target, E.add(id, ":wins"), win_expected, 1))
|
|
||||||
var attackers_lost: Dictionary = take(world, warriors, rate(target, E.add(id, ":attackers_lost"), E.divide(outcomes.get("deg", 0), order), 1))
|
|
||||||
add(triggered, progress(world, target, rules, budget, plan, winners))
|
|
||||||
fall(target, plan, rules, attackers_lost)
|
|
||||||
var losses: Variant = E.minimum(rate(target, E.add(id, ":loss"), E.divide(loss_expected, order), 1), E.add(total(triggered), total(remaining[id])))
|
|
||||||
var sides: Dictionary = QuantityMath.allocate_whole({"due": total(triggered), "later": total(remaining[id])}, losses)
|
|
||||||
var victims: Dictionary = take(world, triggered, sides.due)
|
|
||||||
add(victims, consume_untriggered(world, target, plan, remaining[id], sides.later, year))
|
|
||||||
fall(target, plan, rules, victims)
|
|
||||||
add(triggered, warriors)
|
|
||||||
var damage: Variant = rate(target, E.add(id, ":collateral"), E.divide((E.add(E.multiply(outcomes.get("pro50", 0), 10), E.multiply(outcomes.get("pro75", 0), 30))), order), 1)
|
|
||||||
collateral[rules[id].previous] = E.add(collateral.get(rules[id].previous, 0), damage)
|
|
||||||
target.civilization_stats.wars = E.add(target.civilization_stats.get("wars", 0), wars)
|
|
||||||
world.profile_end("wars", profile_wars)
|
|
||||||
emit(plan, id, triggered)
|
|
||||||
if E.gt(total(settlers), 0): colonies.append({"stage": rules[id].colony, "source": id, "population": settlers})
|
|
||||||
# Collateral is applied after all stages planned their own attempts.
|
|
||||||
for id in collateral:
|
|
||||||
if (not rules.has(id)): continue
|
|
||||||
if not copied.has(id):
|
|
||||||
remaining[id] = remaining[id].duplicate()
|
|
||||||
copied[id] = true
|
|
||||||
if (not plans.has(id)): plans[id] = new_plan(id, year)
|
|
||||||
var plan: Dictionary = plans[id]
|
|
||||||
var retry: Dictionary = plan.outputs.get(id, {})
|
|
||||||
var amount: Variant = E.minimum(collateral[id], E.add(total(retry), total(remaining[id])))
|
|
||||||
var sides: Dictionary = QuantityMath.allocate_whole({"due": total(retry), "later": total(remaining[id])}, amount)
|
|
||||||
var victims: Dictionary = take(world, retry, sides.due)
|
|
||||||
add(victims, consume_untriggered(world, target, plan, remaining[id], sides.later, year))
|
|
||||||
fall(target, plan, rules, victims)
|
|
||||||
target.civilization_stats.collateral = E.add(target.civilization_stats.get("collateral", 0), total(victims))
|
|
||||||
var incoming: Dictionary = {}
|
|
||||||
var planetary: Dictionary = {}
|
|
||||||
for id in plans:
|
|
||||||
if budget_timer != null and not await budget_timer.pause(): return {}
|
|
||||||
var plan: Dictionary = plans[id]
|
|
||||||
var products: Dictionary = {}
|
|
||||||
for destination in plan.outputs:
|
|
||||||
var pop: Dictionary = plan.outputs[destination]
|
|
||||||
if rules.has(destination):
|
|
||||||
if E.ne(destination, "Ct"):
|
|
||||||
var profile_drift: int = world.profile_start()
|
|
||||||
pop = drift(target, E.add(E.add(E.add(id, ":"), destination), ":drift"), pop, rules[id].ethics, (E.eq(destination, id) and rules[id].diplomacy))
|
|
||||||
world.profile_end("ethics_drift", profile_drift)
|
|
||||||
if (not incoming.has(destination)): incoming[destination] = {}
|
|
||||||
add(incoming[destination], pop)
|
|
||||||
products[destination] = total(pop)
|
|
||||||
if (State.is_space_civilization(id, rules) and E.eq(world.catalog.entities[destination].group_as, "Planet")):
|
|
||||||
planetary[destination] = E.add(planetary.get(destination, 0), total(pop))
|
|
||||||
expired[id] = [{"amount": plan.amount, "from": plan.from, "to": E.maximum(plan.from, plan.to), "products": products}]
|
|
||||||
world.profile_end("civilization_prepare", profile_started)
|
|
||||||
return {"remaining": remaining, "incoming": incoming, "planetary": planetary, "colonies": colonies}
|
|
||||||
|
|
||||||
static func finish(world, target: Dictionary, transaction: Dictionary, year: Variant, rules: Dictionary, budget_timer: RefCounted = null) -> void:
|
|
||||||
var profile_started: int = world.profile_start()
|
|
||||||
target.ethics = transaction.remaining
|
|
||||||
for id in transaction.incoming:
|
|
||||||
if (not target.ethics.has(id)): target.ethics[id] = {}
|
|
||||||
add(target.ethics[id], transaction.incoming[id])
|
|
||||||
# Space civilizations that fall back to planetary stages need a stellar host.
|
|
||||||
var physical: Dictionary = world.ledger.physical_amounts(target)
|
var physical: Dictionary = world.ledger.physical_amounts(target)
|
||||||
var hosts: Dictionary = {}
|
|
||||||
for id in physical:
|
|
||||||
if (E.eq(world.catalog.entities[id].event_group, "DwStar") and E.gt(physical[id], 0)): hosts[id] = physical[id]
|
|
||||||
for id in transaction.planetary:
|
|
||||||
var shares: Dictionary = split(target, E.add("return:", id), E.minimum(transaction.planetary[id], target.amount.get(id, 0)), hosts)
|
|
||||||
for owner in shares:
|
|
||||||
if (not target.binds.has(owner)): target.binds[owner] = {}
|
|
||||||
target.binds[owner][id] = E.add(target.binds[owner].get(id, 0), shares[owner])
|
|
||||||
target.amount[id] = E.subtract(target.amount[id], shares[owner])
|
|
||||||
if budget_timer != null:
|
|
||||||
await colonize(world, target, transaction.colonies, year, rules, physical, budget_timer)
|
|
||||||
if budget_timer.cancelled: return
|
|
||||||
else:
|
|
||||||
colonize(world, target, transaction.colonies, year, rules, physical)
|
|
||||||
State.reconcile(world, target, rules, physical if transaction.colonies.is_empty() else {})
|
|
||||||
var worship: Variant = 0
|
|
||||||
for id in rules:
|
for id in rules:
|
||||||
if (not rules[id].worships): continue
|
if not rules[id].worships: continue
|
||||||
for ethic in target.ethics[id]: worship = E.add(worship, E.multiply(target.ethics[id][ethic], E.of(rules[id].ethics[ethic].worship)))
|
var pop: Dictionary = State.normalize_profile(target.ethics.get(id, {}))
|
||||||
target.civilization_stats.worship = worship
|
var coefficients: Dictionary = {}
|
||||||
world.profile_end("civilization_finish", profile_started)
|
for ethic in pop: coefficients[ethic] = rules[id].ethics[ethic].worship
|
||||||
|
var cached: Dictionary = world.ledger.worship_products.get(id, {})
|
||||||
|
var count: Variant = physical.get(id, 0)
|
||||||
|
if cached.is_empty() or not E.eq(cached.population, pop) or not E.eq(cached.coefficients, coefficients) or not E.eq(cached.count, count):
|
||||||
|
var worship_rate: float = 0.0
|
||||||
|
for ethic in pop: worship_rate += (0.0 + pop[ethic]) * E.approx(E.of(coefficients[ethic]))
|
||||||
|
cached = {"population": pop.duplicate(), "coefficients": coefficients, "count": count, "product": E.multiply(count, worship_rate)}
|
||||||
|
world.ledger.worship_products[id] = cached
|
||||||
|
result = E.add(result, cached.product)
|
||||||
|
return result
|
||||||
|
|
||||||
static func colonize(world, target: Dictionary, colonies: Array, year: Variant, rules: Dictionary, physical: Dictionary = {}, budget_timer: RefCounted = null) -> void:
|
static func coefficients(world, rules: Dictionary, id: String, modifiers: Dictionary) -> Dictionary:
|
||||||
if colonies.is_empty(): return
|
if not E.eq(world.ledger.civilization_modifiers, modifiers):
|
||||||
var profile_colonies: int = world.profile_start()
|
world.ledger.civilization_modifiers = modifiers.duplicate()
|
||||||
if physical.is_empty(): physical = world.ledger.physical_amounts(target)
|
world.ledger.civilization_coefficients.clear()
|
||||||
var stock: Dictionary = {}
|
var cached: Dictionary = world.ledger.civilization_coefficients.get(id, {})
|
||||||
for id in ["GG", "AB", "RP", "HP"]: stock[id] = physical.get(id, 0)
|
var signature: String = ""
|
||||||
var requests: Dictionary = {}
|
for ethic in ETHICS:
|
||||||
for i in colonies.size(): requests[str(i)] = total(colonies[i].population)
|
var row: Dictionary = rules[id].ethics[ethic]
|
||||||
var granted: Dictionary = QuantityMath.allocate_whole(requests, total(stock))
|
signature += ethic + ":" + str(row.progress) + "," + str(row.degradation) + "," + str(row.war) + "," + str(row.colonization) + ";"
|
||||||
for i in colonies.size():
|
if not cached.is_empty() and cached.signature == signature: return cached.rates
|
||||||
if budget_timer != null and not await budget_timer.pause(): return
|
var rates: Dictionary = {}
|
||||||
var colony: Dictionary = colonies[i]
|
for ethic in rules[id].ethics:
|
||||||
var population: Dictionary = QuantityMath.allocate_whole(colony.population, granted[str(i)])
|
var row: Dictionary = rules[id].ethics[ethic]
|
||||||
population = drift(target, E.add(colony.source, ":colonies"), population, rules[colony.source].ethics, false, true)
|
var p: float = maxf(0.0, E.approx(E.of(row.progress)) * E.approx(modifiers.progress))
|
||||||
var count: Variant = total(population)
|
var d: float = maxf(0.0, E.approx(E.of(row.degradation)) * E.approx(modifiers.degradation))
|
||||||
var targets: Dictionary = QuantityMath.allocate_whole(stock, count)
|
var scale: float = maxf(1.0, p + d)
|
||||||
for id in targets:
|
rates[ethic] = {"pro": p / scale, "deg": d / scale,
|
||||||
var amount: Variant = targets[id]
|
"war": clampf(E.approx(E.of(row.war)) * E.approx(modifiers.war), 0.0, 1.0),
|
||||||
if E.le(amount, 0): continue
|
"col": clampf(E.approx(E.of(row.colonization)) * E.approx(modifiers.colonization), 0.0, 1.0)}
|
||||||
var slots: Dictionary = {"": target.amount.get(id, 0)}
|
world.ledger.civilization_coefficients[id] = {"signature": signature, "rates": rates}
|
||||||
for owner in target.binds: slots[owner] = target.binds[owner].get(id, 0)
|
return rates
|
||||||
var taken: Dictionary = QuantityMath.allocate_whole(slots, amount)
|
|
||||||
world.batches.scale_batches(target, id, E.subtract(1, E.divide(amount, stock[id])))
|
|
||||||
stock[id] = E.subtract(stock[id], amount)
|
|
||||||
for owner in taken:
|
|
||||||
if E.le(taken[owner], 0): continue
|
|
||||||
if E.eq(owner, ""): target.amount[id] = E.subtract(target.amount[id], taken[owner])
|
|
||||||
else: target.binds[owner][id] = E.subtract(target.binds[owner][id], taken[owner])
|
|
||||||
var created: Variant = world.ledger.credit(target, colony.stage, taken[owner])
|
|
||||||
if E.ne(owner, ""):
|
|
||||||
target.amount[colony.stage] = E.subtract(target.amount[colony.stage], created)
|
|
||||||
target.binds[owner][colony.stage] = E.add(target.binds[owner].get(colony.stage, 0), created)
|
|
||||||
world.batches.append_batch(target, colony.stage, amount, year, year)
|
|
||||||
if (not target.ethics.has(colony.stage)): target.ethics[colony.stage] = {}
|
|
||||||
add(target.ethics[colony.stage], population)
|
|
||||||
target.civilization_stats.colonies = E.add(target.civilization_stats.get("colonies", 0), count)
|
|
||||||
world.profile_end("colonization", profile_colonies)
|
|
||||||
|
|||||||
@@ -0,0 +1,480 @@
|
|||||||
|
extends "res://world/owniverse/simulation_module.gd"
|
||||||
|
## Continuous expected flows. Only ledger quantities and rounding carries are exact.
|
||||||
|
const E = preload("res://world/owniverse/math/exact.gd")
|
||||||
|
const State = preload("res://world/owniverse/civilization_state.gd")
|
||||||
|
const Q = preload("res://world/owniverse/quantity_math.gd")
|
||||||
|
const Civ = preload("res://world/owniverse/civilization_evolution.gd")
|
||||||
|
const Parameters = preload("res://world/owniverse/world_parameters.gd")
|
||||||
|
const ETHICS = State.ETHICS
|
||||||
|
var _generator_key: String = ""
|
||||||
|
var _generator: Dictionary = {}
|
||||||
|
var _solutions: Dictionary = {}
|
||||||
|
|
||||||
|
func _edges(target: Dictionary, rules: Dictionary) -> Dictionary:
|
||||||
|
var modifiers: Dictionary = Parameters.life_modifiers(target)
|
||||||
|
var order: float = maxf(1e-12, E.approx(Parameters.value(target, "Order")))
|
||||||
|
var stages: Array = rules.keys()
|
||||||
|
stages.sort()
|
||||||
|
var rates: Dictionary = {}
|
||||||
|
var spans: Dictionary = {}
|
||||||
|
var progression: Dictionary = {}
|
||||||
|
var budget: Dictionary = State.stellar_budget(world, target, rules)
|
||||||
|
var signature: String = str(modifiers) + ":" + str(order)
|
||||||
|
for id in stages.duplicate():
|
||||||
|
if rules[id].ethics.is_empty(): continue
|
||||||
|
rates[id] = Civ.coefficients(world, rules, id, modifiers)
|
||||||
|
progression[id] = _can_progress(id, rules[id].next, budget, rules)
|
||||||
|
spans[id] = maxf(1e-12, E.approx(State.effective_span(world, target, id, rules)))
|
||||||
|
signature += id + str(spans[id]) + str(rates[id]) + str(rules[id]) + str(progression[id])
|
||||||
|
for row: Dictionary in rules[id].ethics.values():
|
||||||
|
for destination in Q.rule_weights(str(row.fall)):
|
||||||
|
if not stages.has(destination): stages.append(destination)
|
||||||
|
if signature == _generator_key: return _generator
|
||||||
|
var build_started: int = world.profile_start()
|
||||||
|
var index: Dictionary = {}
|
||||||
|
for i in stages.size(): index[stages[i]] = i
|
||||||
|
var rows: Array = []
|
||||||
|
var rewards: Array = []
|
||||||
|
var maximum: float = 0.0
|
||||||
|
for id in stages:
|
||||||
|
for e in 6:
|
||||||
|
var edges: Dictionary = {}
|
||||||
|
var reward: Dictionary = {"war": 0.0, "col": 0.0, "colony": "", "previous": ""}
|
||||||
|
if rates.has(id):
|
||||||
|
var ethic: String = ETHICS[e]
|
||||||
|
var r: Dictionary = rates[id][ethic]
|
||||||
|
var span: float = spans[id]
|
||||||
|
var war: float = minf(0.5, E.approx(r.war)) if rules[id].fights else 0.0
|
||||||
|
var progress: float = (E.approx(r.pro) + war * 17.0 / 36.0) / span if progression[id] else 0.0
|
||||||
|
var degradation: float = (E.approx(r.deg) + war * 31.0 / 18.0 / order) / span
|
||||||
|
var next_node: int = index[rules[id].next] * 6 + e
|
||||||
|
edges[next_node] = progress
|
||||||
|
var falls: Dictionary = Q.rule_weights(str(rules[id].ethics[ethic].fall))
|
||||||
|
if falls.is_empty(): falls = {rules[id].previous: 1}
|
||||||
|
var fall_total: float = 0.0
|
||||||
|
for weight in falls.values(): fall_total += E.approx(weight)
|
||||||
|
for destination in falls:
|
||||||
|
var node: int = index[destination] * 6 + e
|
||||||
|
edges[node] = float(edges.get(node, 0.0)) + degradation * E.approx(falls[destination]) / fall_total
|
||||||
|
reward = {"war": war / span, "col": E.approx(r.col) / span if rules[id].colonizes else 0.0,
|
||||||
|
"colony": rules[id].colony, "previous": rules[id].previous}
|
||||||
|
var outgoing: float = 0.0
|
||||||
|
var self_node: int = index[id] * 6 + e
|
||||||
|
edges.erase(self_node)
|
||||||
|
for rate_value in edges.values(): outgoing += rate_value
|
||||||
|
maximum = maxf(maximum, outgoing)
|
||||||
|
rows.append({"edges": edges, "outgoing": outgoing})
|
||||||
|
rewards.append(reward)
|
||||||
|
_generator_key = signature
|
||||||
|
_solutions.clear()
|
||||||
|
var targets: Array = []
|
||||||
|
var probabilities: Array = []
|
||||||
|
for node in rows.size():
|
||||||
|
var destinations: PackedInt32Array = []
|
||||||
|
var weights: PackedFloat64Array = []
|
||||||
|
destinations.append(node)
|
||||||
|
weights.append(maxf(0.0, 1.0 - rows[node].outgoing / maximum) if maximum > 0.0 else 1.0)
|
||||||
|
for destination in rows[node].edges:
|
||||||
|
destinations.append(destination)
|
||||||
|
weights.append(rows[node].edges[destination] / maximum if maximum > 0.0 else 0.0)
|
||||||
|
targets.append(destinations)
|
||||||
|
probabilities.append(weights)
|
||||||
|
_generator = {"stages": stages, "index": index, "rows": rows, "rewards": rewards, "lambda": maximum, "order": order, "targets": targets, "probabilities": probabilities}
|
||||||
|
world.profile_end("civilization_operator_build", build_started)
|
||||||
|
return _generator
|
||||||
|
|
||||||
|
func _can_progress(source: String, destination: String, budget: Dictionary, rules: Dictionary) -> bool:
|
||||||
|
var home: String = rules[destination].home
|
||||||
|
if home != "":
|
||||||
|
var old_cost: Variant = E.maximum(1, rules[source].stars) if rules[source].home == home else 0
|
||||||
|
var net: Variant = E.subtract(E.maximum(1, rules[destination].stars), old_cost)
|
||||||
|
if E.gt(net, 0) and E.lt(budget.free.get(home, 0), net): return false
|
||||||
|
var new_req: Dictionary = budget.habitats.requirements.get(destination, {})
|
||||||
|
var old_req: Dictionary = budget.habitats.requirements.get(source, {})
|
||||||
|
if not new_req.is_empty():
|
||||||
|
var net: Variant = E.subtract(new_req.units, old_req.get("units", 0) if old_req.get("id", "") == new_req.id else 0)
|
||||||
|
var free: Variant = E.subtract(budget.habitats.capacity.get(new_req.id, 0), budget.habitats.requested.get(new_req.id, 0))
|
||||||
|
if E.gt(net, 0) and E.lt(free, net): return false
|
||||||
|
return true
|
||||||
|
|
||||||
|
## Uniformization computes exp(Q*t) through a Poisson series of sparse steps.
|
||||||
|
## Absorbing biological stages and Ct retain their mass. No one-transition cap.
|
||||||
|
func _solve(generator: Dictionary, source: String, profile: Dictionary, years: float) -> Dictionary:
|
||||||
|
var key: String = source + ":" + str(years)
|
||||||
|
var basis: Dictionary = _solutions.get(key, {})
|
||||||
|
if basis.is_empty():
|
||||||
|
var started: int = world.profile_start()
|
||||||
|
basis = _solve_basis(generator, source, years)
|
||||||
|
world.profile_end("civilization_operator_solve", started)
|
||||||
|
if _solutions.size() >= 512: _solutions.clear()
|
||||||
|
_solutions[key] = basis
|
||||||
|
var mass: PackedFloat64Array = basis.mass.duplicate()
|
||||||
|
var occupation: PackedFloat64Array = basis.occupation.duplicate()
|
||||||
|
var shares: PackedFloat64Array = []
|
||||||
|
for ethic in ETHICS: shares.append(profile[ethic])
|
||||||
|
for node in mass.size():
|
||||||
|
mass[node] *= shares[node % 6]
|
||||||
|
occupation[node] *= shares[node % 6]
|
||||||
|
return {"mass": mass, "occupation": occupation, "occupation_scale": 1.0}
|
||||||
|
|
||||||
|
func _solve_basis(generator: Dictionary, source: String, years: float) -> Dictionary:
|
||||||
|
var size: int = generator.rows.size()
|
||||||
|
var values: PackedFloat64Array = []
|
||||||
|
values.resize(size)
|
||||||
|
var active: PackedInt32Array = []
|
||||||
|
var offset: int = generator.index[source] * 6
|
||||||
|
for e in 6:
|
||||||
|
values[offset + e] = 1.0
|
||||||
|
active.append(offset + e)
|
||||||
|
var mass: PackedFloat64Array = []
|
||||||
|
var occupation: PackedFloat64Array = []
|
||||||
|
mass.resize(size)
|
||||||
|
occupation.resize(size)
|
||||||
|
var frequency: float = generator.lambda
|
||||||
|
if frequency <= 0.0:
|
||||||
|
mass = values.duplicate()
|
||||||
|
for node in active: occupation[node] = years
|
||||||
|
return {"mass": mass, "occupation": occupation}
|
||||||
|
var mean: float = frequency * years
|
||||||
|
var weight: float = exp(-mean)
|
||||||
|
var cumulative: float = 0.0
|
||||||
|
var limit: int = maxi(32, ceili(mean + 12.0 * sqrt(mean) + 32.0))
|
||||||
|
for step in limit:
|
||||||
|
cumulative = minf(1.0, cumulative + weight)
|
||||||
|
var time_weight: float = maxf(0.0, 1.0 - cumulative) / frequency
|
||||||
|
for node in active:
|
||||||
|
mass[node] += weight * values[node]
|
||||||
|
occupation[node] += time_weight * values[node]
|
||||||
|
if step > mean and weight < 1e-18: break
|
||||||
|
var next: PackedFloat64Array = []
|
||||||
|
next.resize(size)
|
||||||
|
var next_active: PackedInt32Array = []
|
||||||
|
for node in active:
|
||||||
|
var destinations: PackedInt32Array = generator.targets[node]
|
||||||
|
var probabilities: PackedFloat64Array = generator.probabilities[node]
|
||||||
|
for i in destinations.size():
|
||||||
|
var contribution: float = values[node] * probabilities[i]
|
||||||
|
if contribution <= 0.0: continue
|
||||||
|
var destination: int = destinations[i]
|
||||||
|
if next[destination] == 0.0: next_active.append(destination)
|
||||||
|
next[destination] += contribution
|
||||||
|
values = next
|
||||||
|
active = next_active
|
||||||
|
weight *= mean / float(step + 1)
|
||||||
|
var integrated: PackedFloat64Array = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
|
||||||
|
for node in size: integrated[node % 6] += occupation[node]
|
||||||
|
for e in 6:
|
||||||
|
if integrated[e] <= 0.0:
|
||||||
|
occupation[offset + e] = years
|
||||||
|
else:
|
||||||
|
var factor: float = years / integrated[e]
|
||||||
|
for node in range(e, size, 6): occupation[node] *= factor
|
||||||
|
return {"mass": mass, "occupation": occupation}
|
||||||
|
|
||||||
|
func _drift(target: Dictionary, rules: Dictionary, generator: Dictionary, years: float) -> void:
|
||||||
|
for id in rules:
|
||||||
|
if rules[id].ethics.is_empty() or not target.ethics.has(id): continue
|
||||||
|
var profile: Dictionary = State.normalize_profile(target.ethics[id])
|
||||||
|
var span: float = maxf(1e-12, E.approx(State.effective_span(world, target, id, rules)))
|
||||||
|
var duration: float = years / span
|
||||||
|
var pair_decay: float = exp(-0.03 * duration)
|
||||||
|
var opposite_decay: float = exp(-0.02 * duration)
|
||||||
|
var result: Dictionary = {}
|
||||||
|
for ethic in ETHICS:
|
||||||
|
var opposite: float = profile[Civ.OPPOSITE[ethic]]
|
||||||
|
result[ethic] = 1.0 / 6.0 + pair_decay * ((profile[ethic] + opposite) * 0.5 - 1.0 / 6.0) + opposite_decay * (profile[ethic] - opposite) * 0.5
|
||||||
|
if rules[id].diplomacy:
|
||||||
|
var weighted: Dictionary = {}
|
||||||
|
for ethic in ETHICS: weighted[ethic] = result[ethic] * maxf(0.0, E.approx(E.of(rules[id].ethics[ethic].diplomacy_rate)))
|
||||||
|
weighted = State.normalize_profile(weighted)
|
||||||
|
var fraction: float = 1.0 - exp(-duration)
|
||||||
|
for ethic in ETHICS: result[ethic] = lerpf(result[ethic], weighted[ethic], fraction)
|
||||||
|
target.ethics[id] = State.normalize_profile(result)
|
||||||
|
|
||||||
|
func _profile(vector: Array) -> Dictionary:
|
||||||
|
var result: Dictionary = {}
|
||||||
|
for e in 6: result[ETHICS[e]] = vector[e]
|
||||||
|
return State.normalize_profile(result)
|
||||||
|
|
||||||
|
func _merge(plan: Dictionary, destination: String, count: Variant, profile: Dictionary) -> void:
|
||||||
|
if E.le(count, 0): return
|
||||||
|
var previous: Variant = plan.counts.get(destination, 0)
|
||||||
|
plan.profiles[destination] = State.merge_profiles(plan.profiles.get(destination, {}), previous, profile, count)
|
||||||
|
plan.counts[destination] = E.add(previous, count)
|
||||||
|
|
||||||
|
func _plans(target: Dictionary, physical: Dictionary, rules: Dictionary, generator: Dictionary, years: float) -> Dictionary:
|
||||||
|
var plans: Dictionary = {}
|
||||||
|
var colonies: Dictionary = {}
|
||||||
|
var damages: Dictionary = {}
|
||||||
|
var wars: Variant = 0
|
||||||
|
for source in rules:
|
||||||
|
var count: Variant = physical.get(source, 0)
|
||||||
|
if E.le(count, 0) or rules[source].ethics.is_empty(): continue
|
||||||
|
var solved: Dictionary = _solve(generator, source, State.normalize_profile(target.ethics.get(source, {})), years)
|
||||||
|
var vectors: Dictionary = {}
|
||||||
|
for node in solved.mass.size():
|
||||||
|
if solved.mass[node] <= 0.0: continue
|
||||||
|
var destination: String = generator.stages[int(node) / 6]
|
||||||
|
if not vectors.has(destination): vectors[destination] = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
|
||||||
|
vectors[destination][int(node) % 6] += solved.mass[node]
|
||||||
|
var ids: Array = []
|
||||||
|
var shares: Array = []
|
||||||
|
var profiles: Dictionary = {}
|
||||||
|
var retained: float = 0.0
|
||||||
|
for destination in vectors:
|
||||||
|
var share: float = 0.0
|
||||||
|
for value in vectors[destination]: share += value
|
||||||
|
profiles[destination] = _profile(vectors[destination])
|
||||||
|
if destination == source or share < 0.5e-15:
|
||||||
|
retained += share
|
||||||
|
else:
|
||||||
|
ids.append(destination)
|
||||||
|
shares.append(share)
|
||||||
|
ids.append(source)
|
||||||
|
shares.append(retained)
|
||||||
|
if not profiles.has(source): profiles[source] = State.normalize_profile(target.ethics.get(source, {}))
|
||||||
|
var counts: Dictionary = Q.split_profile(target.civilization_remainders, "flow:" + source, count, ids, shares)
|
||||||
|
plans[source] = {"counts": counts, "profiles": profiles}
|
||||||
|
var colony_vectors: Dictionary = {}
|
||||||
|
var damage: Dictionary = {}
|
||||||
|
var war_reward: float = 0.0
|
||||||
|
for node in solved.occupation.size():
|
||||||
|
if solved.occupation[node] <= 0.0: continue
|
||||||
|
var reward: Dictionary = generator.rewards[node]
|
||||||
|
var duration: float = solved.occupation[node] * solved.occupation_scale
|
||||||
|
war_reward += duration * reward.war
|
||||||
|
if reward.war > 0.0:
|
||||||
|
damage[reward.previous] = float(damage.get(reward.previous, 0.0)) + duration * reward.war * 40.0 / 3.0 / generator.order
|
||||||
|
if reward.col <= 0.0: continue
|
||||||
|
if not colony_vectors.has(reward.colony): colony_vectors[reward.colony] = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
|
||||||
|
colony_vectors[reward.colony][int(node) % 6] += duration * reward.col
|
||||||
|
wars = E.add(wars, Q.accumulate_rate(target.civilization_remainders, "flow:wars:" + source, count, war_reward))
|
||||||
|
for destination in damage:
|
||||||
|
damages[destination] = E.add(damages.get(destination, 0), Q.accumulate_rate(target.civilization_remainders, "flow:damage:" + source + ":" + destination, count, damage[destination]))
|
||||||
|
for destination in colony_vectors:
|
||||||
|
var reward: float = 0.0
|
||||||
|
for value in colony_vectors[destination]: reward += value
|
||||||
|
var quantity: Variant = Q.accumulate_rate(target.civilization_remainders, "flow:colony:" + source + ":" + destination, count, reward)
|
||||||
|
if not colonies.has(destination): colonies[destination] = {"counts": {}, "profiles": {}}
|
||||||
|
_merge(colonies[destination], destination, quantity, _profile(colony_vectors[destination]))
|
||||||
|
return {"plans": plans, "colonies": colonies, "damages": damages, "wars": wars}
|
||||||
|
|
||||||
|
## Positive resource costs share the same frozen free budget. Rejected movement
|
||||||
|
## stays at its source. Releases become available after this transaction commits.
|
||||||
|
func _limit(plans: Dictionary, budget: Dictionary, rules: Dictionary) -> void:
|
||||||
|
var demands: Dictionary = {}
|
||||||
|
var costs: Dictionary = {}
|
||||||
|
for source in plans:
|
||||||
|
costs[source] = {}
|
||||||
|
for destination in plans[source].counts:
|
||||||
|
if destination == source or not rules.has(destination): continue
|
||||||
|
var amount: Variant = plans[source].counts[destination]
|
||||||
|
if E.le(amount, 0): continue
|
||||||
|
var resource_costs: Dictionary = {}
|
||||||
|
var home: String = rules[destination].home
|
||||||
|
if home != "":
|
||||||
|
var old_cost: Variant = rules[source].stars if rules[source].home == home else 0
|
||||||
|
var net: Variant = E.maximum(0, E.subtract(E.maximum(1, rules[destination].stars), old_cost))
|
||||||
|
if E.gt(net, 0): resource_costs["star:" + home] = net
|
||||||
|
var housing: Dictionary = budget.habitats
|
||||||
|
var new_req: Dictionary = housing.requirements.get(destination, {})
|
||||||
|
var old_req: Dictionary = housing.requirements.get(source, {})
|
||||||
|
if not new_req.is_empty():
|
||||||
|
var net: Variant = E.maximum(0, E.subtract(new_req.units, old_req.get("units", 0) if old_req.get("id", "") == new_req.id else 0))
|
||||||
|
if E.gt(net, 0): resource_costs["house:" + new_req.id] = net
|
||||||
|
costs[source][destination] = resource_costs
|
||||||
|
for resource in resource_costs:
|
||||||
|
demands[resource] = E.add(demands.get(resource, 0), E.multiply(amount, resource_costs[resource]))
|
||||||
|
var factors: Dictionary = {}
|
||||||
|
for resource in demands:
|
||||||
|
var available: Variant
|
||||||
|
if resource.begins_with("star:"):
|
||||||
|
available = budget.free.get(resource.trim_prefix("star:"), 0)
|
||||||
|
else:
|
||||||
|
var id: String = resource.trim_prefix("house:")
|
||||||
|
available = E.maximum(0, E.subtract(budget.habitats.capacity.get(id, 0), budget.habitats.requested.get(id, 0)))
|
||||||
|
factors[resource] = [available, demands[resource]]
|
||||||
|
for source in costs:
|
||||||
|
for destination in costs[source]:
|
||||||
|
var requested: Variant = plans[source].counts[destination]
|
||||||
|
var allowed: Variant = requested
|
||||||
|
for resource in costs[source][destination]:
|
||||||
|
var ratio: Array = factors[resource]
|
||||||
|
if E.lt(ratio[0], ratio[1]): allowed = E.minimum(allowed, E.floor_value(E.mul_div(requested, ratio[0], ratio[1])))
|
||||||
|
var rejected: Variant = E.subtract(requested, allowed)
|
||||||
|
if E.le(rejected, 0): continue
|
||||||
|
plans[source].counts[destination] = allowed
|
||||||
|
_merge(plans[source], source, rejected, plans[source].profiles[destination])
|
||||||
|
|
||||||
|
func _commit(target: Dictionary, physical: Dictionary, plans: Dictionary, rules: Dictionary, year: Variant) -> void:
|
||||||
|
var credits: Dictionary = {}
|
||||||
|
var contributions: Dictionary = {}
|
||||||
|
var births: Dictionary = {}
|
||||||
|
for source in plans:
|
||||||
|
var plan: Dictionary = plans[source]
|
||||||
|
var slots: Dictionary = {"": target.amount.get(source, 0)}
|
||||||
|
for owner in target.binds:
|
||||||
|
var held: Variant = target.binds[owner].get(source, 0)
|
||||||
|
if E.gt(held, 0): slots[owner] = held
|
||||||
|
for destination in plan.counts:
|
||||||
|
var amount: Variant = plan.counts[destination]
|
||||||
|
if E.le(amount, 0): continue
|
||||||
|
if not contributions.has(destination): contributions[destination] = []
|
||||||
|
contributions[destination].append({"amount": amount, "profile": plan.profiles[destination]})
|
||||||
|
if destination == source: continue
|
||||||
|
var taken: Dictionary = Q.allocate_profiled(slots, amount)
|
||||||
|
for owner in taken:
|
||||||
|
if E.le(taken[owner], 0): continue
|
||||||
|
slots[owner] = E.subtract(slots[owner], taken[owner])
|
||||||
|
var host: String = owner
|
||||||
|
if State.is_space_civilization(destination, rules) or destination == "Ct": host = ""
|
||||||
|
elif owner == "" and State.is_space_civilization(source, rules): host = "@host"
|
||||||
|
if not credits.has(destination): credits[destination] = {}
|
||||||
|
credits[destination][host] = E.add(credits[destination].get(host, 0), taken[owner])
|
||||||
|
target.amount[source] = slots[""]
|
||||||
|
for owner in slots:
|
||||||
|
if owner != "": target.binds[owner][source] = slots[owner]
|
||||||
|
var hosts: Dictionary = {}
|
||||||
|
for id in physical:
|
||||||
|
if world.catalog.entities[id].event_group == "DwStar" and E.gt(physical[id], 0): hosts[id] = physical[id]
|
||||||
|
for destination in credits:
|
||||||
|
var created: Variant = world.ledger.credit(target, destination, Q.sum(credits[destination]))
|
||||||
|
for owner in credits[destination]:
|
||||||
|
var count: Variant = credits[destination][owner]
|
||||||
|
if owner == "" or E.le(count, 0): continue
|
||||||
|
if owner == "@host":
|
||||||
|
if hosts.is_empty(): continue
|
||||||
|
var ownership: Dictionary = Q.split_profile(target.civilization_remainders, "flow:hosts:" + destination, count, hosts.keys(), _host_shares(hosts))
|
||||||
|
for host in ownership:
|
||||||
|
if E.le(ownership[host], 0): continue
|
||||||
|
if not target.binds.has(host): target.binds[host] = {}
|
||||||
|
target.binds[host][destination] = E.add(target.binds[host].get(destination, 0), ownership[host])
|
||||||
|
target.amount[destination] = E.subtract(target.amount[destination], count)
|
||||||
|
else:
|
||||||
|
target.binds[owner][destination] = E.add(target.binds[owner].get(destination, 0), count)
|
||||||
|
target.amount[destination] = E.subtract(target.amount[destination], count)
|
||||||
|
if not rules.has(destination): births[destination] = created
|
||||||
|
var final: Dictionary = world.ledger.physical_amounts(target)
|
||||||
|
for destination in contributions:
|
||||||
|
if not rules.has(destination) or E.le(final.get(destination, 0), 0): continue
|
||||||
|
var profile: Dictionary = {}
|
||||||
|
for ethic in ETHICS: profile[ethic] = 0.0
|
||||||
|
var existing: Variant = physical.get(destination, 0) if not plans.has(destination) else 0
|
||||||
|
if E.gt(existing, 0):
|
||||||
|
var original: Dictionary = State.normalize_profile(target.ethics.get(destination, {}))
|
||||||
|
var ratio: float = E.ratio_approx(existing, final[destination])
|
||||||
|
for ethic in ETHICS: profile[ethic] += original[ethic] * ratio
|
||||||
|
for entry: Dictionary in contributions[destination]:
|
||||||
|
var ratio: float = E.ratio_approx(entry.amount, final[destination])
|
||||||
|
for ethic in ETHICS: profile[ethic] += entry.profile[ethic] * ratio
|
||||||
|
target.ethics[destination] = State.normalize_profile(profile)
|
||||||
|
for destination in births: world.batches.append_batch(target, destination, births[destination], year, year)
|
||||||
|
|
||||||
|
func _host_shares(hosts: Dictionary) -> Array:
|
||||||
|
var total: Variant = Q.sum(hosts)
|
||||||
|
var result: Array = []
|
||||||
|
for value in hosts.values(): result.append(E.ratio_approx(value, total))
|
||||||
|
return result
|
||||||
|
|
||||||
|
func _colonize(target: Dictionary, colonies: Dictionary, year: Variant, rules: Dictionary) -> void:
|
||||||
|
if colonies.is_empty(): return
|
||||||
|
var physical: Dictionary = world.ledger.physical_amounts(target)
|
||||||
|
var stocks: Dictionary = {}
|
||||||
|
for id in ["GG", "AB", "RP", "HP"]: stocks[id] = physical.get(id, 0)
|
||||||
|
var requests: Dictionary = {}
|
||||||
|
for id in colonies: requests[id] = colonies[id].counts.get(id, 0)
|
||||||
|
var granted: Dictionary = Q.allocate_profiled(requests, Q.sum(stocks))
|
||||||
|
var total: Variant = Q.sum(granted)
|
||||||
|
if E.le(total, 0): return
|
||||||
|
var taken_resources: Dictionary = Q.allocate_profiled(stocks, total)
|
||||||
|
var remaining: Dictionary = granted.duplicate()
|
||||||
|
for resource in taken_resources:
|
||||||
|
var removed: Variant = taken_resources[resource]
|
||||||
|
if E.le(removed, 0): continue
|
||||||
|
var owners: Dictionary = {"": target.amount.get(resource, 0)}
|
||||||
|
for owner in target.binds:
|
||||||
|
if E.gt(target.binds[owner].get(resource, 0), 0): owners[owner] = target.binds[owner][resource]
|
||||||
|
var taken: Dictionary = Q.allocate_profiled(owners, removed)
|
||||||
|
world.batches.scale_batches(target, resource, E.subtract(1, E.divide(removed, stocks[resource])))
|
||||||
|
for owner in taken:
|
||||||
|
var amount: Variant = taken[owner]
|
||||||
|
if E.le(amount, 0): continue
|
||||||
|
if owner == "": target.amount[resource] = E.subtract(target.amount[resource], amount)
|
||||||
|
else: target.binds[owner][resource] = E.subtract(target.binds[owner][resource], amount)
|
||||||
|
var allocation: Dictionary = Q.allocate_profiled(remaining, amount)
|
||||||
|
for destination in allocation:
|
||||||
|
var count: Variant = allocation[destination]
|
||||||
|
if E.le(count, 0): continue
|
||||||
|
remaining[destination] = E.subtract(remaining[destination], count)
|
||||||
|
var created: Variant = world.ledger.credit(target, destination, count)
|
||||||
|
if owner != "" and not State.is_space_civilization(destination, rules):
|
||||||
|
target.amount[destination] = E.subtract(target.amount[destination], created)
|
||||||
|
target.binds[owner][destination] = E.add(target.binds[owner].get(destination, 0), created)
|
||||||
|
for id in granted:
|
||||||
|
if E.le(granted[id], 0): continue
|
||||||
|
var profile: Dictionary = colonies[id].profiles[id]
|
||||||
|
var drifted: Dictionary = {}
|
||||||
|
for ethic in ETHICS:
|
||||||
|
drifted[ethic] = 0.0
|
||||||
|
for source in ETHICS:
|
||||||
|
drifted[ethic] += profile[source] * (0.96 if source == ethic else (0.004 if Civ.OPPOSITE[source] == ethic else 0.009))
|
||||||
|
target.ethics[id] = State.merge_profiles(target.ethics.get(id, {}), physical.get(id, 0), drifted, granted[id])
|
||||||
|
target.civilization_stats.colonies = E.add(target.civilization_stats.get("colonies", 0), total)
|
||||||
|
|
||||||
|
func evolve(target: Dictionary, from_year: Variant, to_year: Variant, timer: RefCounted = null) -> void:
|
||||||
|
var keep_alive: RefCounted = self
|
||||||
|
var years: float = E.approx(E.subtract(to_year, from_year))
|
||||||
|
if years <= 0.0: return
|
||||||
|
var rules: Dictionary = Global.CivilizationRules
|
||||||
|
var generator: Dictionary = {}
|
||||||
|
# Bound the Poisson mean, processing the entire requested interval.
|
||||||
|
var maximum_years: float = years
|
||||||
|
var cursor: Variant = from_year
|
||||||
|
while E.lt(cursor, to_year):
|
||||||
|
if timer != null and not await timer.pause(): return
|
||||||
|
generator = _edges(target, rules)
|
||||||
|
maximum_years = 32.0 / generator.lambda if generator.lambda > 0.0 else years
|
||||||
|
var end: Variant = E.minimum(to_year, E.add(cursor, E.of(maximum_years)))
|
||||||
|
var physical: Dictionary = world.ledger.physical_amounts(target)
|
||||||
|
var started: int = world.profile_start()
|
||||||
|
var transaction: Dictionary = _plans(target, physical, rules, generator, E.approx(E.subtract(end, cursor)))
|
||||||
|
world.profile_end("civilization_flow_plan", started)
|
||||||
|
if timer != null and not await timer.pause(): return
|
||||||
|
var plans: Dictionary = transaction.plans
|
||||||
|
var damage_total: Variant = 0
|
||||||
|
for source in transaction.damages:
|
||||||
|
if not plans.has(source): continue
|
||||||
|
var retained: Variant = plans[source].counts.get(source, 0)
|
||||||
|
var amount: Variant = E.minimum(retained, transaction.damages[source])
|
||||||
|
if E.le(amount, 0): continue
|
||||||
|
var profile: Dictionary = plans[source].profiles[source]
|
||||||
|
var weights: Dictionary = {}
|
||||||
|
for ethic in ETHICS:
|
||||||
|
var falls: Dictionary = Q.rule_weights(str(rules[source].ethics[ethic].fall))
|
||||||
|
if falls.is_empty(): falls = {rules[source].previous: 1}
|
||||||
|
var sum: float = 0.0
|
||||||
|
for weight in falls.values(): sum += E.approx(weight)
|
||||||
|
for destination in falls: weights[destination] = float(weights.get(destination, 0.0)) + profile[ethic] * E.approx(falls[destination]) / sum
|
||||||
|
var split: Dictionary = Q.split_profile(target.civilization_remainders, "flow:collateral:" + source, amount, weights.keys(), weights.values())
|
||||||
|
plans[source].counts[source] = E.subtract(retained, amount)
|
||||||
|
for destination in split: _merge(plans[source], destination, split[destination], profile)
|
||||||
|
damage_total = E.add(damage_total, amount)
|
||||||
|
started = world.profile_start()
|
||||||
|
_limit(plans, State.stellar_budget(world, target, rules, physical), rules)
|
||||||
|
world.profile_end("civilization_flow_capacity", started)
|
||||||
|
started = world.profile_start()
|
||||||
|
_commit(target, physical, plans, rules, end)
|
||||||
|
world.profile_end("civilization_flow_ledger", started)
|
||||||
|
if timer != null and not await timer.pause(): return
|
||||||
|
started = world.profile_start()
|
||||||
|
_colonize(target, transaction.colonies, end, rules)
|
||||||
|
world.profile_end("civilization_flow_colonies", started)
|
||||||
|
started = world.profile_start()
|
||||||
|
_drift(target, rules, generator, E.approx(E.subtract(end, cursor)))
|
||||||
|
target.civilization_stats.wars = E.add(target.civilization_stats.get("wars", 0), transaction.wars)
|
||||||
|
target.civilization_stats.collateral = E.add(target.civilization_stats.get("collateral", 0), damage_total)
|
||||||
|
State.enforce_capacity(world, target, rules, end)
|
||||||
|
State.reconcile(world, target, rules)
|
||||||
|
target.civilization_stats.worship = Civ.worship(world, target, rules)
|
||||||
|
world.profile_end("civilization_flow_finish", started)
|
||||||
|
cursor = end
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://clon18ixi6yqx
|
||||||
@@ -5,32 +5,61 @@ const QuantityMath = preload("res://world/owniverse/quantity_math.gd")
|
|||||||
|
|
||||||
const ETHICS = ["m", "l", "w", "d", "c", "b"]
|
const ETHICS = ["m", "l", "w", "d", "c", "b"]
|
||||||
|
|
||||||
|
static func empty_profile() -> Dictionary:
|
||||||
|
var result: Dictionary = {}
|
||||||
|
for ethic in ETHICS: result[ethic] = 1.0 / ETHICS.size()
|
||||||
|
return result
|
||||||
|
|
||||||
|
static func normalize_profile(profile: Dictionary) -> Dictionary:
|
||||||
|
var result: Dictionary = {}
|
||||||
|
var total: float = 0.0
|
||||||
|
for ethic in ETHICS:
|
||||||
|
var value: float = maxf(0.0, E.approx(profile.get(ethic, 0.0)))
|
||||||
|
result[ethic] = value
|
||||||
|
total += value
|
||||||
|
if not is_finite(total) or total <= 0.0: return empty_profile()
|
||||||
|
if profile.size() == ETHICS.size() and absf(total - 1.0) <= 0.000000000001:
|
||||||
|
return result
|
||||||
|
var assigned: float = 0.0
|
||||||
|
for i in ETHICS.size() - 1:
|
||||||
|
var ethic: String = ETHICS[i]
|
||||||
|
result[ethic] = (0.0 + result[ethic]) / total
|
||||||
|
assigned += result[ethic]
|
||||||
|
result[ETHICS.back()] = maxf(0.0, 1.0 - assigned)
|
||||||
|
return result
|
||||||
|
|
||||||
|
static func merge_profiles(base: Dictionary, base_count: Variant, incoming_profile: Dictionary, incoming_count: Variant) -> Dictionary:
|
||||||
|
var total: Variant = E.add(base_count, incoming_count)
|
||||||
|
if E.le(total, 0): return empty_profile()
|
||||||
|
var base_ratio: float = E.ratio_approx(base_count, total) if E.gt(base_count, 0) else 0.0
|
||||||
|
var incoming_ratio: float = E.ratio_approx(incoming_count, total) if E.gt(incoming_count, 0) else 0.0
|
||||||
|
var normalized_base: Dictionary = normalize_profile(base)
|
||||||
|
var result: Dictionary = {}
|
||||||
|
for ethic in ETHICS:
|
||||||
|
var incoming_share: float = E.approx(incoming_profile.get(ethic, 0.0)) if E.gt(incoming_count, 0) else 0.0
|
||||||
|
result[ethic] = (0.0 + normalized_base[ethic]) * base_ratio + incoming_share * incoming_ratio
|
||||||
|
return normalize_profile(result)
|
||||||
|
|
||||||
static func is_space_civilization(id: String, rules: Dictionary) -> bool:
|
static func is_space_civilization(id: String, rules: Dictionary) -> bool:
|
||||||
return (rules.has(id) and E.ne(str(rules[id].home), ""))
|
return (rules.has(id) and E.ne(str(rules[id].home), ""))
|
||||||
|
|
||||||
# Preserve any existing ethics. New populations start equally distributed;
|
# Keep one six-value float profile per stage. Absolute population remains in
|
||||||
# reductions (including blasts) are proportional and never leave negative counts.
|
# the exact physical object ledger; flow calculations use shares directly.
|
||||||
static func reconcile(world, target: Dictionary, rules: Dictionary, physical: Dictionary = {}) -> void:
|
static func reconcile(world, target: Dictionary, rules: Dictionary, physical: Dictionary = {}, only_ids: Array = []) -> void:
|
||||||
if (not target.has("ethics")):
|
if (not target.has("ethics")):
|
||||||
target.ethics = {}
|
target.ethics = {}
|
||||||
if physical.is_empty():
|
if physical.is_empty():
|
||||||
physical = world.ledger.physical_amounts(target)
|
physical = world.ledger.physical_amounts(target)
|
||||||
for id in rules:
|
var ids: Variant = rules if only_ids.is_empty() else only_ids
|
||||||
|
for id in ids:
|
||||||
|
if not rules.has(id): continue
|
||||||
var count: Variant = physical.get(id, 0)
|
var count: Variant = physical.get(id, 0)
|
||||||
var current: Dictionary = target.ethics.get(id, {})
|
var current: Dictionary = normalize_profile(target.ethics.get(id, {}))
|
||||||
var total: Variant = 0
|
var cached: Dictionary = world.ledger.reconciled_ethics.get(id, {})
|
||||||
for ethic in ETHICS:
|
if not cached.is_empty() and E.eq(cached.count, count) and E.eq(cached.population, current):
|
||||||
current[ethic] = E.maximum(0, current.get(ethic, 0))
|
continue
|
||||||
total = E.add(total, current[ethic])
|
|
||||||
if E.gt(total, count):
|
|
||||||
current = QuantityMath.allocate_whole(current, count)
|
|
||||||
elif E.lt(total, count):
|
|
||||||
var missing: Variant = E.subtract(count, total)
|
|
||||||
var base: Variant = E.floor_value(E.divide(missing, ETHICS.size()))
|
|
||||||
var rest: int = E.integer(E.subtract(missing, E.multiply(base, ETHICS.size())))
|
|
||||||
for i in ETHICS.size():
|
|
||||||
current[ETHICS[i]] = E.add(current[ETHICS[i]], E.add(base, ((1 if E.lt(i, rest) else 0))))
|
|
||||||
target.ethics[id] = current
|
target.ethics[id] = current
|
||||||
|
world.ledger.reconciled_ethics[id] = {"count": count, "population": current.duplicate()}
|
||||||
|
|
||||||
static func detach_space_civilizations(target: Dictionary, rules: Dictionary) -> void:
|
static func detach_space_civilizations(target: Dictionary, rules: Dictionary) -> void:
|
||||||
for held : Dictionary in target.binds.values():
|
for held : Dictionary in target.binds.values():
|
||||||
@@ -109,6 +138,7 @@ static func enforce_capacity(world, target: Dictionary, rules: Dictionary, year:
|
|||||||
detach_space_civilizations(target, rules)
|
detach_space_civilizations(target, rules)
|
||||||
var physical: Dictionary = world.ledger.physical_amounts(target)
|
var physical: Dictionary = world.ledger.physical_amounts(target)
|
||||||
reconcile(world, target, rules, physical)
|
reconcile(world, target, rules, physical)
|
||||||
|
var ethical_totals: Dictionary = physical.duplicate()
|
||||||
var budget: Dictionary = stellar_budget(world, target, rules, physical)
|
var budget: Dictionary = stellar_budget(world, target, rules, physical)
|
||||||
var remaining: Dictionary = budget.capacity.duplicate()
|
var remaining: Dictionary = budget.capacity.duplicate()
|
||||||
var remaining_homes: Dictionary = budget.habitats.capacity.duplicate()
|
var remaining_homes: Dictionary = budget.habitats.capacity.duplicate()
|
||||||
@@ -135,12 +165,13 @@ static func enforce_capacity(world, target: Dictionary, rules: Dictionary, year:
|
|||||||
target.amount[id] = supported
|
target.amount[id] = supported
|
||||||
world.ledger.credit(target, previous, excess)
|
world.ledger.credit(target, previous, excess)
|
||||||
world.batches.append_batch(target, previous, excess, year, year)
|
world.batches.append_batch(target, previous, excess, year, year)
|
||||||
var removed: Dictionary = QuantityMath.allocate_whole(target.ethics[id], excess)
|
var previous_count: Variant = ethical_totals.get(previous, physical.get(previous, target.amount.get(previous, 0)))
|
||||||
if (not target.ethics.has(previous)):
|
var previous_profile: Dictionary = target.ethics.get(previous, empty_profile())
|
||||||
target.ethics[previous] = {}
|
var source_profile: Dictionary = target.ethics.get(id, empty_profile())
|
||||||
for ethic in ETHICS:
|
target.ethics[previous] = merge_profiles(previous_profile, previous_count, source_profile, excess)
|
||||||
target.ethics[id][ethic] = E.subtract(target.ethics[id][ethic], removed[ethic])
|
ethical_totals[id] = supported
|
||||||
target.ethics[previous][ethic] = E.add(target.ethics[previous].get(ethic, 0), removed[ethic])
|
ethical_totals[previous] = E.add(previous_count, excess)
|
||||||
|
# Capacity losses are proportional, so the surviving source keeps its profile.
|
||||||
if E.eq(previous, "C1.9"):
|
if E.eq(previous, "C1.9"):
|
||||||
var stars: Dictionary = {}
|
var stars: Dictionary = {}
|
||||||
var current_physical: Dictionary = world.ledger.physical_amounts(target)
|
var current_physical: Dictionary = world.ledger.physical_amounts(target)
|
||||||
@@ -224,7 +255,7 @@ static func effective_span(world, target: Dictionary, id: String, rules: Diction
|
|||||||
if E.le(population, 0): return base
|
if E.le(population, 0): return base
|
||||||
var homes: Dictionary = stage_homes(world, target, id, world.catalog.civilization_layout(rules))
|
var homes: Dictionary = stage_homes(world, target, id, world.catalog.civilization_layout(rules))
|
||||||
target.civilization_homes[id] = homes
|
target.civilization_homes[id] = homes
|
||||||
var weighted: Variant = population
|
var multiplier: float = 1.0
|
||||||
for home in homes:
|
for home in homes:
|
||||||
weighted = E.add(weighted, E.multiply(homes[home], (E.subtract(E.maximum(0, world.catalog.entities[home].civ_bonus), 1))))
|
multiplier += E.ratio_approx(homes[home], population) * (maxf(0.0, E.approx(world.catalog.entities[home].civ_bonus)) - 1.0)
|
||||||
return (E.mul_div(base, population, weighted) if E.gt(weighted, 0) else base)
|
return E.approx(base) / multiplier if multiplier > 0.0 else base
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
extends "res://world/owniverse/simulation_module.gd"
|
extends "res://world/owniverse/simulation_module.gd"
|
||||||
const E = preload("res://world/owniverse/math/exact.gd")
|
const E = preload("res://world/owniverse/math/exact.gd")
|
||||||
const CivilizationEvolution = preload("res://world/owniverse/civilization_evolution.gd")
|
|
||||||
const CivilizationState = preload("res://world/owniverse/civilization_state.gd")
|
const CivilizationState = preload("res://world/owniverse/civilization_state.gd")
|
||||||
const SimulationTime = preload("res://world/owniverse/simulation_time.gd")
|
const SimulationTime = preload("res://world/owniverse/simulation_time.gd")
|
||||||
const WorldParameters = preload("res://world/owniverse/world_parameters.gd")
|
const WorldParameters = preload("res://world/owniverse/world_parameters.gd")
|
||||||
const QuantityMath = preload("res://world/owniverse/quantity_math.gd")
|
const QuantityMath = preload("res://world/owniverse/quantity_math.gd")
|
||||||
|
|
||||||
func initialize_life_batches() -> void:
|
func initialize_life_batches() -> void:
|
||||||
|
for id in Global.CivilizationRules:
|
||||||
|
world.state.batches.erase(id)
|
||||||
|
world.state.batch_origins.erase(id)
|
||||||
CivilizationState.detach_space_civilizations(world.state, Global.CivilizationRules)
|
CivilizationState.detach_space_civilizations(world.state, Global.CivilizationRules)
|
||||||
CivilizationState.enforce_capacity(world, world.state, Global.CivilizationRules, world.state.time.datetime)
|
CivilizationState.enforce_capacity(world, world.state, Global.CivilizationRules, world.state.time.datetime)
|
||||||
var physical: Dictionary = world.ledger.physical_amounts(world.state)
|
var physical: Dictionary = world.ledger.physical_amounts(world.state)
|
||||||
@@ -30,14 +32,17 @@ func evolute_to_datetime(datetime: Variant, clock: Dictionary = {}, budget: RefC
|
|||||||
# Fractional frame updates cannot change capacity or populations.
|
# Fractional frame updates cannot change capacity or populations.
|
||||||
var processed_year: Variant = SimulationTime.processed_year(datetime)
|
var processed_year: Variant = SimulationTime.processed_year(datetime)
|
||||||
if E.gt(processed_year, world.state.time.year):
|
if E.gt(processed_year, world.state.time.year):
|
||||||
|
if budget != null: budget.call("set_phase", "initialize_life_batches")
|
||||||
var profile_initialize: int = world.profile_start()
|
var profile_initialize: int = world.profile_start()
|
||||||
initialize_life_batches()
|
initialize_life_batches()
|
||||||
world.profile_end("initialize", profile_initialize)
|
world.profile_end("initialize", profile_initialize)
|
||||||
var previous: Dictionary = world.state
|
var previous: Dictionary = world.state
|
||||||
|
if budget != null: budget.call("set_phase", "deep_copy_and_coarsen")
|
||||||
var next: Dictionary = previous.duplicate_deep()
|
var next: Dictionary = previous.duplicate_deep()
|
||||||
next.version = SimulationTime.STATE_VERSION
|
next.version = SimulationTime.STATE_VERSION
|
||||||
next.speed = clampi(E.integer(previous.speed), 1, Global.SPEED_LIMIT)
|
next.speed = clampi(E.integer(previous.speed), 1, Global.SPEED_LIMIT)
|
||||||
next.speed_in_year = E.power(10, E.subtract(next.speed, 1))
|
next.speed_in_year = E.power(10, E.subtract(next.speed, 1))
|
||||||
|
world.batches.coarsen(next)
|
||||||
var from_year: Variant = previous.time.year
|
var from_year: Variant = previous.time.year
|
||||||
var to_year: Variant = processed_year
|
var to_year: Variant = processed_year
|
||||||
if E.gt(to_year, from_year):
|
if E.gt(to_year, from_year):
|
||||||
@@ -48,6 +53,12 @@ func evolute_to_datetime(datetime: Variant, clock: Dictionary = {}, budget: RefC
|
|||||||
var profile_production: int = world.profile_start()
|
var profile_production: int = world.profile_start()
|
||||||
world.automatic.produce_for_period(previous, next, quantities, distribution, from_year, to_year)
|
world.automatic.produce_for_period(previous, next, quantities, distribution, from_year, to_year)
|
||||||
world.profile_end("production", profile_production)
|
world.profile_end("production", profile_production)
|
||||||
|
if budget != null:
|
||||||
|
budget.call("set_phase", "civilization_flows")
|
||||||
|
await world.civilization_flow.evolve(next, from_year, to_year, budget)
|
||||||
|
if budget.cancelled: return
|
||||||
|
else:
|
||||||
|
world.civilization_flow.evolve(next, from_year, to_year)
|
||||||
var profile_generations: int = world.profile_start()
|
var profile_generations: int = world.profile_start()
|
||||||
if budget != null:
|
if budget != null:
|
||||||
await evolve_batches(next, to_year, budget)
|
await evolve_batches(next, to_year, budget)
|
||||||
@@ -72,38 +83,51 @@ func evolve_batches(target: Dictionary, to_year: Variant, budget: RefCounted = n
|
|||||||
var _keep_alive: RefCounted = self
|
var _keep_alive: RefCounted = self
|
||||||
# A long cycle may contain several generations; preserve actual birth intervals.
|
# A long cycle may contain several generations; preserve actual birth intervals.
|
||||||
var completed: Dictionary = {}
|
var completed: Dictionary = {}
|
||||||
while await evolve_batch_generation(target, to_year, completed, budget):
|
var context: Dictionary = {
|
||||||
|
"life_modifiers": WorldParameters.life_modifiers(target),
|
||||||
|
"enlightenment": WorldParameters.value(target, "Enlightenment"),
|
||||||
|
"explosiveness": WorldParameters.effective(target, "Exp")
|
||||||
|
}
|
||||||
|
while await evolve_batch_generation(target, to_year, completed, budget, context):
|
||||||
if budget != null and not await budget.pause(): return
|
if budget != null and not await budget.pause(): return
|
||||||
|
|
||||||
|
|
||||||
func evolve_batch_generation(target: Dictionary, to_year: Variant, completed: Dictionary = { }, budget: RefCounted = null) -> bool:
|
func evolve_batch_generation(target: Dictionary, to_year: Variant, completed: Dictionary = { }, budget: RefCounted = null, context: Dictionary = {}) -> bool:
|
||||||
var _keep_alive: RefCounted = self
|
var _keep_alive: RefCounted = self
|
||||||
# Apply direct completions at the original next-generation boundary, so
|
# Apply direct completions at their original generation boundaries, so
|
||||||
# binding transfers, the blast environment and capacity checks keep order.
|
# binding transfers, blast environment and capacity checks keep order.
|
||||||
if budget != null and not await budget.pause(): return false
|
if budget != null and not await budget.pause(): return false
|
||||||
var completed_now: Dictionary = completed.duplicate(true)
|
if budget != null: budget.call("set_phase", "generation_setup_and_withdrawal")
|
||||||
|
var completed_now: Dictionary = completed.duplicate()
|
||||||
completed.clear()
|
completed.clear()
|
||||||
|
if context.is_empty():
|
||||||
|
context = {"life_modifiers": WorldParameters.life_modifiers(target), "enlightenment": WorldParameters.value(target, "Enlightenment"), "explosiveness": WorldParameters.effective(target, "Exp")}
|
||||||
var quantities: Dictionary = world.ledger.physical_amounts(target)
|
var quantities: Dictionary = world.ledger.physical_amounts(target)
|
||||||
var expired: Dictionary = {}
|
var expired: Dictionary = {}
|
||||||
var preview: Dictionary = {"batches": {}}
|
var withdrawn: Dictionary = {}
|
||||||
|
var batch_ids: Array = []
|
||||||
for id in target.batches:
|
for id in target.batches:
|
||||||
if (world.catalog.entities.has(id) and E.gt(world.catalog.entities[id].destroy_level, 0)):
|
if not Global.CivilizationRules.has(id): batch_ids.append(id)
|
||||||
preview.batches[id] = target.batches[id].duplicate(true)
|
var planets_changed: bool = false
|
||||||
for id in target.batches.keys():
|
var profile_withdraw: int = world.profile_start()
|
||||||
|
for id in batch_ids:
|
||||||
if ((not world.catalog.entities.has(id)) or E.le(world.catalog.entities[id].destroy_level, 0)):
|
if ((not world.catalog.entities.has(id)) or E.le(world.catalog.entities[id].destroy_level, 0)):
|
||||||
continue
|
continue
|
||||||
var dying: Variant = 0
|
var dying: Variant = 0
|
||||||
for part : Dictionary in completed_now.get(id, []):
|
for part : Dictionary in completed_now.get(id, []):
|
||||||
dying = E.add(dying, part.amount)
|
dying = E.add(dying, part.amount)
|
||||||
for part : Dictionary in world.batches.withdraw_batches(preview, id, to_year):
|
withdrawn[id] = world.batches.withdraw_batches(target, id, to_year)
|
||||||
|
for part : Dictionary in withdrawn[id]:
|
||||||
dying = E.add(dying, part.amount)
|
dying = E.add(dying, part.amount)
|
||||||
if E.gt(quantities.get(id, 0), 0):
|
if E.gt(quantities.get(id, 0), 0):
|
||||||
world.stellar.destroy_planets(target, id, E.divide(dying, quantities[id]), world.catalog.entities[id].destroy_level)
|
planets_changed = world.stellar.destroy_planets(target, id, E.divide(dying, quantities[id]), world.catalog.entities[id].destroy_level) or planets_changed
|
||||||
quantities = world.ledger.physical_amounts(target)
|
world.profile_end("generation_withdrawal", profile_withdraw)
|
||||||
|
if planets_changed: quantities = world.ledger.physical_amounts(target)
|
||||||
# Withdraw all types before creating successors: iteration order cannot affect them.
|
# Withdraw all types before creating successors: iteration order cannot affect them.
|
||||||
for id in target.batches.keys():
|
for id in batch_ids:
|
||||||
if world.catalog.entities.has(id):
|
if world.catalog.entities.has(id):
|
||||||
expired[id] = E.add(completed_now.get(id, []), world.batches.withdraw_batches(target, id, to_year))
|
var parts: Array = withdrawn[id] if withdrawn.has(id) else world.batches.withdraw_batches(target, id, to_year)
|
||||||
|
expired[id] = E.add(completed_now.get(id, []), parts)
|
||||||
var has_expired: bool = false
|
var has_expired: bool = false
|
||||||
for parts : Array in expired.values():
|
for parts : Array in expired.values():
|
||||||
if (not parts.is_empty()):
|
if (not parts.is_empty()):
|
||||||
@@ -111,78 +135,102 @@ func evolve_batch_generation(target: Dictionary, to_year: Variant, completed: Di
|
|||||||
break
|
break
|
||||||
if (not has_expired):
|
if (not has_expired):
|
||||||
return false
|
return false
|
||||||
|
# Aggregate quantities are used to calculate the type-level transfer ratio;
|
||||||
|
# transition products remain calculated for each expiring cohort.
|
||||||
|
var expired_totals: Dictionary = {}
|
||||||
|
for id in expired:
|
||||||
|
var total: Variant = 0
|
||||||
|
for part: Dictionary in expired[id]: total = E.add(total, part.amount)
|
||||||
|
expired_totals[id] = total
|
||||||
var fractions: Dictionary = {}
|
var fractions: Dictionary = {}
|
||||||
var outputs: Dictionary = {}
|
var outputs: Dictionary = {}
|
||||||
var current_quantities: Dictionary = quantities
|
var current_quantities: Dictionary = quantities
|
||||||
|
if budget != null: budget.call("set_phase", "civilization_stellar_budget")
|
||||||
var star_budget: Dictionary = CivilizationState.stellar_budget(world, target, Global.CivilizationRules, current_quantities)
|
var star_budget: Dictionary = CivilizationState.stellar_budget(world, target, Global.CivilizationRules, current_quantities)
|
||||||
var civilization_transaction: Dictionary = await CivilizationEvolution.prepare(world, target, expired, to_year, star_budget, Global.CivilizationRules, current_quantities, budget)
|
if budget != null: budget.call("set_phase", "civilization_prepare")
|
||||||
if budget != null and budget.cancelled: return false
|
var profile_products: int = world.profile_start()
|
||||||
for id in expired:
|
for id in expired:
|
||||||
if budget != null and not await budget.pause(): return false
|
if budget != null and not await budget.pause(): return false
|
||||||
var total: Variant = 0
|
var total: Variant = expired_totals[id]
|
||||||
for part : Dictionary in expired[id]:
|
|
||||||
total = E.add(total, part.amount)
|
|
||||||
fractions[id] = (E.clamp_value(E.divide(total, quantities[id]), 0, 1) if E.gt(quantities.get(id, 0), 0) else 0)
|
fractions[id] = (E.clamp_value(E.divide(total, quantities[id]), 0, 1) if E.gt(quantities.get(id, 0), 0) else 0)
|
||||||
|
outputs[id] = {}
|
||||||
var combined: Dictionary = {}
|
var combined: Dictionary = {}
|
||||||
for part : Dictionary in expired[id]:
|
for part: Dictionary in expired[id]:
|
||||||
if (not part.has("products")):
|
if not part.has("products"):
|
||||||
part.products = world.stellar.evolution_products(target, world.catalog.entities[id], part.amount)
|
part.products = world.stellar.evolution_products(target, world.catalog.entities[id], part.amount, context)
|
||||||
for successor in part.products.keys():
|
for successor in part.products.keys():
|
||||||
if Global.CivilizationRules.has(id):
|
if Global.CivilizationRules.has(id): continue
|
||||||
continue
|
|
||||||
var requested: Variant = part.products[successor]
|
var requested: Variant = part.products[successor]
|
||||||
var admitted: Variant = CivilizationState.admit_transition(star_budget, Global.CivilizationRules, id, successor, requested)
|
var admitted: Variant = CivilizationState.admit_transition(star_budget, Global.CivilizationRules, id, successor, requested)
|
||||||
part.products[successor] = admitted
|
part.products[successor] = admitted
|
||||||
if E.lt(admitted, requested):
|
if E.lt(admitted, requested):
|
||||||
part.products[id] = E.subtract(E.add(part.products.get(id, 0), requested), admitted)
|
part.products[id] = E.add(part.products.get(id, 0), E.subtract(requested, admitted))
|
||||||
for successor in part.products:
|
for successor in part.products:
|
||||||
combined[successor] = E.add(combined.get(successor, 0), part.products[successor])
|
combined[successor] = E.add(combined.get(successor, 0), part.products[successor])
|
||||||
outputs[id] = {}
|
|
||||||
if E.gt(total, 0):
|
if E.gt(total, 0):
|
||||||
for successor in combined:
|
for successor in combined:
|
||||||
outputs[id][successor] = E.divide(combined[successor], total)
|
outputs[id][successor] = E.divide(combined[successor], total)
|
||||||
|
world.profile_end("generation_products", profile_products)
|
||||||
|
|
||||||
|
var affected: Dictionary = {}
|
||||||
|
for id in fractions:
|
||||||
|
if E.le(fractions[id], 0): continue
|
||||||
|
affected[id] = true
|
||||||
|
for held in target.binds.get(id, {}): affected[held] = true
|
||||||
|
for successor in outputs[id]: affected[successor] = true
|
||||||
|
if budget != null: budget.call("set_phase", "transfer_evolution")
|
||||||
var incoming: Dictionary = world.ledger.transfer_evolution(target, fractions, outputs)
|
var incoming: Dictionary = world.ledger.transfer_evolution(target, fractions, outputs)
|
||||||
|
|
||||||
var new_owners: Dictionary = {}
|
var new_owners: Dictionary = {}
|
||||||
|
var born_civilizations: Dictionary = {}
|
||||||
var blast_power: Variant = 0
|
var blast_power: Variant = 0
|
||||||
var environment: Dictionary = world.environment.stellar_environment(target)
|
for parts: Array in expired.values():
|
||||||
|
for part: Dictionary in parts:
|
||||||
|
blast_power = E.add(blast_power, part.products.get("blast", 0))
|
||||||
|
var environment: Dictionary = world.environment.stellar_environment(target) if E.gt(blast_power, 0) else {}
|
||||||
|
var resolution: Variant = world.batches.temporal_resolution(target)
|
||||||
|
if budget != null: budget.call("set_phase", "transfer_and_newborns")
|
||||||
for id in expired:
|
for id in expired:
|
||||||
for part : Dictionary in expired[id]:
|
for part: Dictionary in expired[id]:
|
||||||
for successor in part.products:
|
for successor in part.products:
|
||||||
if budget != null and not await budget.pause(): return false
|
if budget != null and not await budget.pause(): return false
|
||||||
var amount: Variant = part.products[successor]
|
var amount: Variant = part.products[successor]
|
||||||
if E.eq(successor, "blast"):
|
if E.le(amount, 0) or E.eq(successor, "blast") or not world.catalog.entities.has(successor): continue
|
||||||
blast_power = E.add(blast_power, amount)
|
if E.eq(successor, id) and (not world.catalog.entities[id].life_rule.is_empty() or Global.CivilizationRules.has(id)):
|
||||||
continue
|
|
||||||
if (not world.catalog.entities.has(successor)):
|
|
||||||
continue
|
|
||||||
if (E.eq(successor, id) and (((not world.catalog.entities[id].life_rule.is_empty()) or Global.CivilizationRules.has(id)))):
|
|
||||||
target.amount[id] = E.add(target.amount.get(id, 0), amount)
|
target.amount[id] = E.add(target.amount.get(id, 0), amount)
|
||||||
else:
|
else:
|
||||||
amount = world.ledger.credit(target, successor, amount)
|
amount = world.ledger.credit(target, successor, amount)
|
||||||
var produces: bool = not world.automatic.yearly_products(world.catalog.entities[successor]).is_empty()
|
var produces: bool = not world.automatic.yearly_products(world.catalog.entities[successor]).is_empty()
|
||||||
var before_batches: Array = target.batches.get(successor, []).duplicate(true) if produces else []
|
var newborn_adjustment: Dictionary = {}
|
||||||
var cutoff: Variant = (to_year if world.stellar.uses_short_lived_fast_path(successor) else E.neg(INF))
|
var cutoff: Variant = to_year if world.stellar.uses_short_lived_fast_path(successor) else E.neg(INF)
|
||||||
|
var born_from: Variant = part.from
|
||||||
|
var born_to: Variant = part.to
|
||||||
|
if E.gt(resolution, 0) and (Global.CivilizationRules.has(successor) or not world.catalog.entities[successor].life_rule.is_empty()):
|
||||||
|
born_to = E.multiply(E.ceil_value(E.divide(born_to, resolution)), resolution)
|
||||||
|
born_from = born_to
|
||||||
var profile_newborn: int = world.profile_start()
|
var profile_newborn: int = world.profile_start()
|
||||||
var integral: Variant
|
var integral: Variant
|
||||||
if budget != null:
|
if budget != null:
|
||||||
integral = await world.batches.append_batch(target, successor, amount, part.from, part.to, completed, cutoff, budget)
|
integral = await world.batches.append_batch(target, successor, amount, born_from, born_to, completed, cutoff, budget, newborn_adjustment if produces else null, to_year)
|
||||||
if budget.cancelled: return false
|
if budget.cancelled: return false
|
||||||
else:
|
else:
|
||||||
integral = world.batches.append_batch(target, successor, amount, part.from, part.to, completed, cutoff)
|
integral = world.batches.append_batch(target, successor, amount, born_from, born_to, completed, cutoff, null, newborn_adjustment if produces else null, to_year)
|
||||||
if produces:
|
if produces:
|
||||||
world.automatic.produce_newborn_lifetime(target, successor, amount, part.from, part.to, to_year, before_batches, integral)
|
world.automatic.produce_newborn_lifetime(target, successor, amount, born_from, born_to, to_year, newborn_adjustment.get("past_years", 0), integral)
|
||||||
world.profile_end("newborn_batches", profile_newborn)
|
world.profile_end("newborn_batches", profile_newborn)
|
||||||
new_owners[successor] = E.add(new_owners.get(successor, 0), amount)
|
new_owners[successor] = E.add(new_owners.get(successor, 0), amount)
|
||||||
|
if Global.CivilizationRules.has(successor): born_civilizations[successor] = E.add(born_civilizations.get(successor, 0), amount)
|
||||||
world.ledger.accept_transfers(target, incoming)
|
world.ledger.accept_transfers(target, incoming)
|
||||||
|
if budget != null: budget.call("set_phase", "finish_and_capacity")
|
||||||
world.ledger.bind_new_owners(target, new_owners)
|
world.ledger.bind_new_owners(target, new_owners)
|
||||||
world.ledger.round_object_allocations(target)
|
for owner in new_owners:
|
||||||
if budget != null:
|
for resource in world.catalog.entities[owner].bind:
|
||||||
await CivilizationEvolution.finish(world, target, civilization_transaction, to_year, Global.CivilizationRules, budget)
|
for member in world.catalog.members(resource): affected[member] = true
|
||||||
if budget.cancelled: return false
|
world.ledger.round_object_allocations(target, affected)
|
||||||
else:
|
for id in born_civilizations:
|
||||||
CivilizationEvolution.finish(world, target, civilization_transaction, to_year, Global.CivilizationRules)
|
var current: Variant = world.ledger.physical_amount(target, id)
|
||||||
world.stellar.apply_blast(target, blast_power, environment)
|
var born: Variant = born_civilizations[id]
|
||||||
|
target.ethics[id] = CivilizationState.merge_profiles(target.ethics.get(id, {}), E.maximum(0, E.subtract(current, born)), CivilizationState.empty_profile(), born)
|
||||||
|
if E.gt(blast_power, 0): world.stellar.apply_blast(target, blast_power, environment)
|
||||||
CivilizationState.enforce_capacity(world, target, Global.CivilizationRules, to_year)
|
CivilizationState.enforce_capacity(world, target, Global.CivilizationRules, to_year)
|
||||||
return true
|
return true
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user