Game ideas & features

Your next feature

Groups

Guilds, clans and teams with roles for the selected project.

SDK developRequires a player session
Godot
Illustration of Groups
Your visible result

After timeout or conflict, retain the original intent and read current state. Never automatically retry using a new revision.

Video coming later

This step does not have a video yet. The guide and MCP request are ready to use.

Groups

Prepare the same project

  1. Choose the same project in the dashboard as in your game configuration.

    Groups →
  2. No additional definition is needed for the first request. An empty result is valid until matching game data exists.

    Groups are created and managed in the game.

    This first example reads data. It creates no group, match or object. An empty list is a valid first response.

Build this feature

You can preview the guide. Running it requires an active project key. Prepare project

SDK installed, project configuration imported and player signed in.

This SDK example uses develop. Check whether the required APIs exist in your installed SDK.

Complete the Quickstart connection with the intended player. Call read_my_groups() from an explicit button or scene action. Opening the file alone sends no request.

GDScript
res://scripts/groups.gd
horizOn call
1extends Node
2​
3# Restore the existing matching player and connect in the Quickstart first.
4# Invoke explicitly from a player action, not from a poll or page loop.
5func read_my_groups() -> void:
6 var user = Horizon.auth.getCurrentUser()
7 if user == null:
8 return
9 var result = await Horizon.groups.getGroups(user.userId)
10 if not result.success:
11 push_warning(result.errorCode)
12 return
13 print("Player revision: ", result.data.revision)
14 for group in result.data.groups:
15 print(group.id, " ", group.myRole, " revision=", group.revision)
16 # result.data.limits contains all current limits; retained groups are not truncated.
17 # getMembers(userId, groupId, "", 1) reads one page. Keep its revision/cursor.
18 # Restart explicitly on a changed revision; optional createdAt is not epoch zero.
19# Full durable mutations: addons/horizon_sdk/examples/features/groups_example.gd.
20# Keep the original revision/requestId; unknown create requires explicit reconciliation.
Open the complete SDK sample ↗

Test your new feature.

After timeout or conflict, retain the original intent and read current state. Never automatically retry using a new revision.

Choose the same project in the dashboard as in your game configuration.

Endpoints
  • GET/groups
  • GET/groups/{groupId}
  • GET/groups/{groupId}/members
  • GET/groups/{groupId}/pending
  • POST/groups
  • PUT/groups/{groupId}
  • POST/groups/{groupId}/join
  • POST/groups/{groupId}/request
  • POST/groups/{groupId}/invite
  • POST/groups/{groupId}/accept-invite
  • POST/groups/{groupId}/decline-invite
  • POST/groups/{groupId}/cancel-invite
  • POST/groups/{groupId}/accept-request
  • POST/groups/{groupId}/decline-request
  • POST/groups/{groupId}/cancel-request
  • POST/groups/{groupId}/leave
  • POST/groups/{groupId}/remove
  • POST/groups/{groupId}/role
  • POST/groups/{groupId}/transfer
  • POST/groups/{groupId}/delete
All endpoints in the API reference
Our suggestion for your next step

Give every round a high score.

Save the score after a round and show who's ahead. Keep using your connection and player session.