AIventure
AIventure shows how to adapt an existing Angular + Phaser game to Vifu without rewriting the whole project.
Open The Example
bash
git clone --recurse-submodules https://github.com/vifu-labs/vifu-examples
cd vifu-examples/02_external_ai_games/aiventure
npm installWhat It Uses
AIventure is a bundled Angular project with Phaser gameplay:
npm run buildbuilds the browser artifact.dist/template-angular/browseris the deploy output.index.htmlis the runtime entry inside that output.- Vifu AI is enabled for NPC dialogue and game tools.
- Visible NPC/game interactions are passed as executable tools to
vifu.ai.generateText(...). - The active Mind is chosen by the Vifu host/session, so the game does not need to hardcode provider or Mind ids.
- Direct external AI calls are replaced by the Vifu SDK.
The manifest stays small. Vifu infers the Angular build command, output directory, runtime entry, SDK bridge, and available AI features from the project and SDK calls.
json
{
"name": "AIventure"
}Use the manifest reference only when a project needs to override detected defaults or disable a platform feature.
Deploy It
bash
vifu deployThe deploy check blocks remote executable code and direct browser calls to external AI providers. Keep model calls behind vifu.ai.generateText(...) or vifu.run(...) so the game uses the platform AI service.