ゲーム標準イベント
Overview
A game standard event is a type of custom telemetry that has a predefined structure with associated formats and properties that are ready to use directly from the game SDK. It enables you to see player progression, rewards, and resources directly within AccelByte Gaming Services (AGS) dashboards.
This event is associated with your game titles. It should be used for title-specific information, such as players' mission status, level information, weapon pickups, death reasons, etc. Developers must call event functions and instruments corresponding to your game design.
Resource events
Use a resource event to track when players gain (source) or lose (sink) resources like in-game currencies, in-game resources, in-game lives, and in-game items or weapons.
A source is when a player gains or earns a resource, sink is when a player loses or spends a resource.
Event | Attribute |
resource_Sourced |
|
resource_Sinked |
|
resource_Upgraded |
|
resource_Actioned |
|
Progression events
Use a progression event to track when players start and finish levels, missions, quests, or similar objective-based gameplay to indicate a player's path or place in the game.
This event can also relate to upgrading characters or buildings. If this is something that frequently occurs, it may be wise to aggregate or only send on specific progression milestones.
Event | Attribute |
quest_Started |
|
quest_Ended |
|
player_Leveled |
|
player_Dead |
|
Reward events
Use a reward event to track player levels or quest rewards, daily bonuses, friend gifts or seasonal gifts.
Send multiple reward events if there are several things bundled in the reward.
Event | Attribute |
reward_Collected |
|
Send Game Standard Events using the Game SDK
The AccelByte Game SDK supports sending Game Standard Events out of the box in a very simple way. There is a list of functions available that can be called with the appropriate payloads for each of the events listed above. The following code snippet shows an example of how to use this feature.
- Unreal
- Unity
int32 LocalUserNum = 0;
const FOnlineGameStandardEventInterfacePtr GameStandardEventInterface = AccelByteSubsystem->GetGameStandardEventInterface();
auto Model = FAccelByteModelsRewardCollectedEventPayload{};
Model.RewardName = TEXT("Quest Reward");
Model.RewardType = TEXT("Gold");
Model.RewardAmount = TEXT("100");
GameStandardEventInterface->SendRewardCollectedEvent(LocalUserNum, Model);
var gameStandardAnalyticsService = AccelByte.Core.AccelByteSDK.GetClientRegistry().GetGameStandardEvents();
var model = new AccelByte.Models.RewardCollectedEventPayload()
{
RewardName = "Quest Reward",
RewardType = "Gold",
RewardAmount = "100"
};
gameStandardAnalyticsService.SendRewardCollectedEvent(model);
The event will be sent as a batch after a set amount of time. To send the batch without waiting for the interval, use SendTelemetryBatch
:
AccelByte.Core.ResultCallback cb = (result) =>
{
if (result.IsError)
{
// Do something if Send Event has an error
Debug.Log($"Error Send, Error Code: {result.Error.Code} Error Message: {result.Error.Message}");
return;
}
// Do something if Send Event has been successful
};
gameStandardAnalyticsService.SendTelemetryBatch(cb);
Similarly, each of the events can be called with the functions as listed below:
- SendResourceSourcedEvent(ResourceSourcedEventPayload)
- SendResourceSinkedEvent(ResourceSinkedEventPayload)
- SendResourceUpgradedEvent(ResourceUpgradedEventPayload)
- SendResourceActionedEvent(ResourceActionedEventPayload)
- SendQuestStartedEvent(QuestStartedEventPayload)
- SendQuestEndedEvent(QuestEndedEventPayload)
- SendPlayerLeveledEvent(PlayerLeveledEventPayload)
- SendPlayerDeadEvent(PlayerDeadEventPayload)
- SendRewardCollectedEvent(RewardCollectedEventPayload)