engines/stage-tamagotchi-godot/README.md
@proj-airi/stage-tamagotchi-godotGodot-native desktop stage runtime project for stage-tamagotchi.
stage-tamagotchi.scenes/: Godot scene files such as the current stage root.scripts/: C# runtime scripts attached to Godot nodes.assets/: Imported models, textures, materials, and other runtime assets.addons/: Godot plugins, editor/runtime add-ons, or vendored third-party Godot extensions.pnpm -F @proj-airi/stage-tamagotchi-godot buildpnpm -F @proj-airi/stage-tamagotchi-godot typecheckBoth commands currently run dotnet build against the Godot-generated C# project file.
The Electron development app does not export this project on every dev run. When Godot Stage is started from the Tamagotchi settings page, Electron main starts a local WebSocket bridge and launches a local Godot engine against this project:
godot --path ./engines/stage-tamagotchi-godot -- --airi-ws-url=<runtime-url>
Set GODOT4 before starting the Electron development app. Dev mode requires an
explicit Godot executable path and does not auto-discover local installations.
PowerShell:
$env:GODOT4 = "C:\Path\To\Godot_v4.x-stable_mono_win64.exe"
pnpm dev:tamagotchi
macOS / Linux:
GODOT4="/path/to/godot" pnpm dev:tamagotchi
With GodotEnv:
GODOT4="$(godotenv godot env path)" pnpm dev:tamagotchi
Keep machine-specific Godot paths outside the repository. The current Electron
main service reads process.env.GODOT4, so the shell or local development
environment must provide it before starting pnpm dev:tamagotchi.
Export presets produce the sidecar runtime that Electron packages for release:
godot --headless --export-release "Windows Desktop" build/win/godot-stage.exe
godot --headless --export-release "Linux" build/linux/godot-stage
godot --headless --export-release "macOS" build/mac/godot-stage.app
The output directories intentionally match electron-builder's ${os} names:
build/winbuild/linuxbuild/macapps/stage-tamagotchi/electron-builder.config.ts copies the matching directory
into resources/godot-stage via extraResources. To inspect an unpacked
Electron build locally, run:
pnpm -F @proj-airi/stage-tamagotchi run build:unpack
Recommended to use GodotEnv to manage Godot versions.
You can use the command below to set current Godot version for this project:
godotenv godot use 4.6.2
Then run the Godot editor with the current project:
"$(godotenv godot env path)" ./engines/stage-tamagotchi-godot/project.godot
You can also run the game directly from the command line:
"$(godotenv godot env path)" --path ./engines/stage-tamagotchi-godot