Challenge Mode
Configure direct challenge launches. Applies to: Challenge view and the Games (Balloon Pop, Color Chase, Alien Squat Shooter, where noted).
| Parameter | Type | Default | Applies to | What it does internally |
| exercise | string | none | Challenge, Leaderboard, Training, Assessments and Games | What to run. Challenge and Leaderboard: an exercise title or ID. Training: an exercise title. Assessments and games: the experience id, e.g. "tug" or "balloonpop" (see AI Experiences). The SDK challenge and Swift experience views send it from their exercise argument |
| countdown | number | the exercise's own | Challenge | Duration of the challenge in seconds. Overrides the exercise's configured duration (not the fixed 3-2-1 countdown). The challenge intro screen shows it too. The SDKs send it from the challenge view's countdown argument (Swift duration) |
| reps | number | none | Challenge | Turns the challenge into a rep target (finish N reps) instead of a timed one |
| restDuration | number | the exercise's own rest | Challenge only | Length in seconds of the rest before the challenge exercise (rounded; must be above 0). Used as-is, never lengthened to fit audio. Without it, the rest is the exercise's own rest length (10 s if it has none) plus 3 s when KinesteX plays its greeting; the 10 s fallback is lengthened to fit the rest speech unless dynamicRestEnabled: false. Box and assessments keep their own rest |
| gameTotalRounds | number | 10 | Color Chase ONLY | How many rounds Color Chase lasts. Up to 10 rounds use the fixed level table; more rounds are generated with increasing difficulty (more colors, shorter memorize time). Ignored by every other game |
Alien Squat Shooter ignores reps, countdown and gameTotalRounds: its rounds and ship counts are fixed.
Balloon Pop: rounds mode. When you launch Balloon Pop with reps, the game switches from the default 30-second escalating timer mode to a rounds mode, and the two challenge parameters are reused:
reps= number of roundscountdown= number of balloons per round (2 when omitted)
The game ends after the last round (balloons never time out in this mode; a 5-minute safety cap applies). The HUD shows a round counter instead of a timer. Note that the Swift createExperienceView always sends its duration argument (default 60) as countdown, so pass duration as the balloons per round.
| Configuration | Behavior |
reps: 4, countdown: 2 | 4 rounds × 2 balloons = 8 pops |
reps: 3, countdown: 3 | 3 rounds × 3 balloons = 9 pops |
reps: 6, countdown: 1 | 6 rounds × 1 balloon = 6 pops (very easy) |
reps not provided | Default timer mode (30s, escalating difficulty) |
Challenge
Swift example:
1kinestex.createChallengeView(
2 exercise: "Squats", // exercise title or ID
3 duration: 60, // sent as countdown (seconds)
4 showLeaderboard: true,
5 user: nil,
6 style: nil,
7 isLoading: $isLoading,
8 customParams: [
9 "reps": 20, // rep target instead of a timed challenge
10 "restDuration": 15 // exact rest before the exercise
11 ],
12 onMessageReceived: { message in /* ... */ }
13)Games: Balloon Pop rounds mode and Color Chase rounds
Swift example:
1// Balloon Pop: 4 rounds x 2 balloons
2kinestex.createExperienceView(
3 experience: "assessment",
4 exercise: "balloonpop",
5 duration: 2, // sent as countdown: balloons per round
6 user: nil,
7 style: nil,
8 isLoading: $isLoading,
9 customParams: ["reps": 4], // rounds
10 onMessageReceived: { message in /* ... */ }
11)
12
13// Color Chase: 15 rounds
14// exercise: "colorchase", customParams: ["gameTotalRounds": 15]