GameMechanicsDesignTask
Generate comprehensive game mechanics with balance analysis, progression systems, and economy design. Proves viability through simulated playtesting predictions.
Side-Effect Safe
Model: GPT-4 Preferred
Category: Games
⚙️ ExecutionConfig.json
{
"game_concept": "Tower defense with resource management",
"target_audience": "hardcore",
"core_loop_duration": "20 minutes",
"num_mechanics": 6,
"balance_focus": "strategy",
"include_progression_system": true,
"include_economy_system": true,
"playtesting_scenarios": 3
}
→
👁️ SessionTask UI
Overview
Core Mechanics
Balance Analysis
Playtesting
Balance Metrics
Win Rate Variance
0.12 (Good)
Strategy Diversity
0.85 (Excellent)
Skill Expression
78/100
Luck Factor
15/100
Dominant Strategies
- Early-game resource hoarding (Mitigated by Sink Mechanics)
- High-density tower clusters (Countered by Splash Damage)
Test Workspace Browser
Explore actual design artifacts, balance reports, and simulation logs generated by this task.
Configuration Parameters
| Field | Type | Default | Description |
|---|---|---|---|
game_concept * |
String | - | High-level game concept (e.g., 'Tower defense with resource management'). |
target_audience |
String | "casual" | 'casual', 'hardcore', 'family', 'competitive'. |
core_loop_duration |
String | "15 minutes" | Target duration for the core gameplay loop. |
num_mechanics |
Int | 5 | Number of core mechanics to design (3-8 recommended). |
include_progression_system |
Boolean | true | Whether to design levels, XP curves, and unlocks. |
include_economy_system |
Boolean | true | Whether to include detailed resource flow and sink design. |
include_difficulty_scaling |
Boolean | true | Whether to include difficulty scaling analysis. |
balance_focus |
String | "mixed" | 'skill', 'luck', 'strategy', 'mixed'. |
playtesting_scenarios |
Int | 3 | Number of simulated playtesting scenarios to run (1-10). |
generate_tuning_guide |
Boolean | true | Whether to generate specific difficulty and reward parameters. |
input_files |
List<String> | [] | Optional glob patterns for context files (docs, references). |
Token Usage
Estimated consumption: Medium-High. This task involves multiple LLM passes for generation, interaction analysis, and simulation.
Task Process Lifecycle
- Context Gathering: Reads input files and prior task results to align with existing lore or technical constraints.
- Mechanic Generation: Designs core loops, player actions, and system responses based on the concept and audience.
- Interaction Analysis: Maps synergies and conflicts between mechanics to identify balance risks.
- Progression Design: (Optional) Constructs XP curves, level unlocks, and difficulty multipliers.
- Economy Design: (Optional) Defines resource types, generation rates, and sink mechanisms.
- Balance Evaluation: Calculates skill/luck ratios and identifies dominant strategies.
- Playtesting Simulation: Predicts engagement curves and frustration triggers for different player personas.
- Tuning Generation: (Optional) Produces actionable difficulty and reward multipliers.
Embedded Execution (Headless)
Use the UnifiedHarness to run this task as part of a CI/CD pipeline or automated game design tool.
// 1. Initialize the Harness
val harness = UnifiedHarness(serverless = true, openBrowser = false)
// 2. Configure the Task
val executionConfig = GameMechanicsDesignTaskExecutionConfigData(
game_concept = "Cyberpunk stealth-action with hacking",
target_audience = "hardcore",
balance_focus = "skill",
playtesting_scenarios = 5
)
// 3. Run the Task
harness.runTask(
taskType = GameMechanicsDesignTask.GameMechanicsDesign,
executionConfig = executionConfig,
workspace = File("./game-design-output"),
autoFix = true
)
Test Case Example
Example of a unit test verifying game balance via the agent.
@Test
fun testGameBalance() {
val result = harness.runTask(
taskType = GameMechanicsDesignTask.GameMechanicsDesign,
executionConfig = GameMechanicsDesignTaskExecutionConfigData(
game_concept = "Simple Match-3",
balance_focus = "luck"
)
)
assertTrue(result.contains("Luck Factor"))
assertTrue(result.contains("Win Rate Variance"))
}
Prompt Segment
The following logic is injected into the LLM context:
GameMechanicsDesign - Generate comprehensive game mechanics with balance analysis
** Specify the game concept (e.g., "Tower defense with resource management")
** Define target audience (casual, hardcore, family, competitive)
** Set core gameplay loop duration
** Configure number of mechanics to design (3-8)
** Choose balance focus (skill, luck, strategy, mixed)
** The task will:
- Generate core gameplay mechanics
- Analyze mechanic interactions
- Design progression systems
- Create economy systems
- Evaluate balance and fairness
- Simulate playtesting scenarios
- Provide tuning parameters