Compare commits

...

3 Commits

Author SHA1 Message Date
Claude
2e336886a9 Wine-перевірка: тестові пакети з версією dev, як очікує tests/update.gd (на тегу версія вже вписана)
All checks were successful
ci-image / image (push) Successful in 15s
build / build (push) Successful in 4m12s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZxjRNfPF6rNJTvBXnq
2026-11-25 17:43:37 +00:00
JunioR
dfa030ad02 README.md: опис гри для репозиторію (UA + EN), завантаження, скриншоти, розробка й реліз
Some checks failed
build / build (push) Failing after 4m12s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZvBYf9Geq8jKdMTEwC
2026-11-25 17:30:04 +00:00
Claude
9ee82dde6a CI: перевірка exe під Wine перед публікацією (гра 20 с, тести fx/balance/update і скриншоти на релізному шаблоні; screenshots-wine.zip у релізі)
Some checks failed
build / build (push) Has been cancelled
ci-image / image (push) Successful in 5m16s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZxjRNfPF6rNJTvBXnq
2026-11-25 17:08:55 +00:00
5 changed files with 154 additions and 3 deletions

View File

@@ -88,6 +88,13 @@ jobs:
godot --headless --path . --export-release "Windows Desktop" ../game_godot/TinMerezhi.exe
ls -l ../game_godot/TinMerezhi.exe
- name: Windows exe under Wine (the game, tests and screenshots on the real template)
if: startsWith(github.ref, 'refs/tags/')
working-directory: source_godot
run: |
TEMPLATE=tools/template.exe sh ../ci/wine_check.sh ../game_godot/TinMerezhi.exe /tmp/shots
python3 -c 'import shutil; shutil.make_archive("/tmp/screenshots-wine", "zip", "/tmp/shots")'
- name: Upload to Release
if: startsWith(github.ref, 'refs/tags/')
env:
@@ -105,6 +112,8 @@ jobs:
ID=$(curl -sf -H "$H" "$API/releases/tags/$TAG" | getid) || \
ID=$(curl -sf -H "$H" -H "Content-Type: application/json" -d "$BODY" "$API/releases" | getid)
curl -sSf -H "$H" -F "attachment=@game_godot/TinMerezhi.exe" "$API/releases/$ID/assets?name=TinMerezhi.exe" >/dev/null
# screenshots taken by the real exe under Wine (the in-game updater only looks for TinMerezhi.exe)
curl -sSf -H "$H" -F "attachment=@/tmp/screenshots-wine.zip" "$API/releases/$ID/assets?name=screenshots-wine.zip" >/dev/null
echo "Release $TAG: TinMerezhi.exe uploaded"
- name: Publish to itch.io

91
README.md Normal file
View File

@@ -0,0 +1,91 @@
# Тінь Мережі · Shadow Net
![Тінь Мережі](itch/screenshots/1_start.png)
**Тінь Мережі** — хакерська гра, де все робиш у терміналі. *[English version below](#shadow-net).*
Ти — Shadow, хакер-одинак. Таємничий Оракул дає завдання: від Wi-Fi кав'ярні до орбітального ядра системи стеження "Аргус". А за всім, від банку до супутника, стоїть один ворог — Пуйло. Скануй мережу, підбирай коди, відкривай порти, будуй маршрут через зламані сервери й стирай логи, бо трасування росте з кожною помилкою.
- **5 актів, 42 глави** і кілька кінцівок, що залежать від твоїх виборів
- **42 сервери** на анімованій мапі мережі: шари шифрування, закриті порти, активне трасування
- **Міні-ігри зламу**: обхід фаєрвола (логічна головоломка) і словникова атака (підбір пароля)
- **Суперники-хакери** Cobra, Mantis і Nyx: перегони за замовлення, крадіжки й помста
- **Нескінченна мережа** після фіналу: замовлення Брокера, зростаюча глибина і таблиця рекордів
- **Три складності**: Новачок, Звичайний і Параноя (жорстке трасування, без збережень)
- навички, обладнання, хакерське ПЗ, скриптові агенти, контракти й побічні замовлення
- **Звук**: процедурна синтвейв-музика, сирена тривоги, клацання клавіш, голоси персонажів
- автодоповнення команд через Tab, історія команд, `help <команда>`
- налаштування гучності, CRT-ефекту, глітчу, шрифту, повний екран (F11)
- **Українська та англійська** мови (перемикаються в налаштуваннях або командою `lang`)
- **Автооновлення**: гра сама повідомить про нову версію, команда `update` встановить її
Windows 10/11, без встановлення: завантаж і запусти `TinMerezhi.exe`.
Збереження: `%APPDATA%\Godot\app_userdata\Тінь Мережі`.
## Завантажити
- **itch.io:** https://tuberon.itch.io/tinmerezhi
- **Releases у Gitea:** https://serv.tail9357bc.ts.net/junior/TinMerezhi/releases/latest (файл `TinMerezhi.exe`)
Встановлювати нічого не треба. Windows може показати "Windows захистив ваш ПК": "Докладніше" → "Виконати все одно" (exe не має цифрового підпису). Нові версії гра знаходить сама, команда `update` їх встановлює.
## Скриншоти
| | |
|---|---|
| ![Злам](itch/screenshots/2_crack.png) | ![Акт V](itch/screenshots/6_act5.png) |
| ![Фаєрвол](itch/screenshots/8_firewall_uk.png) | ![Суперники](itch/screenshots/10_rivals_uk.png) |
## Що в репозиторії
| Шлях | Що це |
|---|---|
| `source_godot/` | проєкт Godot 4.7.2: код гри, тести, інструменти збірки ([README](source_godot/README.md)) |
| `game_godot/ПРОЧИТАЙ.txt` | інструкція гравця: усі команди й механіки |
| `ci/` | Docker-образ CI (`tinmerezhi-ci`), власний малий шаблон Windows, перевірка exe під Wine |
| `.gitea/workflows/` | `build.yml` (тести, збірка, реліз, itch.io), `template.yml`, `ci-image.yml` |
| `itch/` | обкладинка, скриншоти й текст сторінки itch.io |
## Розробка
Відкрий `source_godot/project.godot` у Godot 4.7.2. Тести: `source_godot/run_tests.bat` (Windows) або `run_tests.sh`.
Числа балансу — у `tuning.gd`, тексти й дані — у `data.gd`, `act4.gd`, `act5.gd`, `extra.gd`.
**Реліз:** кожен push у `main` запускає тести й бота балансу. Тег `v*` ще й збирає `TinMerezhi.exe`,
перевіряє його під Wine, публікує в Releases (нотатки з комітів) і на itch.io.
Деталі збірки й CI — у [source_godot/README.md](source_godot/README.md).
## Ліцензія
Гра і код — © 2026 JunioR, [MIT](LICENSE.txt). Рушій Godot — MIT. Шрифт Noto Color Emoji (Google) — SIL OFL 1.1 ([LICENSE-NotoEmoji.txt](LICENSE-NotoEmoji.txt)).
---
## Shadow Net
![Shadow Net](itch/screenshots/11_endless_en.png)
**Shadow Net** (Тінь Мережі) is a hacking game played entirely in a terminal. *The game is in Ukrainian and English.*
You are Shadow, a lone hacker. The mysterious Oracle sends you jobs, from a café's Wi-Fi all the way to the orbital core of the "Argus" surveillance system. And behind all of it, from the bank to the satellite, stands one enemy: Puilo. Scan the network, crack codes, open ports, route through hacked servers and wipe your logs, because every mistake raises the trace.
- **5 acts, 42 chapters** and several endings shaped by your choices
- **42 servers** on an animated network map: encryption layers, closed ports, active tracing
- **Hacking mini-games**: firewall bypass (a logic puzzle) and a dictionary attack (password guessing)
- **Rival hackers** Cobra, Mantis and Nyx race you for jobs, steal from you and take revenge
- **Endless Network** after the finale: Broker's jobs, growing depth and a high-score table
- **Three difficulties**: Novice, Normal and Paranoid (harsh tracing, no saves)
- skills, hardware, hacking software, script agents, contracts and side jobs
- **Sound**: procedural synthwave music, alarm siren, key clicks, character voices
- Tab completion, command history, `help <command>`
- settings for volume, CRT effect, glitch, font size, fullscreen (F11)
- **English and Ukrainian** (switch in Settings or with the `lang` command)
- **Auto-update**: the game tells you when a new version is out, and `update` installs it
Windows 10/11, no install: download and run `TinMerezhi.exe`.
**Download:** [itch.io](https://tuberon.itch.io/tinmerezhi) or [Gitea Releases](https://serv.tail9357bc.ts.net/junior/TinMerezhi/releases/latest). Windows 10/11, no install: run `TinMerezhi.exe`. Windows SmartScreen may warn you: "More info" → "Run anyway" (the exe is unsigned).
**Development:** open `source_godot/project.godot` in Godot 4.7.2 and run `run_tests.bat` / `run_tests.sh`. Every push to `main` runs the tests and the balance bot; a `v*` tag builds the exe, checks it under Wine and publishes it to Releases and itch.io. Build details: [source_godot/README.md](source_godot/README.md) (Ukrainian).
**License:** © 2026 JunioR, [MIT](LICENSE.txt). Godot engine (MIT), Noto Color Emoji (SIL OFL 1.1).

View File

@@ -1,8 +1,10 @@
# CI image for build.yml: Godot headless, the small Windows template, fontTools, go-winres, butler.
# CI image for build.yml: Godot headless, the small Windows template, fontTools, go-winres, butler,
# Wine + Xvfb + Mesa (software OpenGL) to run the built exe (ci/wine_check.sh).
# Built on the server by ci/build_image.sh (workflow ci-image.yml) as the local image tinmerezhi-ci:4.7.2.
FROM node:20-bookworm
ARG GODOT_VER=4.7.2
RUN apt-get update -qq && DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends python3-fonttools \
wine64 wine xvfb xauth libgl1-mesa-dri \
&& rm -rf /var/lib/apt/lists/*
RUN curl -sSL --fail -o /tmp/g.zip "https://github.com/godotengine/godot/releases/download/${GODOT_VER}-stable/Godot_v${GODOT_VER}-stable_linux.x86_64.zip" \
&& unzip -q /tmp/g.zip -d /tmp/g && install /tmp/g/Godot_v${GODOT_VER}-stable_linux.x86_64 /usr/local/bin/godot && rm -rf /tmp/g /tmp/g.zip
@@ -15,4 +17,4 @@ RUN curl -sSL --fail -o /tmp/b.zip https://broth.itch.zone/butler/linux-amd64/15
&& unzip -q /tmp/b.zip -d /opt/butler && chmod +x /opt/butler/butler && ln -s /opt/butler/butler /usr/local/bin/butler && rm /tmp/b.zip
# the small template from the prerelease template-<ver> (build_image.sh downloads it next to this file)
COPY template.exe /opt/tinmerezhi/template.exe
RUN godot --version && go-winres --help >/dev/null && butler -V && python3 -c 'import fontTools'
RUN godot --version && go-winres --help >/dev/null && butler -V && python3 -c 'import fontTools' && wine --version

45
ci/wine_check.sh Normal file
View File

@@ -0,0 +1,45 @@
#!/bin/sh
# Runs the built Windows exe under Wine (virtual X display, software OpenGL): the game itself, then tests and
# screenshots on the same release template. Usage, from source_godot/ after the export:
# sh ../ci/wine_check.sh <exe> <screenshots dir>
# smoke/features/lang are not run here: they use RegEx, which the small template does not have (the game does not use it).
set -e
EXE=$(realpath "$1"); SHOTS=$(realpath -m "$2"); W=/tmp/wine_check
rm -rf $W && mkdir -p $W "$SHOTS"
# no Mono/Gecko installers, no crash debugger (it waits forever); a Wine virtual desktop instead of bare Xvfb windows
export WINEPREFIX=$W/prefix WINEDEBUG=-all WINEDLLOVERRIDES="mscoree,mshtml=;winedbg.exe=d"
run() { xvfb-run -a -s "-screen 0 1280x800x24" timeout "$1" wine explorer /desktop=ci,1280x720 "$2" -- "Z:$SHOTS"; }
xvfb-run -a wineboot -i >/dev/null 2>&1 || true
fail=0
echo "=== the game: starts and runs 20 s without crashing or script errors"
run 20 "$EXE" > $W/game.log 2>&1 || true
grep -vE "^ALSA|X connection|^$" $W/game.log | tail -12
if grep -qE "SCRIPT ERROR|Parse Error|Failed to load|Unhandled|X Error" $W/game.log; then echo "FAIL: errors or a crash in the game log"; fail=1; fi
# release builds ignore --main-pack and -s, so every test gets its own pack whose main loop is the test script,
# run by a copy of the same template: t_<name>.exe loads t_<name>.pck next to it
for t in fx balance update shot; do
rm -rf $W/proj && cp -r . $W/proj && cd $W/proj
sed -i 's|^exclude_filter=.*|exclude_filter=""|' export_presets.cfg
sed -i '1a class_name WineTest' tests/$t.gd
# Wine loses the exit code (and may crash after quit), so the test prints it before quitting
sed -i 's/\bquit(/_wq(/g' tests/$t.gd
printf '\nfunc _wq(c: int = 0) -> void:\n\tprint("WINE_EXIT ", c)\n\tquit(c)\n' >> tests/$t.gd
# a release build needs a main scene: an empty one, the test adds the game itself
printf '[gd_scene format=3]\n\n[node name="Empty" type="Node"]\n' > tests/empty.tscn
sed -i 's|^run/main_scene=.*|run/main_scene="res://tests/empty.tscn"|' project.godot
sed -i 's|^\[application\]|[application]\n\nrun/main_loop_type="WineTest"|' project.godot
sed -i 's|^config/version=.*|config/version="dev"|' project.godot # tests expect a dev build (no self-update)
godot --headless --path . --import >/dev/null 2>&1
godot --headless --path . --export-pack "Windows Desktop" $W/t_$t.pck >/dev/null 2>&1
cd - >/dev/null
cp "${TEMPLATE:-tools/template.exe}" $W/t_$t.exe
echo "=== $t ($(stat -c %s $W/t_$t.pck) bytes pack)"
run 300 $W/t_$t.exe > $W/$t.log 2>&1 || true
grep -vE "^ALSA|X connection|^Godot Engine|^$|audio|WASAPI|SDR white|^ at:" $W/$t.log | tail -8
grep -q "^WINE_EXIT 0" $W/$t.log || { echo "FAIL: $t"; fail=1; }
done
ls "$SHOTS"
[ "$(ls "$SHOTS" | wc -l)" -ge 8 ] || { echo "FAIL: not all screenshots"; fail=1; }
exit $fail

View File

@@ -85,5 +85,9 @@
go-winres, butler), тож нічого не завантажується щоразу. Образ перезбирає workflow `ci-image.yml`
(сам при зміні `ci/` або `tools/template.sha256`, або вручну); якщо збірка каже, що образу немає, запусти його.
Тести й шість сідів бота балансу йдуть паралельно (~35 с на push). Тег не повторює тести, якщо цей самий коміт
уже пройшов їх на `main`, тож реліз займає менше хвилини.
уже пройшов їх на `main`.
Перед публікацією тег запускає зібраний exe під Wine (`ci/wine_check.sh`, Xvfb і програмний OpenGL): гра має
працювати 20 с без помилок, тести fx, balance, update і скриншоти (`tests/shot.gd`) проходять на тому самому
релізному шаблоні. Скриншоти додаються до релізу як `screenshots-wine.zip`. Якщо перевірка падає, реліз не публікується.
smoke, features і lang тут не запускаються: вони використовують RegEx, якого немає в малому шаблоні.
Гра бачить новий реліз сама (`updater.gd`).