Events
Last updated
Last updated
Events in Specter capture player activities within games. They are logged either via Specter's standard APIs or through custom inputs in the Events API
Specter harnesses an event-driven architecture, integral to enhancing player engagement and enriching game analytics. This system forms the cornerstone of Specter's player engagement strategies, particularly the achievements module. By tracking player actions, behaviours, and experiences in real-time, developers can understand their audience better and craft immersive in-game tasks and objectives that offer meaningful rewards.
This robust tracking underpins the granular task definitions in the achievements system. When a player achieves a task, it's often the result of a series of actions or events. By dissecting these actions into traceable events, Specter ensures that every accomplishment feels rewarding and is grounded in tangible player activity.
Specter Events: These events generally correspond directly to specific Specter APIs. Whenever a game triggers one of these default APIs, Specter automatically logs the event, ensuring a real-time snapshot of game activities.
Example: Let's consider the equip inventory item
action in popular MMORPGs like "World of Warcraft." When a player obtains a powerful item, say the Blade of Eternal Light
, and chooses to equip it, Specter's API swiftly registers this action. This act of arming oneself with the legendary blade is then logged as a distinct event, capturing both the action and its in-game significance.
For some use cases, events are logged internally in Specter without the need for a direct API call. This happens when certain processes are automated at the server level without any intervention from the client.
Custom Events: Not every game action might align with Specter's standard APIs. For scenarios like these, Specter offers Custom Events that can be used in conjunction with the Events API.
Example: An apt example is the classic "Pac-Man" where players pick up dots
. This action doesn't align with a default Specter API. Developers can, however, register such an action using the Event API to ensure that every nuance of the game is trackable.
You may want to check out:
Parameters are attached to both Specter and Custom Events to provide detailed context about each activity. These can be broadly categorized into:
Backend Parameters: Inherent to an API, such as "Match ID" or "Player Lat-Long". These are automatically included with Specter Events but can also be manually added to Custom Events for enriched data logging.
Frontend Parameters: Developer-defined parameters that add game-specific context to events. These custom parameters allow for a more nuanced understanding of in-game actions and their implications.
The power lies in the simplicity of adding context through parameters to both predefined and custom events, ensuring every significant action within the game is trackable and meaningful.
By utilizing event parameters, developers can effectively:
Trigger complex functionalities based on specific game activities.
Enhance player engagement through detailed tracking and personalized experiences.
Drive game analytics and achievements by capturing a wide array of player behaviors and milestones.
In Specter, we categorise data into two main buckets: "States" and "Statistics". Both can be derived from event parameters or from Specter's accumulated player insights.
States: States signify the current status of a player or an item. Let's consider the RPG "Skyrim." A player's state could be Werewolf
or Vampire
, denoting unique abilities and challenges.
States are often binary or categorical.
Statistics: These are numerical data points tracing player activities. In a game like "Apex Legends," a statistic might track the number of kills
a player achieves.
Statistics are stored with historical data, aiding in detailed analytics, populating leaderboards, or defining progression systems.
Tasks in the achievements system rely heavily on events. While crafting a task, the user selects an event which serves as the trigger for task evaluation.
The parameters that determine the conditions and benchmarks required for a task's completion are known as Task Parameters.
Task Parameters can be sourced from two main areas:
Event Parameters: These are the backend and frontend parameters associated with events. For instance, when a "Match End" event is triggered, we could have default parameters like "Match ID" and custom parameters like "Kills".
Specter Presets: This includes the statistics and states Specter maintains, derived from accumulated player data and computations over time. Examples include "Total matches played" or "Player's current level".
A distinctive feature of Task Parameters is their flexibility. A developer can incorporate any combination of the event parameters and/or Specter's derived knowledge to craft the task's rules.
Example: In "PlayerUnknown's Battlegrounds," a task might be defined as:
Task: Eliminate 5 opponents in a single match named Verdant Vanguard while wearing a green shirt.
Here's how this breaks down:
Event Triggered: Match End Event
Task Parameters:
Match ID = 12345 (unique identifier for "Verdant Vanguard")
Kills = 5
Equipped Item = Green Shirt
In the provided example, the "Match ID" is a default event parameter, "Kills" is a custom parameter added to the "Match End API", and the "Equipped Item" is recognised by Specter based on the player's current equipment status.
Alternately, you could have added "Item id" as a parameter for the event and sent Green Shirt
to Specter through the API.
When creating the rules for evaluating the event , developers can specify whether statistical parameters should be evaluated as:
One Shot: The value is evaluated based on a single instance of the event.
Cumulative: The value is accumulated over multiple instances.
We will go over this in more detail in the Event Rule Engine section under Tasks.
Developers can craft intricate conditions using these parameters, ensuring tasks are both challenging and reflective of in-game activity.
You may want to check out
The magic of the event-driven system isn't just in tracking; it's about harnessing the data for enhanced game experiences:
Creating Player Profiles: With statistics and states, developers get a comprehensive view of each player's journey, preferences, and skills. This data-rich profile aids in personalised game experiences.
Analytics: Dive deep into player behaviour, predict trends, and refine gameplay mechanics.
Leaderboards and Progression: Use statistics to rank players or set criteria for game progression, ensuring players always have new milestones to chase.
In conclusion, Specter's event-driven system is more than a tracking tool. It's a dynamic, real-time pulse on player behaviour, and a powerful resource for developers to craft rewarding, immersive game experiences.