Virtual Pet is a captivating mini-game developed using React and Node.js, allowing users to adopt, care for, and interact with their virtual pets. This game fosters a community environment where users can see others' pets, contributing to a dynamic social interaction.
- Pet Selection: Choose from a variety of pets.
- Pet Care: Engage in daily activities like feeding, playing, and training.
- Growth System: Watch your pet evolve through different stages.
- Persistence: Continue your care with saved user progress.
- Social Interaction: See and interact with other users' pets.
Users interact with pets through a series of actions such as eat, sleep, play, and train, each having specific cooldowns and experience gains.
Admins have the capability to pick up all pets in the world, enhancing the game's management and interaction dynamics.
Admins can manage pets, including picking up all pets within the game environment for maintenance or moderation purposes.
The app caches inventory data for 6 hours. To manually bypass this cache and force a refresh:
- Open the app by clicking on the key asset in the world.
- Right-click inside the drawer and select Inspect to open DevTools.
- Find the
<iframe>element and locate itssrcattribute. - Append
&forceRefreshInventory=trueto the end of the URL. - Press Enter to reload the iframe with the updated URL.
N/A
The app uses the following unique names to identify and manage dropped assets:
| Unique Name | Description |
|---|---|
virtualPetKeyAsset |
Key asset used to locate the app's entry point in the world |
petSystem-{username} |
Pet assets spawned per user (used for cleanup via partial match) |
- Pet States: Each pet has states that evolve through interaction, saved in the user's session.
- Action Cooldowns and Experience Gains: Defined by environmental variables and affecting pet growth.
Create a .env file in the root directory. See .env-example for a template.
| Variable | Description | Required |
|---|---|---|
NODE_ENV |
Node environment | No |
SKIP_PREFLIGHT_CHECK |
Skip CRA preflight check | No |
IS_LOCALHOST |
Flag to indicate local development environment | No |
INSTANCE_DOMAIN |
Topia API domain (api.topia.io for production, api-stage.topia.io for staging) |
Yes |
INTERACTIVE_KEY |
Topia interactive app key | Yes |
INTERACTIVE_SECRET |
Topia interactive app secret | Yes |
Clone the repository and ensure Node version 18 or higher is installed.
-
Install dependencies
npm install -
Start the server
npm start
-
Start Server
npm start -
Start Client
cd client && npm start -
Visit
http://localhost:3001and start your quiz experience!
Refer to the .env-example file for necessary environment variables.
Topia Production Account Dashboard
Refer to the Notion guide for detailed instructions on interacting with the game.
Admins can pick up all pets in the game world, aiding in game moderation and pet management.
Interact with the kennel to select a pet and perform actions such as eating, sleeping, playing, and training to care for your pet.
Assets:
Access game assets here for scene creation within the MC Ecosystem.
No specific requirements for scene saving or key verification.
App mechanics include cooldowns and experience gains for pet actions, influencing pet growth and interaction.
Ensure pets evolve correctly, animations function, and admin controls work as expected.