Compare commits

...

2 Commits

Author SHA1 Message Date
Claude
6f82372ea3 itch: коротший short description (ліміт 120 байт)
Some checks failed
build / build (push) Failing after 1m20s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZwKLzKKh4DoRQTxw8x
2026-11-25 09:08:05 +00:00
JunioR
9debe0fb74 Анімовані повідомлення персонажів: картка вхідного дзвінка, пульс аватара, еквалайзер і синтезований голос кожного персонажа
All checks were successful
build / build (push) Successful in 1m15s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZvPSXrPa4aRMGVeqfd
2026-11-25 09:06:05 +00:00
2 changed files with 84 additions and 2 deletions

View File

@@ -9,7 +9,7 @@ Exe на itch.io заливає CI (крок "Publish to itch.io" у `.gitea/wor
2. Створи гру: https://itch.io/game/new
- **Title:** Тінь Мережі
- **Project URL:** `tinmerezhi` (тоді адреса буде `https://<твій-нік>.itch.io/tinmerezhi`)
- **Short description:** Хакерська гра в терміналі: зламуй сервери, замітай сліди й не дай себе відстежити.
- **Short description:** Хакерська гра в терміналі: зламуй сервери й замітай сліди.
- **Classification:** Games · **Kind of project:** Downloadable
- **Pricing:** No payments (або "$0 or donate")
- **Uploads:** нічого не завантажуй руками, це зробить CI

View File

@@ -53,7 +53,7 @@ const FX := {
"key": [[1400], 0.03, ""], "ok": [[523, 659, 784], 0.1, "ok"], "bad": [[160], 0.15, "shake"],
"dl": [[880, 1175], 0.06, ""], "bust": [[880, 440, 880, 440, 880, 440], 0.14, "bust"],
"level": [[523, 659, 784, 1047], 0.1, "level"], "win": [[523, 659, 784, 1047, 784, 1047, 1319], 0.15, "level"],
"ach": [[784, 988, 1319], 0.08, ""],
"ach": [[784, 988, 1319], 0.08, ""], "mail": [[1319, 1760], 0.06, ""],
}
# ── стан гри ──
@@ -144,6 +144,10 @@ var note_hz := 0.0
var note_dur := 0.0
var phase := 0.0
var typing := false
var voice_hz := 0.0 # "голос" персонажа, чий лист зараз друкується (0 — не лист)
var call_box: Control # анімована картка вхідного повідомлення
var call_eq: Label
var call_left := 0.0
var flash := Color(0, 0, 0, 0)
var time := 0.0
var drops := []
@@ -441,10 +445,87 @@ func mail(from: String, text: String) -> void:
_track(from + ": " + text, "mail")
out.visible_characters = before
typing = true
voice_hz = 150.0 + (abs(hash(from)) % 6) * 45.0 # кожен персонаж "говорить" своїм тоном
fx("mail")
_show_call(from)
# Картка "📡 вхідне повідомлення": аватар пульсує, еквалайзер "говорить", поки лист друкується
func _show_call(from: String) -> void:
if call_box != null:
call_box.queue_free()
var p := PanelContainer.new()
var sb := StyleBoxFlat.new()
sb.bg_color = Color(0.1, 0.02, 0.1, 0.92)
sb.border_color = COL["mail"]
sb.set_border_width_all(1)
sb.set_corner_radius_all(6)
sb.shadow_color = Color(COL["mail"], 0.35)
sb.shadow_size = 10
sb.set_content_margin_all(10)
p.add_theme_stylebox_override("panel", sb)
p.mouse_filter = Control.MOUSE_FILTER_IGNORE
var h := HBoxContainer.new()
h.add_theme_constant_override("separation", 12)
p.add_child(h)
var av := Label.new()
av.text = avatars.get(from, "📨")
av.add_theme_font_size_override("font_size", 44)
h.add_child(av)
var v := VBoxContainer.new()
h.add_child(v)
var t := Label.new()
t.text = "📡 ВХІДНЕ ПОВІДОМЛЕННЯ"
t.add_theme_font_size_override("font_size", 12)
t.add_theme_color_override("font_color", Color("#ffdd66"))
v.add_child(t)
var n := Label.new()
n.text = from
n.add_theme_font_size_override("font_size", 20)
n.add_theme_color_override("font_color", COL["mail"])
v.add_child(n)
call_eq = Label.new()
call_eq.add_theme_color_override("font_color", COL["mail"])
v.add_child(call_eq)
add_child(p)
move_child(p, crt.get_index()) # під CRT-шаром
p.position = Vector2(size.x - 330 - 340, 60)
p.modulate.a = 0.0
p.pivot_offset = Vector2(40, 40)
var tw := p.create_tween()
tw.tween_property(p, "modulate:a", 1.0, 0.2)
tw.parallel().tween_property(p, "position:x", p.position.x + 20, 0.2).from(p.position.x - 20)
av.pivot_offset = Vector2(26, 30)
var pulse := av.create_tween().set_loops(0)
pulse.tween_property(av, "scale", Vector2(1.12, 1.12), 0.35).set_trans(Tween.TRANS_SINE)
pulse.tween_property(av, "scale", Vector2.ONE, 0.35).set_trans(Tween.TRANS_SINE)
call_box = p
call_left = 1.5
func _finish_typing() -> void:
out.visible_characters = -1
typing = false
voice_hz = 0.0
func _tick_call(delta: float) -> void:
if call_box == null:
return
if typing and voice_hz > 0.0:
var bars := "▁▂▃▄▅▆▇"
var eq := ""
for i in 14:
eq += bars[randi() % bars.length()]
call_eq.text = eq
if sound and notes.size() < 2 and randf() < 0.5: # "голос": синтезовані склади
notes.append([voice_hz * (1.0 + (randi() % 5) * 0.08), 0.04, "sine"])
return
call_eq.text = "▁".repeat(14)
call_left -= delta
if call_left <= 0.0:
var b := call_box
call_box = null
var tw := b.create_tween()
tw.tween_property(b, "modulate:a", 0.0, 0.4)
tw.tween_callback(b.queue_free)
func toast(title: String, text: String) -> void:
var p := PanelContainer.new()
@@ -614,6 +695,7 @@ func _process(delta: float) -> void:
_fill_ticker()
ticker.position.x = ticker_bar.size.x
_fill_audio()
_tick_call(delta)
if music_player.stream == null and Audio.music != null:
update_music()
# сирена тривоги, поки трасування високе