Add comprehensive level progression design document covering difficulty scaling and pattern generation
This commit is contained in:
@@ -1,354 +1,349 @@
|
|||||||
# Level Progression Design
|
# Level Progression Design
|
||||||
|
|
||||||
## Difficulty Scaling Framework
|
## Difficulty Scaling Philosophy
|
||||||
|
|
||||||
### Core Progression Principles
|
### Core Principles
|
||||||
1. **Gradual Complexity Introduction**: Each level adds manageable new challenge
|
1. **Gradual Learning Curve**: Each level introduces complexity at a manageable pace
|
||||||
2. **Pattern Recognition Development**: Allow players to learn through repetition
|
2. **Flow State Maintenance**: Difficulty increases to match growing player skill
|
||||||
3. **Flow State Maintenance**: Balance challenge and skill to prevent frustration
|
3. **Recovery Levels**: Occasional easier levels to prevent frustration
|
||||||
4. **Confidence Building**: Occasional easier levels to maintain player motivation
|
4. **Skill Validation**: Regular challenges that test mastered concepts
|
||||||
5. **Skill Transfer**: Later levels build on patterns learned earlier
|
|
||||||
|
|
||||||
### Level Structure by Stage
|
|
||||||
|
|
||||||
#### Beginner Levels (1-5)
|
|
||||||
**Purpose**: Teach core mechanics and build confidence
|
|
||||||
|
|
||||||
|
### Mathematical Progression
|
||||||
```javascript
|
```javascript
|
||||||
const beginnerLevels = {
|
const levelProgression = {
|
||||||
nodeCount: 3-4,
|
// Node count progression
|
||||||
connectionCount: 2-3,
|
nodeCount: (level) => Math.min(3 + Math.floor(level / 2), 12),
|
||||||
timeLimit: 60,
|
|
||||||
patterns: [
|
|
||||||
'simple_chain', // A→B→C
|
|
||||||
'triangle', // A↔B↔C↔A
|
|
||||||
'star_simple', // A→B,C,D
|
|
||||||
'parallel_lines' // A→B, C→D
|
|
||||||
],
|
|
||||||
objectives: [
|
|
||||||
'Learn click and drag mechanics',
|
|
||||||
'Understand dotted line targets',
|
|
||||||
'Develop basic pattern recognition',
|
|
||||||
'Build confidence with success'
|
|
||||||
]
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Intermediate Levels (6-15)
|
// Connection complexity
|
||||||
**Purpose**: Develop pattern recognition and spatial reasoning
|
connectionCount: (level) => {
|
||||||
|
const nodes = nodeCount(level);
|
||||||
```javascript
|
return Math.min(nodes - 1 + Math.floor(level / 3), nodes * 1.5);
|
||||||
const intermediateLevels = {
|
|
||||||
nodeCount: 4-7,
|
|
||||||
connectionCount: 3-6,
|
|
||||||
timeLimit: 50-55,
|
|
||||||
patterns: [
|
|
||||||
'hub_networks', // Central node connects to others
|
|
||||||
'chain_branches', // Main chain with side branches
|
|
||||||
'symmetric_patterns', // Mirror patterns
|
|
||||||
'grid_subsets' // Partial grid connections
|
|
||||||
],
|
|
||||||
objectives: [
|
|
||||||
'Recognize hub and spoke patterns',
|
|
||||||
'Handle multiple connection points',
|
|
||||||
'Develop systematic approach',
|
|
||||||
'Improve time management'
|
|
||||||
]
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Advanced Levels (16-25)
|
|
||||||
**Purpose**: Challenge spatial reasoning and strategy
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
const advancedLevels = {
|
|
||||||
nodeCount: 7-10,
|
|
||||||
connectionCount: 6-12,
|
|
||||||
timeLimit: 40-50,
|
|
||||||
patterns: [
|
|
||||||
'complex_webs', // Highly interconnected
|
|
||||||
'layered_networks', // Multiple connection layers
|
|
||||||
'asymmetric_designs', // Non-obvious patterns
|
|
||||||
'efficiency_puzzles' // Optimal path challenges
|
|
||||||
],
|
|
||||||
objectives: [
|
|
||||||
'Handle complex interconnections',
|
|
||||||
'Develop strategic thinking',
|
|
||||||
'Master time pressure',
|
|
||||||
'Recognize advanced patterns'
|
|
||||||
]
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Expert Levels (26+)
|
|
||||||
**Purpose**: Master-level challenges for dedicated players
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
const expertLevels = {
|
|
||||||
nodeCount: 10-12,
|
|
||||||
connectionCount: 8-16,
|
|
||||||
timeLimit: 30-45,
|
|
||||||
patterns: [
|
|
||||||
'maximum_complexity', // Dense interconnections
|
|
||||||
'puzzle_variants', // Special rules or constraints
|
|
||||||
'artistic_patterns', // Beautiful but complex designs
|
|
||||||
'speed_challenges' // Time-focused difficulties
|
|
||||||
],
|
|
||||||
objectives: [
|
|
||||||
'Perfect pattern recognition',
|
|
||||||
'Master advanced strategies',
|
|
||||||
'Handle maximum complexity',
|
|
||||||
'Achieve expert-level flow'
|
|
||||||
]
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Pattern Type Definitions
|
|
||||||
|
|
||||||
### Basic Patterns (Levels 1-5)
|
|
||||||
```javascript
|
|
||||||
const basicPatterns = {
|
|
||||||
linear_chain: {
|
|
||||||
description: 'Simple A→B→C→D sequence',
|
|
||||||
difficulty: 1,
|
|
||||||
nodeRange: [3, 4],
|
|
||||||
connectionFormula: 'nodes - 1'
|
|
||||||
},
|
},
|
||||||
|
|
||||||
simple_triangle: {
|
// Time pressure
|
||||||
description: 'Three nodes all connected',
|
timeLimit: (level) => Math.max(30, 60 - Math.floor(level / 3) * 2),
|
||||||
difficulty: 2,
|
|
||||||
nodeRange: [3, 3],
|
// Pattern complexity score
|
||||||
connectionFormula: '3'
|
complexityScore: (level) => Math.min(level * 0.8 + 2, 10)
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
## Level Archetypes
|
||||||
|
|
||||||
|
### Tutorial Levels (1-3)
|
||||||
|
**Purpose**: Teach basic mechanics
|
||||||
|
**Node Count**: 3-4
|
||||||
|
**Pattern Types**: Simple chains, basic shapes
|
||||||
|
**Time Limit**: 60 seconds (generous)
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
// Example Level 1 pattern
|
||||||
|
const level1 = {
|
||||||
|
nodes: 3,
|
||||||
|
pattern: [[0, 1], [1, 2]], // Simple chain A→B→C
|
||||||
|
type: 'linear_chain',
|
||||||
|
tutorial: 'Connect the nodes by dragging from one to another'
|
||||||
|
};
|
||||||
|
|
||||||
|
// Example Level 2 pattern
|
||||||
|
const level2 = {
|
||||||
|
nodes: 4,
|
||||||
|
pattern: [[0, 1], [0, 2], [0, 3]], // Hub pattern
|
||||||
|
type: 'hub',
|
||||||
|
tutorial: 'One node can connect to multiple others'
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
### Skill Building Levels (4-10)
|
||||||
|
**Purpose**: Develop pattern recognition
|
||||||
|
**Node Count**: 4-6
|
||||||
|
**Pattern Types**: Hubs, simple networks, parallel chains
|
||||||
|
**Time Limit**: 55-60 seconds
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
// Level design templates
|
||||||
|
const skillBuildingTemplates = {
|
||||||
|
doubleHub: {
|
||||||
|
description: 'Two hub nodes with overlapping connections',
|
||||||
|
complexity: 4,
|
||||||
|
example: [[0, 2], [0, 3], [1, 2], [1, 3]]
|
||||||
},
|
},
|
||||||
|
|
||||||
basic_star: {
|
parallelChains: {
|
||||||
description: 'One central hub with spokes',
|
description: 'Multiple independent connection chains',
|
||||||
difficulty: 2,
|
complexity: 3,
|
||||||
nodeRange: [4, 5],
|
example: [[0, 1], [1, 2], [3, 4], [4, 5]]
|
||||||
connectionFormula: 'nodes - 1'
|
},
|
||||||
|
|
||||||
|
triangle: {
|
||||||
|
description: 'Basic geometric shape',
|
||||||
|
complexity: 3,
|
||||||
|
example: [[0, 1], [1, 2], [2, 0]]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
### Intermediate Patterns (Levels 6-15)
|
### Challenge Levels (11-20)
|
||||||
|
**Purpose**: Test mastery with complex patterns
|
||||||
|
**Node Count**: 6-9
|
||||||
|
**Pattern Types**: Complex networks, geometric shapes, asymmetric designs
|
||||||
|
**Time Limit**: 45-55 seconds
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
const intermediatePatterns = {
|
const challengeTemplates = {
|
||||||
branched_tree: {
|
star: {
|
||||||
description: 'Tree structure with multiple branches',
|
description: 'Central hub with outer ring connections',
|
||||||
difficulty: 3,
|
complexity: 6,
|
||||||
nodeRange: [5, 7],
|
nodeCount: 7,
|
||||||
connectionFormula: 'nodes - 1 + Math.floor(nodes/3)'
|
centerNode: true
|
||||||
},
|
},
|
||||||
|
|
||||||
partial_mesh: {
|
mesh: {
|
||||||
description: 'Partially connected mesh network',
|
description: 'Highly interconnected network',
|
||||||
difficulty: 4,
|
complexity: 7,
|
||||||
nodeRange: [6, 8],
|
connectionDensity: 0.6 // 60% of possible connections
|
||||||
connectionFormula: 'Math.floor(nodes * 1.5)'
|
|
||||||
},
|
},
|
||||||
|
|
||||||
symmetric_design: {
|
symmetrical: {
|
||||||
description: 'Symmetrical connection patterns',
|
description: 'Mirror-image patterns',
|
||||||
difficulty: 4,
|
complexity: 5,
|
||||||
nodeRange: [6, 8],
|
symmetryType: 'vertical' // or 'horizontal', 'rotational'
|
||||||
connectionFormula: 'varies by symmetry type'
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
### Advanced Patterns (Levels 16+)
|
### Master Levels (21+)
|
||||||
|
**Purpose**: Ultimate skill test
|
||||||
|
**Node Count**: 9-12
|
||||||
|
**Pattern Types**: Complex geometric shapes, dense networks, multi-hub systems
|
||||||
|
**Time Limit**: 30-45 seconds
|
||||||
|
|
||||||
|
## Pattern Generation Algorithm
|
||||||
|
|
||||||
|
### Basic Algorithm
|
||||||
```javascript
|
```javascript
|
||||||
const advancedPatterns = {
|
function generateLevelPattern(levelNumber) {
|
||||||
dense_network: {
|
const config = getLevelConfig(levelNumber);
|
||||||
description: 'Highly interconnected nodes',
|
const nodes = generateNodePositions(config.nodeCount);
|
||||||
difficulty: 5,
|
const pattern = generateConnectionPattern(nodes, config);
|
||||||
nodeRange: [8, 12],
|
|
||||||
connectionFormula: 'Math.floor(nodes * 2)'
|
|
||||||
},
|
|
||||||
|
|
||||||
layered_structure: {
|
|
||||||
description: 'Multiple connection layers',
|
|
||||||
difficulty: 5,
|
|
||||||
nodeRange: [9, 12],
|
|
||||||
connectionFormula: 'complex algorithm'
|
|
||||||
},
|
|
||||||
|
|
||||||
efficiency_puzzle: {
|
|
||||||
description: 'Optimal path challenges',
|
|
||||||
difficulty: 6,
|
|
||||||
nodeRange: [10, 12],
|
|
||||||
connectionFormula: 'maximum complexity'
|
|
||||||
}
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Difficulty Adjustment Algorithm
|
|
||||||
|
|
||||||
### Dynamic Difficulty
|
|
||||||
```javascript
|
|
||||||
function calculateLevelDifficulty(level) {
|
|
||||||
const baseNodeCount = 3;
|
|
||||||
const nodeGrowthRate = 0.3;
|
|
||||||
const maxNodes = 12;
|
|
||||||
|
|
||||||
// Gradually increase node count
|
|
||||||
const nodeCount = Math.min(
|
|
||||||
Math.floor(baseNodeCount + level * nodeGrowthRate),
|
|
||||||
maxNodes
|
|
||||||
);
|
|
||||||
|
|
||||||
// Connection count scales with nodes and level
|
|
||||||
const connectionMultiplier = 1 + (level * 0.05);
|
|
||||||
const baseConnections = nodeCount - 1;
|
|
||||||
const connectionCount = Math.floor(baseConnections * connectionMultiplier);
|
|
||||||
|
|
||||||
// Time limit decreases gradually
|
|
||||||
const baseTime = 60;
|
|
||||||
const timeReduction = Math.floor(level / 3) * 2;
|
|
||||||
const timeLimit = Math.max(30, baseTime - timeReduction);
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
nodeCount,
|
nodes,
|
||||||
connectionCount: Math.min(connectionCount, nodeCount * 2),
|
targetConnections: pattern,
|
||||||
timeLimit,
|
timeLimit: config.timeLimit,
|
||||||
complexityScore: calculateComplexity(nodeCount, connectionCount)
|
complexity: calculateComplexity(pattern)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
```
|
|
||||||
|
|
||||||
### Complexity Scoring
|
function getLevelConfig(level) {
|
||||||
```javascript
|
if (level <= 3) return tutorialConfig(level);
|
||||||
function calculateComplexity(nodeCount, connectionCount) {
|
if (level <= 10) return skillBuildingConfig(level);
|
||||||
const nodeFactor = nodeCount * 0.3;
|
if (level <= 20) return challengeConfig(level);
|
||||||
const connectionFactor = connectionCount * 0.5;
|
return masterConfig(level);
|
||||||
const densityFactor = (connectionCount / nodeCount) * 0.2;
|
|
||||||
|
|
||||||
return Math.floor(nodeFactor + connectionFactor + densityFactor);
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Player Progression Metrics
|
### Pattern Validation
|
||||||
|
|
||||||
### Success Indicators
|
|
||||||
- **Completion Rate**: >80% for current difficulty tier
|
|
||||||
- **Time Efficiency**: Consistent improvement in completion times
|
|
||||||
- **Pattern Recognition**: Faster start times (less hesitation)
|
|
||||||
- **Error Rate**: Fewer invalid connection attempts
|
|
||||||
|
|
||||||
### Progression Gates
|
|
||||||
```javascript
|
```javascript
|
||||||
const progressionGates = {
|
function validatePattern(nodes, connections) {
|
||||||
beginnerToIntermediate: {
|
const checks = {
|
||||||
criteria: [
|
isConnected: validateConnectivity(nodes, connections),
|
||||||
'Complete levels 1-5 with >80% success rate',
|
hasReasonableComplexity: validateComplexity(connections),
|
||||||
'Average completion time <45 seconds',
|
isAesthetic: validateAesthetics(nodes, connections),
|
||||||
'Less than 2 invalid attempts per level'
|
isSolvable: validateSolvability(connections)
|
||||||
]
|
};
|
||||||
},
|
|
||||||
|
|
||||||
intermediateToAdvanced: {
|
return Object.values(checks).every(check => check === true);
|
||||||
criteria: [
|
}
|
||||||
'Complete levels 6-15 with >70% success rate',
|
|
||||||
'Handle 6+ node networks confidently',
|
|
||||||
'Demonstrate pattern recognition speed'
|
|
||||||
]
|
|
||||||
},
|
|
||||||
|
|
||||||
advancedToExpert: {
|
function validateConnectivity(nodes, connections) {
|
||||||
criteria: [
|
// Ensure all nodes are part of the pattern (no isolated nodes)
|
||||||
'Complete levels 16-25 with >60% success rate',
|
const connectedNodes = new Set();
|
||||||
'Master complex interconnected patterns',
|
connections.forEach(([a, b]) => {
|
||||||
'Maintain performance under time pressure'
|
connectedNodes.add(a);
|
||||||
]
|
connectedNodes.add(b);
|
||||||
}
|
});
|
||||||
};
|
|
||||||
|
return connectedNodes.size === nodes.length;
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Balancing and Tuning
|
## Difficulty Balancing
|
||||||
|
|
||||||
### Playtesting Feedback Loops
|
### Complexity Factors
|
||||||
1. **Immediate Feedback**: Success/failure rates per level
|
|
||||||
2. **Completion Analytics**: Time distributions and attempt counts
|
|
||||||
3. **Frustration Points**: Levels with high abandonment rates
|
|
||||||
4. **Flow Breaks**: Sudden difficulty spikes or boring plateaus
|
|
||||||
|
|
||||||
### Adjustment Parameters
|
|
||||||
```javascript
|
```javascript
|
||||||
const tuningParameters = {
|
const complexityFactors = {
|
||||||
tooEasy: {
|
nodeCount: {
|
||||||
indicators: ['>95% completion rate', 'Average time <20 seconds'],
|
weight: 2.0,
|
||||||
adjustments: ['Add 1-2 connections', 'Reduce time limit by 5s', 'Increase pattern complexity']
|
calculate: (nodes) => nodes
|
||||||
},
|
},
|
||||||
|
|
||||||
tooHard: {
|
connectionDensity: {
|
||||||
indicators: ['<50% completion rate', 'High abandonment rate'],
|
weight: 1.5,
|
||||||
adjustments: ['Remove 1-2 connections', 'Add 10s to time limit', 'Simplify pattern type']
|
calculate: (connections, nodes) => connections.length / (nodes * (nodes - 1) / 2)
|
||||||
},
|
},
|
||||||
|
|
||||||
justRight: {
|
patternSymmetry: {
|
||||||
indicators: ['70-85% completion rate', 'Engaged retry behavior'],
|
weight: -0.5, // Symmetric patterns are easier
|
||||||
actions: ['Maintain current parameters', 'Use as template for similar levels']
|
calculate: (connections) => calculateSymmetryScore(connections)
|
||||||
|
},
|
||||||
|
|
||||||
|
crossingConnections: {
|
||||||
|
weight: 1.0,
|
||||||
|
calculate: (connections, nodePositions) => countCrossings(connections, nodePositions)
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
function calculateLevelComplexity(level) {
|
||||||
|
let totalComplexity = 0;
|
||||||
|
|
||||||
|
Object.entries(complexityFactors).forEach(([factor, config]) => {
|
||||||
|
const value = config.calculate(level);
|
||||||
|
totalComplexity += value * config.weight;
|
||||||
|
});
|
||||||
|
|
||||||
|
return totalComplexity;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Dynamic Difficulty Adjustment
|
||||||
|
```javascript
|
||||||
|
class DifficultyAdjuster {
|
||||||
|
constructor() {
|
||||||
|
this.playerPerformance = [];
|
||||||
|
this.adjustmentThreshold = 3; // Adjust after 3 consecutive fails/successes
|
||||||
|
}
|
||||||
|
|
||||||
|
recordPerformance(level, completed, timeRemaining) {
|
||||||
|
this.playerPerformance.push({
|
||||||
|
level,
|
||||||
|
completed,
|
||||||
|
timeRemaining,
|
||||||
|
timestamp: Date.now()
|
||||||
|
});
|
||||||
|
|
||||||
|
this.considerAdjustment();
|
||||||
|
}
|
||||||
|
|
||||||
|
considerAdjustment() {
|
||||||
|
const recent = this.playerPerformance.slice(-this.adjustmentThreshold);
|
||||||
|
|
||||||
|
if (recent.length < this.adjustmentThreshold) return;
|
||||||
|
|
||||||
|
const allFailed = recent.every(p => !p.completed);
|
||||||
|
const allSucceeded = recent.every(p => p.completed && p.timeRemaining > 10);
|
||||||
|
|
||||||
|
if (allFailed) {
|
||||||
|
this.suggestEasierLevel();
|
||||||
|
} else if (allSucceeded) {
|
||||||
|
this.suggestHarderLevel();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
suggestEasierLevel() {
|
||||||
|
// Reduce complexity by decreasing connections or increasing time
|
||||||
|
console.log('Player struggling - suggest reducing complexity');
|
||||||
|
}
|
||||||
|
|
||||||
|
suggestHarderLevel() {
|
||||||
|
// Increase complexity or reduce time
|
||||||
|
console.log('Player excelling - suggest increasing complexity');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Level Testing and Validation
|
||||||
|
|
||||||
|
### Playtesting Metrics
|
||||||
|
```javascript
|
||||||
|
const playtestingMetrics = {
|
||||||
|
completionRate: {
|
||||||
|
target: '>80% for levels 1-10, >60% for levels 11-20, >40% for levels 21+',
|
||||||
|
measure: (attempts, completions) => completions / attempts
|
||||||
|
},
|
||||||
|
|
||||||
|
averageTime: {
|
||||||
|
target: '50-80% of time limit used',
|
||||||
|
measure: (completionTimes, timeLimit) => completionTimes.reduce((a, b) => a + b) / completionTimes.length / timeLimit
|
||||||
|
},
|
||||||
|
|
||||||
|
retryRate: {
|
||||||
|
target: '<30% of players retry level',
|
||||||
|
measure: (retries, attempts) => retries / attempts
|
||||||
|
},
|
||||||
|
|
||||||
|
engagementScore: {
|
||||||
|
target: 'Players continue to next level >90% of time',
|
||||||
|
measure: (continuations, completions) => continuations / completions
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
### A/B Testing Framework
|
### A/B Testing Framework
|
||||||
```javascript
|
```javascript
|
||||||
const abTestingLevels = {
|
class LevelTester {
|
||||||
testVariants: [
|
constructor() {
|
||||||
{
|
this.variants = {};
|
||||||
name: 'standard_progression',
|
this.results = {};
|
||||||
description: 'Current difficulty curve'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'gentler_slope',
|
|
||||||
description: 'Slower difficulty increase'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'steeper_challenge',
|
|
||||||
description: 'Faster ramp to complexity'
|
|
||||||
}
|
}
|
||||||
],
|
|
||||||
|
|
||||||
metrics: [
|
addVariant(levelNumber, variantName, pattern) {
|
||||||
'level_completion_rate',
|
if (!this.variants[levelNumber]) {
|
||||||
'session_length',
|
this.variants[levelNumber] = {};
|
||||||
'player_return_rate',
|
}
|
||||||
'user_satisfaction_score'
|
this.variants[levelNumber][variantName] = pattern;
|
||||||
]
|
}
|
||||||
};
|
|
||||||
|
getVariantForPlayer(levelNumber, playerId) {
|
||||||
|
const variants = Object.keys(this.variants[levelNumber] || {});
|
||||||
|
if (variants.length === 0) return null;
|
||||||
|
|
||||||
|
// Deterministic assignment based on player ID
|
||||||
|
const variantIndex = hashPlayerId(playerId) % variants.length;
|
||||||
|
return variants[variantIndex];
|
||||||
|
}
|
||||||
|
|
||||||
|
recordResult(levelNumber, variantName, result) {
|
||||||
|
const key = `${levelNumber}-${variantName}`;
|
||||||
|
if (!this.results[key]) {
|
||||||
|
this.results[key] = [];
|
||||||
|
}
|
||||||
|
this.results[key].push(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
analyzeResults(levelNumber) {
|
||||||
|
const variants = this.variants[levelNumber];
|
||||||
|
const analysis = {};
|
||||||
|
|
||||||
|
Object.keys(variants).forEach(variant => {
|
||||||
|
const results = this.results[`${levelNumber}-${variant}`] || [];
|
||||||
|
analysis[variant] = {
|
||||||
|
completionRate: results.filter(r => r.completed).length / results.length,
|
||||||
|
averageTime: results.reduce((sum, r) => sum + r.timeUsed, 0) / results.length,
|
||||||
|
playerFeedback: results.map(r => r.satisfaction).filter(Boolean)
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
return analysis;
|
||||||
|
}
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Recovery and Flow Management
|
## Special Level Types
|
||||||
|
|
||||||
### Difficulty Relief Valves
|
### Bonus Levels
|
||||||
- **Confidence Boosters**: Easier levels every 5-7 levels
|
**Frequency**: Every 10 levels
|
||||||
- **Pattern Variety**: Mix familiar and new pattern types
|
**Purpose**: Reward progress with fun, creative challenges
|
||||||
- **Time Flexibility**: Slightly longer time limits after difficulty spikes
|
**Characteristics**: Unique mechanics, relaxed time pressure, special visual effects
|
||||||
- **Visual Clarity**: Ensure complex levels have clear visual hierarchy
|
|
||||||
|
|
||||||
### Player Journey Optimization
|
### Recovery Levels
|
||||||
```javascript
|
**Frequency**: After 3 consecutive failures
|
||||||
const playerJourney = {
|
**Purpose**: Rebuild confidence and momentum
|
||||||
onboarding: {
|
**Characteristics**: Slightly easier than expected, familiar patterns, generous time
|
||||||
levels: '1-3',
|
|
||||||
focus: 'Mechanics mastery',
|
|
||||||
successRate: '>90%'
|
|
||||||
},
|
|
||||||
|
|
||||||
engagement: {
|
### Skill Check Levels
|
||||||
levels: '4-15',
|
**Frequency**: Levels 10, 20, 30, etc.
|
||||||
focus: 'Skill development',
|
**Purpose**: Validate mastery before advancing to next tier
|
||||||
successRate: '70-85%'
|
**Characteristics**: Comprehensive challenge using all learned concepts
|
||||||
},
|
|
||||||
|
|
||||||
mastery: {
|
This progression system ensures players remain engaged while being appropriately challenged throughout their journey.
|
||||||
levels: '16+',
|
|
||||||
focus: 'Expert challenges',
|
|
||||||
successRate: '60-75%'
|
|
||||||
}
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
This progression system should be continuously refined based on player data and feedback to maintain optimal challenge and engagement throughout the player's journey.
|
|
||||||
Reference in New Issue
Block a user