This is an Azure PlayFab demo game showcasing Economy v2, Azure Functions, and more.
Play this game at winterstarfall.com.
If you have a free PlayFab developer account, you can view this title in Game Manager.
To use a Microsoft or Google account, play Winter Starfall at winterstarfall-unofficial.com.
- Node JS (v20 or higher)
- Visual Studio Code (optional)
- Clone this repository
git clone https://github.com/PlayFab/winter-starfall.git
- In VS Code, select File > Open Folder
- Select the
/website
folder - Choose to install all recommended extensions
- Select Terminal > New Terminal
- Run
npm install
to install all dependencies
- In the
/website
folder, runnpm run dev
to start the site - Click on the link it offers (should be
localhost:5173
) to view the site
- In the
/website
folder, runnpm run build
to build the site - The output will be in the
/website/dist
folder
Azure Functions in C# are available in the /azure-functions
folder. You can run these locally or deploy the project to Azure.
This project builds and deploys itself to an Azure Blob Storage account via GitHub Actions in .github/workflows/main.yml
. If you'd like to do the same:
- In the Azure Portal, click the Cloud Shell button near the top right
- Modify the command below with your subscription ID and resource name
az ad sp create-for-rbac --name "winter-starfall-github" --role contributor --scopes /subscriptions/YOUR_SUBSCRIPTION_ID/resourceGroups/YOUR_RESOURCE_GROUP_NAME --json-auth
- Paste that command in the terminal and press
Enter
- It will return a JSON object for use in step 8
- In GitHub, go to Settings > Secrets and variables > Actions
- Create a Repository secret
- Name:
AZURE_CREDENTIALS
- Secret: (paste the JSON from step 4)
- Click Add secret
This game allows players to sign in using Microsoft, Google, and Facebook accounts.
To enable these logins, you will need to create apps with each provider and set up the appropriate credentials in PlayFab Game Manager.
Then modify website\src\main.tsx
with the appropriate client IDs.
- Microsoft: Single-page application: App registration
- Google: Integrating Google Sign-In into your web app
- Facebook: Facebook Login for the Web with the JavaScript SDK
- Email: Jordan Roher
- Discord: PlayFab Community