This is a 2D game created with the Godot game engine, demonstrating the implementation of A/B tests using ConfigCat for feature flag management and Amplitude for analytics.
The game features two distinct chest collecting variants based on the feature flag value:
- Variant A: Players must stand in front of the chest for 4 seconds to collect it.
- Variant B: Players must stand in front of the chest and press the 'Q' key three times to collect it.
Once the collection is successfully performed, the event is logged to Amplitude.
To run the project, ensure you have the following:
- your GPU drivers are up to date.
- .NET6 or higher
- Godot v4.0.3 engine with .NET and Mono support.
- ConfigCat account for feature flag management.
- Amplitude account for analytics.
-
Clone this repository to your local machine.
-
Open the
project.godot
file using the Godot importer. -
Locate the
AmplitudeAnalytics.cs
andConfigCatService.cs
files in the/globals
folder. Open these files with your code editor and replace the placeholder keys with your own keys. -
In the
ConfigCatService.cs
make sure to match the flag name exactly as it set in ConfigCat's dashboard. -
Return to the game engine and click the
Play
button to run the game. -
Collect the chests in the game to generate Amplitude data.
-
Create a chart on Amplitude and add the
OnTap Chests Collected
andOnTimer Chests Collected
events to analyze the results.
ConfigCat also supports many other frameworks and languages. Check out the full list of supported SDKs here.
You can also explore other code samples for various languages, frameworks, and topics here in the ConfigCat labs on GitHub.
Keep up with ConfigCat on Twitter, Facebook, LinkedIn, and GitHub.
Contributions are welcome!