{"id":13799552,"url":"https://github.com/actions-on-google-labs/dialogflow-spellcast-nodejs","last_synced_at":"2025-05-13T08:31:30.529Z","repository":{"id":130822673,"uuid":"220290502","full_name":"actions-on-google-labs/dialogflow-spellcast-nodejs","owner":"actions-on-google-labs","description":"Experimental Interactive Canvas game for the Google Assistant.","archived":true,"fork":false,"pushed_at":"2019-11-07T21:38:23.000Z","size":2870,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-18T14:58:51.491Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/actions-on-google-labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-11-07T17:17:18.000Z","updated_at":"2024-03-01T00:59:59.000Z","dependencies_parsed_at":"2023-05-18T19:30:57.942Z","dependency_job_id":null,"html_url":"https://github.com/actions-on-google-labs/dialogflow-spellcast-nodejs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions-on-google-labs%2Fdialogflow-spellcast-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions-on-google-labs%2Fdialogflow-spellcast-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions-on-google-labs%2Fdialogflow-spellcast-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions-on-google-labs%2Fdialogflow-spellcast-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/actions-on-google-labs","download_url":"https://codeload.github.com/actions-on-google-labs/dialogflow-spellcast-nodejs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253903742,"owners_count":21981744,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T00:01:03.928Z","updated_at":"2025-05-13T08:31:30.076Z","avatar_url":"https://github.com/actions-on-google-labs.png","language":"JavaScript","funding_links":[],"categories":["Open source code"],"sub_categories":[],"readme":"# Actions on Google: Spellcast\n\n**NOTE**\n\nThis is an experimental project and will receive minimal maintenance. Only bugs for security issues will be accepted. No feature requests will be accepted. Pull requests will be acknowledged and reviewed as soon as possible. There is no associated SLAs.\n\nSome of the projects in this experimental org might mature to a more stable state and move into the main [Actions on Google GitHub org](https://github.com/actions-on-google).\n\n---\n![Spellcast Game](/public/assets/screenshot.png?raw=true \"Spellcast Game\")\n\nIn this game your wizards cast spells to defeat monsters. To play the game, select the element opposite of the monster to damage it. Water versus fire, and earth versus air. Select a shield or heal to protect the wizards.\n\nThis sample demonstrates how to create an [Interactive Canvas](https://developers.google.com/actions/canvas/) experience using Actions on Google for the Google Assistant. It uses the [Node.js client library](https://github.com/actions-on-google/actions-on-google-nodejs) and is deployed on [Cloud Functions for Firebase](https://firebase.google.com/docs/functions/) and [Firebase Hosting](https://firebase.google.com/docs/hosting).\n\n## Background\n\nThis game was originally developed for [chromecast](https://developers.google.com/cast) devices. The game was designed to be played with multiple players, each using a mobile phone as a controller.\n\nEven though the game is quite simple, the code has a good design for managing players, resources and game states would could be reused for multi-player Interactive Canvas games.\n\nThis version of the game only supports a single player and uses some of the testing capabilities in the game to control all of the game characters using voice commands. The  screen layout has been designed for smart displays.\n\n## Setup Instructions\n\n### Prerequisites\n\n1. Node.js and NPM\n   - We recommend installing using [nvm for Linux/Mac](https://github.com/creationix/nvm) and [nvm-windows for Windows](https://github.com/coreybutler/nvm-windows)\n2. Install the [Firebase CLI](https://developers.google.com/actions/dialogflow/deploy-fulfillment)\n   - We recommend using MAJOR version `7` with `7.1.1` or above, `npm install -g firebase-tools@^7.1.1`\n   - Run `firebase login` with your Google account\n\n### Configuration\n\n#### Actions Console\n\n1. From the [Actions on Google Console](https://console.actions.google.com/), add a new project \u003e **Create Project** \u003e under **More options** \u003e **Conversational**\n1. Click **Deploy** in the top menu. Then, click **Additional information**.\n   1. Under **Category**, select **Games \u0026 fun**\n   1. Under **Interactive Canvas** _Do your Actions use Interactive Canvas?_, check **Yes**\n1. Click **Develop** in the top menu. Then, click **Actions** \u003e **Add Your First Action** \u003e **Play game** \u003e **GET STARTED IN DIALOGFLOW** (this will bring you to the Dialogflow console) \u003e Select language and time zone \u003e **CREATE**.\n1. In the Dialogflow console, go to **Settings** ⚙ \u003e **Export and Import** \u003e **Restore from zip** using the `agent.zip` in this sample's directory.\n\n#### Firebase Deployment\n\n1. On your local machine, in the `functions` directory, run `npm install`\n   1. Note that when creating a new project for Interactive Canvas, you must install the `actions-on-google` library **Developer Preview** version using the `@preview` tag with `npm install actions-on-google@preview`.\n1. Run `firebase deploy --project {PROJECT_ID}` to deploy the function and hosting\n   - To find your **Project ID**: In [Dialogflow console](https://console.dialogflow.com/) under **Settings** ⚙ \u003e **General** tab \u003e **Project ID**.\n\n#### Dialogflow Console\n\n1. Return to the [Dialogflow Console](https://console.dialogflow.com) \u003e select **Fulfillment** \u003e **Enable** Webhook \u003e Set **URL** to the **Function URL** that was returned after the deploy command \u003e **SAVE**.\n   ```\n   https://${REGION}-${PROJECT_ID}.cloudfunctions.net/dialogflowFirebaseFulfillment\n   ```\n1. From the left navigation menu, click **Integrations** \u003e **Integration Settings** under Google Assistant \u003e Enable **Auto-preview changes** \u003e **Test** to open the Actions on Google simulator then say or type `Talk to my test app`.\n\n### Running this Sample\n\n- You can test your Action on any Interactive Canvas [supported devices](https://developers.google.com/actions/interactivecanvas/#supported_devices) on which the Assistant is signed into the same account used to create this project. Just say or type, “OK Google, talk to my test app”.\n- You can also use the Actions on Google Console simulator to test most features and preview on-device behavior.\n- In the simulator, you have to click on the canvas iframe to enable audio playback of the game sounds.\n\n## References \u0026 Issues\n\n- Questions? Go to [StackOverflow](https://stackoverflow.com/questions/tagged/actions-on-google), [Assistant Developer Community on Reddit](https://www.reddit.com/r/GoogleAssistantDev/) or [Support](https://developers.google.com/actions/support/).\n- For bugs, please report an issue on Github.\n- Actions on Google [Interactive Canvas Documentation](https://developers.google.com/actions/canvas/)\n- Actions on Google [Documentation](https://developers.google.com/actions/extending-the-assistant)\n- Actions on Google [Codelabs](https://codelabs.developers.google.com/?cat=Assistant)\n- [Webhook Boilerplate Template](https://github.com/actions-on-google/dialogflow-webhook-boilerplate-nodejs) for Actions on Google\n\n## Make Contributions\n\nPlease read and follow the steps in the [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## License\n\nSee [LICENSE](LICENSE).\n\n## Terms\n\nYour use of this sample is subject to, and by using or downloading the sample files you agree to comply with, the [Google APIs Terms of Service](https://developers.google.com/terms/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factions-on-google-labs%2Fdialogflow-spellcast-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Factions-on-google-labs%2Fdialogflow-spellcast-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factions-on-google-labs%2Fdialogflow-spellcast-nodejs/lists"}