From 3a36b698dc0e76ddf006a76e29ff2786ec679c39 Mon Sep 17 00:00:00 2001 From: Denis Denisov Date: Sun, 13 Sep 2026 11:34:16 +0300 Subject: [PATCH] =?UTF-8?q?M8-M9:=20README,=20=D0=BD=D0=B0=D1=81=D1=82?= =?UTF-8?q?=D1=80=D0=BE=D0=B9=D0=BA=D0=B8=20=D1=82=D0=B5=D0=BA=D1=81=D1=82?= =?UTF-8?q?=D1=83=D1=80=20=D0=BF=D0=BE=D0=B4=20=D0=BF=D0=BB=D0=B0=D1=82?= =?UTF-8?q?=D1=84=D0=BE=D1=80=D0=BC=D1=8B,=20=D1=81=D1=82=D0=B0=D1=82?= =?UTF-8?q?=D1=83=D1=81=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BE=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - README: с чего начать, какие команды есть, где что лежит - TECHNICAL.md: команда headless-сборки с её подводными камнями, настройки ASTC под Android/iOS, и честный раздел о том, что проверено, а что нет - PLAN.md: M8 и M9 помечены частичными — визуально игра не запускалась, браузер в этом окружении не поднимает главный цикл движка; там же список оставшихся хвостов Co-Authored-By: Claude Opus 5 --- README.md | 54 +++++++++++++++++++++++++++++++++++++++++++++++ docs/PLAN.md | 5 +++-- docs/TECHNICAL.md | 17 ++++++++++++++- 3 files changed, 73 insertions(+), 3 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..230f43f --- /dev/null +++ b/README.md @@ -0,0 +1,54 @@ +# Fool + +A mobile card game: *durak*, one player against a bot. Built with +**Cocos Creator 3.8.8**, targeting Web, Android and iOS, portrait only. + +## Getting around + +| | | +|---|---| +| What the game is | [docs/GAMEPLAY.md](docs/GAMEPLAY.md) — the rules, and the bot's policy | +| How it is built | [docs/TECHNICAL.md](docs/TECHNICAL.md) — layers, folders, workflows | +| What is planned | [docs/PLAN.md](docs/PLAN.md) — milestones and their state | +| Why it is like that | [docs/DECISIONS.md](docs/DECISIONS.md) — choices the specs left open | +| Driving the editor | [docs/CODE_MODE_SETUP.md](docs/CODE_MODE_SETUP.md) | + +## Working on it + +```bash +npm install +npm test # the rules, the bot and the save format, headless +npm run typecheck # strict tsc over core/, modules/ and the tests +npm run check:core-purity # fails if the game logic reaches for the engine +npm run build:art # regenerate every sprite from source +npm run stats:bot # BasicBot self-play distribution — a tool, not a test +``` + +`npm test` needs no editor and no device. That is deliberate: the rules live in a +pure TypeScript core with no `cc` import, driven as a deterministic state +machine, so the entire rule set is verifiable in a couple of seconds. The soak +specs play several thousand complete matches and re-check every state invariant +after every single action. + +To see it, open the project in Cocos Creator and press Preview, or build and +serve it — see *Builds* in [docs/TECHNICAL.md](docs/TECHNICAL.md). + +## Layout + +``` +assets/scripts/core/ the rules, the bot — no engine dependency +assets/scripts/modules/ savegame +assets/scripts/app/ bootstrap and services +assets/scripts/ui/ scenes, screens, card rendering +assets/resources/cards/ 36 faces + back, packed into one atlas +art-src/cards/ vector sources for the faces +tests/ vitest specs and the state invariant checker +scripts/ art build and the architecture guard +``` + +## Credits + +Card faces are from **Vector Playing Cards** by **Chris Aguilar**, LGPL-3.0. +Attribution is required by that licence — see +[assets/resources/cards/ATTRIBUTION.md](assets/resources/cards/ATTRIBUTION.md), +which also explains what to change if that licence does not suit the release. diff --git a/docs/PLAN.md b/docs/PLAN.md index e3034c2..4f1520e 100644 --- a/docs/PLAN.md +++ b/docs/PLAN.md @@ -95,8 +95,9 @@ progress. The Cocos layer only renders state and turns taps into actions. - [x] Every component reference in the scene verified populated - [ ] **Blocked:** the build seen running. The browser in this environment falls back to a software renderer that cannot start the engine's main loop -- [ ] Android/iOS build settings (ASTC per ART.md) -- [ ] README +- [x] Android/iOS texture settings written up in TECHNICAL.md (they have to + be applied once in the Inspector; they live in the `.meta` files) +- [x] README ### Known follow-ups diff --git a/docs/TECHNICAL.md b/docs/TECHNICAL.md index 8faf5a6..6d5795b 100644 --- a/docs/TECHNICAL.md +++ b/docs/TECHNICAL.md @@ -224,7 +224,22 @@ second editor instance, so it competes with a running editor for editor, or build from its Build panel. And `startScene` must be passed, or the build has no launch scene and stops on the splash. -Mobile: ASTC textures per [ART.md](ART.md), PNG for web. +### Per-platform texture settings + +[ART.md](ART.md) asks for ASTC on mobile and PNG on the web. Compression is set +per image (or per folder) in the Inspector's texture-compress section, not in +code, so it has to be applied once in the editor and is then stored in the +`.meta` files: + +| Target | Setting | +|---|---| +| `web-mobile` | PNG, as now | +| `android` | ASTC 6×6 for the card atlas, ASTC 4×4 for the UI sprites | +| `ios` | the same ASTC settings; the format is supported on every device the game targets | + +The card atlas is the only texture where this matters — 2048×2048 uncompressed +is 16 MB of video memory, and ASTC 6×6 brings that to roughly 1.2 MB. Do it +before the first device build. ### What is and is not verified