Skip to content

metaversecloud-com/sdk-boilerplate

Repository files navigation

README Template

Please update the following in each of your SDK application.

Introduction / Summary

This boilerplate is meant to give you a simple starting point to build new features in Topia using our Javascript SDK. Please reference the documentation for a more detailed breakdown of what the SDK is capable of and how to use it!

Key Features

Canvas elements & interactions

  • Key Asset: When clicked this asset will open the drawer and allow users and admins to start interacting with the app.

Drawer content

  • How to play instructions
  • Leaderboard
  • Admin features (see below)

Admin features

Does your app have special admin functionality? If so your key features may looks something like this:

  • Access: Click on the key asset to open the drawer and then select the Admin tab. Any changes you make here will only affect this instance of the application and will not impact other instances dropped in this or other worlds.
  • Theme selection: Use the dropdown to select a theme.
  • Reset: Click on the Reset button to clear the active game state and rebuild the game board in it's default state.

Themes description

  • Winter (default): A snowy theme that when selected will drop snowflakes throughout the scene
  • Spring: A garden theme that when selected will drop flowers throughout the scene

Data objects

We use data objects to store information about each implementation of the app per world.

  • Key Asset: the data object attached to the dropped key asset will store information related to this specific implementation of the app and would be deleted if the key asset is removed from world. Example data:
    • isResetInProgress
    • lastInteraction
    • lastPlayerTurn
    • playerCount
    • resetCount
    • turnCount
  • World: the data object attached to the world will store analytics information for every instance of the app in a given world by keyAssetId and will persist even if a specific instance is removed from world. Example data:
    • gamesPlayedByUser (keyAssets.${assetId}.gamesPlayedByUser.${profileId}.count)
    • gamesWonByUser (keyAssets.${keyAssetId}.gamesWonByUser.${profileId}.count)
    • totalGamesResetCount (keyAssets.${assetId}.totalGamesResetCount)
    • totalGamesWonCount (keyAssets.${assetId}.totalGamesWonCount)

Developers:

Getting Started

  • Clone this repository
  • Run npm i in server
  • cd client
  • Run npm i in client
  • cd .. back to server

Add your .env environmental variables

API_KEY=xxxxxxxxxxxxx
INSTANCE_DOMAIN=api.topia.io
INSTANCE_PROTOCOL=https
INTERACTIVE_KEY=xxxxxxxxxxxxx
INTERACTIVE_SECRET=xxxxxxxxxxxxxx

Where to find API_KEY, INTERACTIVE_KEY and INTERACTIVE_SECRET

Topia Dev Account Dashboard

Topia Production Account Dashboard

Helpful links

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages