- Python 46.3%
- Emacs Lisp 44%
- GDScript 5%
- JavaScript 3.7%
- Makefile 0.9%
|
Some checks failed
Repository structure / structure (push) Has been cancelled
Archive installations had no way to install OpenSpiel: the remedy for a missing runtime was a make target that needs a source checkout, so an archive-installed Xiangqi or Solitaire could not start at all. Ship native/openspiel/install-openspiel.py and expose it as M-x etaf-gamekit-install-openspiel. The script builds a private cache environment with any Python 3.11+ on PATH (or the interpreter the command asks for), installs the pinned release from requirements.txt, imports it to verify the version, and replaces an existing environment only after the new one works. Setup reports through *ETAF engine install* like the Godot install, and make engine-openspiel now delegates to the same script instead of repeating the venv commands. A missing runtime names the new command rather than make. Xiangqi and Solitaire now check the configured program and print the same command in their doctor, and their README prerequisites match. Validation: make check passes in etaf-gamekit (structure, byte compilation, 22 of 22 acceptance scenarios, 15 tool tests, 23 API declarations) and in etaf-xiangqi (19 scenarios) and etaf-solitaire (7 scenarios). The installed environment reports OpenSpiel 2.0.2 through bridge.py --list/--version, and an etaf-xiangqi session reached status ready in the running Emacs. |
||
|---|---|---|
| .githooks | ||
| .github/workflows | ||
| benchmarks | ||
| docs | ||
| lisp | ||
| native | ||
| scripts | ||
| tests | ||
| .editorconfig | ||
| .gitignore | ||
| CHANGELOG.md | ||
| etaf-gamekit.el | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
etaf-gamekit
A framework for building games with native ETAF interfaces. A game project owns its rules, assets, presentation and launch command. GameKit provides game definitions, independent running instances, state publication, actions, lifecycle management and backend adapters.
The core depends on ETAF. It contains no game application and does not load the game applications or etaf-ui. Applications choose their own catalog components.
Included adapters connect games to Godot, boardgame.io and OpenSpiel. A game's definition selects its backend; applications start a game definition:
(require 'etaf-gamekit)
(etaf-gamekit-define-game my-poker
:title "My Poker"
:backend 'openspiel
:options '(:game "kuhn_poker" :player 0 :seed 42)
:view (lambda (instance)
(etaf-view
(text (expr (or (etaf-gamekit-view instance :information_state)
"Starting game…"))))))
(let ((instance (etaf-gamekit-start my-poker)))
(display-buffer (etaf-gamekit-buffer instance)))
Requires Emacs 29.1+ and ETAF with its dependencies on load-path. Install the
backend used by your game from the package itself, which writes only under
~/.cache/emacs-taf/game-engines:
| Backend | Installation | Runtime |
|---|---|---|
| Godot | M-x etaf-gamekit-install-godot |
Pinned Godot 4.7.2; macOS or Linux x86-64/arm64 |
| OpenSpiel | M-x etaf-gamekit-install-openspiel |
Pinned OpenSpiel 2.0.2; Python 3.11+ |
| boardgame.io | make engine-boardgame-io |
Node.js 18+; pinned boardgame.io 0.50.2 |
A source checkout can run the same setup with make engine and
make engine-openspiel.
The manual explains how to create a separate game project, configure a backend, compose a frontend, manage instances and add an adapter. The package entry is the supported API inventory; architecture explains responsibilities and engine choices.
Game applications are independently maintained as sibling checkouts in the
workspace. For example, etaf-solitaire uses OpenSpiel and etaf-salvage uses Godot; each
owns its entry, interface, rules configuration, resources and checks. Install
and launch a game through its own package, not through a framework launcher.
For framework development, install all three backends with
make engine-all GAMEKIT_PYTHON=python3.11, then run make check.
License
GPL-3.0-or-later; see LICENSE.