Friends & Profile
The demo signs in automatically with an anonymous account. The account is shared across every demo in the showroom, so items and currency you get in one demo carry over to the others. Loading takes a moment. If the frame is too small, open the demo in a new tab.
Overview
Edit your own profile, look up another player by their player id, and send them a friend request or follow them. Once they accept, each of you appears under Your friends; players you follow appear under Players you follow. A profile has three parts: a name everyone sees, text only friends see, and text only followers see.
How to try it
- Under You, fill in Your profile: a name everyone sees, text for your friends, and text for your followers. Then press Save your profile.
- Open this demo in another browser (or a private window) for a second player, and press Copy your id in one of them.
- In the other browser, paste the id under Find a player by their id (Paste an id), press Look them up, then press Send a friend request or Follow.
- The receiving player sees the sender’s name under Friend requests to you and presses Accept or Decline. The sender sees it under Friend requests you sent and can press Cancel.
- After accepting, both players see each other’s name and friend text under Your friends, with Remove to end the friendship. A followed player appears under Players you follow with their follower text, and Unfollow ends the follow.
Profile edits are not announced, so a name the other player changed shows in your lists only once they are read again (at most 15 minutes, or on reload).
GS2 services used
- GS2-Friend: GS2-Friend holds the profile (public, friend-only and follower-only parts), the friend and follow lists, and the friend requests in each direction. Receiving, accepting, rejecting and cancelling a request, and removing a friend, are pushed to the other player as notifications, so their page updates right away.
Use it in GS2 Studio
In GS2 Studio’s Simple mode, open Add features and press Add on Friends & Profile to bring this feature into your own project. To point at the package directly, choose Add from GitHub and enter the package below.
https://github.com/gs2io/gs2-studio-package/tree/main/foundation-social-graph/packages/foundation-social-graph- Owner:
gs2io - Repository:
gs2-studio-package - Subdirectory:
foundation-social-graph/packages/foundation-social-graph