Sub topic 2
Designing difficulty presets
This chapter assumes you know TypeScript object types, the spread operator (...), and how a game's core loop and challenge work. It builds the settings model that the rest of the tutorial uses.
Designing presets
A preset is a named bundle of difficulty values. Players pick one name and get a consistent set of enemy strength, health, and help options. Most games need three presets: a forgiving one, a standard one, and a demanding one.
| Preset | Purpose | Typical player |
|---|---|---|
| Story | Remove friction so the player sees the content | Wants narrative, not a fight test |
| Normal | The balance the designers playtested most | Default for most players |
| Hard | Raise the stakes and reduce safety nets | Experienced players seeking a challenge |
Name presets by the experience they give, not by the player's ability. "Story" and "Hard" describe the game. Labels such as "Noob" or "Pro" make players feel judged and push them away from the option that fits them.
Going beyond presets: granular and modular options
Presets alone limit players who want one change, such as more checkpoints without easier enemies. Store presets and overrides in one data model. A preset supplies every value, and the player's overrides replace only the fields they changed.
interface DifficultySettings {
enemyDamageMultiplier: number;
enemyHealthMultiplier: number;
aimAssistStrength: number; // 0 (off) to 1 (strong)
checkpointFrequency: 'sparse' | 'normal' | 'frequent';
infiniteRetries: boolean;
}
type PresetName = 'story' | 'normal' | 'hard';
const PRESETS: Record<PresetName, DifficultySettings> = {
story: {
enemyDamageMultiplier: 0.5,
enemyHealthMultiplier: 0.75,
aimAssistStrength: 0.8,
checkpointFrequency: 'frequent',
infiniteRetries: true,
},
normal: {
enemyDamageMultiplier: 1,
enemyHealthMultiplier: 1,
aimAssistStrength: 0.4,
checkpointFrequency: 'normal',
infiniteRetries: false,
},
hard: {
enemyDamageMultiplier: 1.5,
enemyHealthMultiplier: 1.25,
aimAssistStrength: 0,
checkpointFrequency: 'sparse',
infiniteRetries: false,
},
};
function resolveSettings(
preset: PresetName,
overrides: Partial<DifficultySettings> = {},
): DifficultySettings {
return { ...PRESETS[preset], ...overrides };
}
// A player picks Normal but turns on frequent checkpoints.
const settings = resolveSettings('normal', { checkpointFrequency: 'frequent' });Assist modes: help that keeps players in the game
An assist mode is an optional aid that reduces a specific obstacle, such as aim, timing, or navigation. Assists differ from difficulty. Difficulty sets how hard the challenge is. An assist helps one player get past a particular barrier while the challenge stays the same.
Design assists with these rules:
- Give each assist one clear purpose, and show what it does on the settings screen.
- Let players toggle assists at any time, so they can test the change.
- Expose assists as separate fields in the settings model, as shown above, so they combine with any preset.
Exercise
Exercise
A player chooses the Hard preset but sets aimAssistStrength to 0.6. What does resolveSettings return for aimAssistStrength, and why?
Show answer
It returns 0.6. The spread order puts the overrides last, so the player's value replaces the preset's value of 0.