Rounds System¶
Note
These Docs are WIP and will be updated with Visual Blueprint Examples. Please see Class Methods for visual examples.
The GameFuse Rounds System allows you to track and manage game rounds in your game. This includes creating rounds, fetching round data, and managing round metadata.
Getting Started with Rounds¶
To use the GameFuse Rounds system in Blueprints, you'll need to access the GameFuse Rounds subsystem:
Creating a Game Round¶
To create a game round:
- Get the GameFuse Rounds subsystem
- Create a new Game Round structure
- Set properties like Score, Start Time, End Time, and Game Type
- Call CreateGameRound with the round data
- Create a callback function to handle the response
- Process the created round data
Creating a Game Round with Metadata¶
To create a game round with metadata:
- Get the GameFuse Rounds subsystem
- Create a new Game Round structure
- Set basic properties
- Add metadata key-value pairs to the round data
- Call CreateGameRound with the round data
- Create a callback function to handle the response
- Process the created round data and metadata
Creating a Multiplayer Game Round¶
To create a multiplayer game round:
- Get the GameFuse Rounds subsystem
- Create a new Game Round structure
- Set the Game Type to "Multiplayer"
- Add metadata relevant to multiplayer
- Call CreateGameRound with the round data
- Create a callback function to handle the response
- Process the created round data for multiplayer setup
Fetching a Game Round¶
To fetch a specific game round:
- Get the GameFuse Rounds subsystem
- Call FetchGameRound with the round ID
- Create a callback function to handle the response
- Process the round data and metadata
Fetching User Game Rounds¶
To fetch all game rounds for the current user:
- Get the GameFuse Rounds subsystem
- Call FetchUserGameRounds with page number (e.g., 1)
- Create a callback function to handle the response
- Process the array of rounds for display or statistics
Updating a Game Round¶
To update an existing game round:
- Get the GameFuse Rounds subsystem
- First fetch the existing round using FetchGameRound
- In the callback, modify the round data (score, end time, metadata)
- Call UpdateGameRound with the updated round data
- Create a callback function to handle the update response
- Process the updated round result
Deleting a Game Round¶
To delete a game round:
- Get the GameFuse Rounds subsystem
- Call DeleteGameRound with the round ID
- Create a callback function to handle the response
- Process the success or failure of the deletion