feat: add ATL animation timelines and try/raise to the Ren'Py player

Python sandbox
- try/except/else/finally, raise (incl. re-raise), assert, for/while ... else
- Multi-generator and dict comprehensions
- Builtin exception hierarchy; user exceptions subclass it
- Inside try, missing keys/indexes, division by zero, attribute access on None
  and unknown names raise Python exceptions; lookups stay lenient elsewhere
- int()/float() raise ValueError on non-numeric strings

ATL
- converter/atl.py: set/move (linear, ease, easein, easeout), pause, repeat,
  parallel, choice, block, on show/hide and named transforms become a timeline
  shipped as game.json "atl"; Move() becomes a linear slide
- player/atl.ts: timeline runner wired into the renderer; `on hide` plays
  before the picture is removed
- function, time, contains, matrixcolor and expressions still block the import

Tests: exceptions/ATL fixtures and runtime tests, converter ATL tests; README
and ARCHITECTURE updated.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
mrleo1nidandClaude Sonnet 5.5 committed 2026-10-25 12:11:07 +03:00
1 parent 962595c925
commit ff82d882c0
18 files changed
+1050 -53

No files matched your search

+11 -3
View File
@@ -119,8 +119,16 @@ python -m tests.make_sample sample.zip # тестовая игра (из ba
Для Naninovel/Tomie см. [docs/IMPORT.md](docs/IMPORT.md).
Python игры выполняется в песочнице плеера: свои `def` и `class` (наследование,
`super()`, свойства, замыкания, `lambda`, `*args`/`**kwargs`), `try`/`except`/
`finally`, `raise`, `assert`, `for`/`while … else`, comprehension. ATL: движение
(`linear`/`ease`/`easein`/`easeout`), `pause`, `repeat`, `parallel`, `choice`,
`block`, `on show`/`on hide`, вызов других transform.
Пока **не** поддерживается: `screen`-язык (кастомные экраны, карты,
мини-игры), движение и твины в ATL, функции/классы в `python` и картинки,
которые игра вычисляет своими функциями. Такие места перечислены в отчёте
конвертации у версии. Игры-«песочницы», где навигация построена на экранах,
мини-игры), в ATL — `function`, `time`, `contains`, `matrixcolor` и шейдеры,
в Python — специальные методы кроме `__init__`/`__str__`/`__repr__`, генераторы,
`with`, системные модули (`os`, `socket`, …) и картинки, которые игра вычисляет
своими функциями. Такие места перечислены в отчёте конвертации у версии и
останавливают импорт. Игры-«песочницы», где навигация построена на экранах,
пока не играбельны.