Compare commits

...

2 Commits

Author SHA1 Message Date
Claude
208d0aac5c Оптимізація: CRT-шар вимикається на нулі, tools/ не потрапляє в exe
All checks were successful
build / build (push) Successful in 2m22s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZwmRt6eUYiekz66wM8
2026-11-29 10:31:33 +00:00
Gitea Actions
27db08393f game_godot: TinMerezhi.exe v1.0.77 2026-11-29 10:18:08 +00:00
5 changed files with 18 additions and 3 deletions

BIN
game_godot/TinMerezhi.exe (Stored with Git LFS)

Binary file not shown.

View File

@@ -8,7 +8,7 @@ dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter="tests/*"
exclude_filter="tests/*,tools/*"
export_path="../game_godot/TinMerezhi.exe"
encryption_include_filters=""
encryption_exclude_filters=""

View File

@@ -50,6 +50,10 @@ static func tick(g: Main, delta: float) -> void:
var m: ShaderMaterial = g.crt.material
m.set_shader_parameter("threat", g.threat_v)
m.set_shader_parameter("noise", clampf((g.threat_v - 0.35) / 0.65, 0.0, 1.0) * k)
# ефект на нулі й спокійно — шейдер повернув би картинку як є, тож не копіюємо екран щокадру
g.crt.visible = g.cfg["crt"] > 0 or g.flash.a > 0.0 or g.threat_v > 0.002 \
or (g.cur != null and g.trace > 60) \
or THEMES[clampi(int(g.cfg.get("theme", 0)), 0, THEMES.size() - 1)][1] >= 0.0
g.side_style.border_color = Color("#11aa55").lerp(Color("#ff3333"), g.threat_v)
g.side_style.shadow_color = Color(Color(0.2, 1, 0.4).lerp(Color(1, 0.2, 0.2), g.threat_v), 0.12 + 0.2 * g.threat_v)
# рамка тремтить, коли от-от відстежать (не заважаючи трусінню від помилок)

View File

@@ -84,6 +84,16 @@ func _run() -> void:
g._on_submit("scan")
ok(g.theme.default_font_size == 20, "розмір шрифту застосовано")
ok(is_equal_approx(g.crt.material.get_shader_parameter("strength"), 0.4), "сила CRT застосована до шейдера")
g.Gfx.tick(g, 0.016)
ok(g.crt.visible, "CRT-шар увімкнений, поки ефект не на нулі")
g.Settings.set_value(g, "crt", 0)
g.Gfx.tick(g, 0.016)
ok(not g.crt.visible or g.threat_v > 0.002, "CRT на нулі в спокої — шар вимкнено")
g.flash = Color(1, 0, 0, 0.5)
g.Gfx.tick(g, 0.016)
ok(g.crt.visible, "спалах показує CRT-шар і на нулі")
g.flash = Color(0, 0, 0, 0)
g.Settings.set_value(g, "crt", 40)
drop(g)
g = fresh(true)
ok(g.cfg["crt"] == 40 and g.cfg["font"] == 20 and g.cfg["ui"] == 150, "налаштування зберігаються між запусками")

View File

@@ -8,6 +8,7 @@ const Updater = preload("res://updater.gd")
const MAX_ITEMS := 8 # коротко: вікно має влазити й з великим шрифтом
const CHANGES := [
["1.0.78", "Ефект CRT на нулі тепер справді вимкнений: на слабких ноутбуках гра менше навантажує відеокарту.", "CRT effect at zero is now truly off: the game puts less load on the GPU of weak laptops."],
["1.0.77", "Нова заставка при запуску: тінь у капюшоні з оком мережі над нічним Києвом.", "New startup splash: a hooded shadow with a network eye over night Kyiv."],
["1.0.76", "Після першого акту гра один раз запропонує оцінити її на itch.io.", "After the first act the game asks once whether you would rate it on itch.io."],
["1.0.75", "Параноя знову повноцінно важка: замок сервера там лише перша перешкода, за ним ще треба зламати код.", "Paranoid is properly hard again: a server lock is only the first obstacle there, the code behind it still has to be cracked."],