Create a space-mode
feature flag
Next you will create a new feature flag called Space Mode. This flag enables the new space-themed sprites, converting the game from T-Rex Runner to Toggle Runner.
You can create and modify feature flags from the LaunchDarkly dashboard. To learn more, read The dashboard.
To create a feature flag:
-
Click Feature flags in the left panel.
-
Click + Flag.
-
Enter a unique, human-readable Name. For this tutorial, name your flag
Space Mode
. -
A suggested flag key auto-populates from the name you enter. This flag key is referenced by your code. Your flag key should be
space-mode
. -
Check the SDKs using Client-side ID checkbox.
-
Choose the Boolean option in the Flag variations dropdown.
-
Click Save Flag.
Next, you will implement the flag in js/app.js
.