Skip to content

PlayFab demo game showcasing Economy v2, Azure Functions, and more

License

Notifications You must be signed in to change notification settings

PlayFab/winter-starfall

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Winter Starfall

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.

Website

Prerequisites

Setup

  1. Clone this repository
    git clone https://github.com/PlayFab/winter-starfall.git
  2. In VS Code, select File > Open Folder
  3. Select the /website folder
  4. Choose to install all recommended extensions
  5. Select Terminal > New Terminal
  6. Run npm install to install all dependencies

Running the site

  1. In the /website folder, run npm run dev to start the site
  2. Click on the link it offers (should be localhost:5173) to view the site

Building the site

  1. In the /website folder, run npm run build to build the site
  2. The output will be in the /website/dist folder

Azure functions

Azure Functions in C# are available in the /azure-functions folder. You can run these locally or deploy the project to Azure.

Credentials

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:

  1. In the Azure Portal, click the Cloud Shell button near the top right
  2. 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
  3. Paste that command in the terminal and press Enter
  4. It will return a JSON object for use in step 8
  5. In GitHub, go to Settings > Secrets and variables > Actions
  6. Create a Repository secret
  7. Name: AZURE_CREDENTIALS
  8. Secret: (paste the JSON from step 4)
  9. Click Add secret

Social logins

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.

Contact