Game Development
Introduction to Game Development
Choosing a Game Engine
Programming Basics for Games
2D Game Development
3D Game Development
Physics & Collision Systems
Audio & Sound Design
Publishing Your Game
Game Design Fundamentals
AI in Games
Multiplayer & Networking
Professional Game Dev Workflow
Building a Portfolio
Player Psychology
Understanding player psychology is the foundation of good game design. Games are experiences crafted to evoke specific emotions, satisfy needs, and create memorable moments.
Player Motivation Types
Bartle's Player Types (MMO-focused):
Achievers Explorers
┌─────────────────┐ ┌─────────────────┐
│ 🏆 "What can │ │ 🗺️ "What's │
│ I win?" │ │ out there?" │
│ │ │ │
│ • Completionists│ │ • Curious │
│ • Trophy hunters│ │ • Easter eggs │
│ • Leaderboards │ │ • Secret areas │
└─────────────────┘ └─────────────────┘
ACTING ON WORLD ─────────────── INTERACTING WITH WORLD
┌─────────────────┐ ┌─────────────────┐
│ ⚔️ "Who can │ │ 💬 "Who's │
│ I beat?" │ │ around?" │
│ │ │ │
│ • Competitive │ │ • Social │
│ • PvP focused │ │ • Cooperative │
│ • Rankings │ │ • Community │
└─────────────────┘ └─────────────────┘
Killers Socializers
ACTING ON PLAYERS ────────────INTERACTING WITH PLAYERS
Intrinsic vs Extrinsic Motivation
| Type | Definition | Game Examples |
|---|---|---|
| Intrinsic | Playing because it's inherently enjoyable | Fun combat, interesting puzzles, beautiful worlds |
| Extrinsic | Playing for external rewards | Achievements, loot drops, leaderboard ranks |
Game Feel & Juice
Game feel (or "juice") is what makes a game satisfying to interact with. It's the difference between "pressing a button" and "experiencing an impact."
The Juice Formula:
Without Juice: With Juice:
┌─────────────────────┐ ┌─────────────────────┐
│ Press button │ │ Press button │
│ Enemy disappears │ → │ Screen shake! │
│ Score: +100 │ │ Hit particles! │
│ │ │ Impact sound! │
│ (Feels flat) │ │ Enemy recoils! │
│ │ │ Score pops up! │
│ │ │ Controller rumble!│
│ │ │ (Feels AMAZING!) │
└─────────────────────┘ └─────────────────────┘
Juice Elements:
1. Visual Feedback - Particles, flashes, screen shake
2. Audio Feedback - Satisfying sounds, music stings
3. Animation - Anticipation, squash & stretch
4. Time Manipulation - Hitpause, slow-motion
5. Haptic Feedback - Controller vibration
6. UI Polish - Numbers popping, icons bouncing
// Implementing Game Juice
public class JuiceEffects : MonoBehaviour
{
[Header("Screen Shake")]
public float shakeDuration = 0.2f;
public float shakeMagnitude = 0.1f;
[Header("Hit Pause")]
public float hitPauseDuration = 0.05f;
[Header("Effects")]
public ParticleSystem hitParticles;
public AudioClip hitSound;
// Call this when player hits something
public void OnHit(Vector3 hitPosition)
{
// 1. Spawn particles
Instantiate(hitParticles, hitPosition, Quaternion.identity);
// 2. Play sound
AudioSource.PlayClipAtPoint(hitSound, hitPosition);
// 3. Screen shake
StartCoroutine(ScreenShake());
// 4. Hit pause (freeze frame)
StartCoroutine(HitPause());
// 5. Haptic feedback (if supported)
// Gamepad.current?.SetMotorSpeeds(0.5f, 0.5f);
}
IEnumerator ScreenShake()
{
Vector3 originalPos = Camera.main.transform.localPosition;
float elapsed = 0f;
while (elapsed < shakeDuration)
{
float x = Random.Range(-1f, 1f) * shakeMagnitude;
float y = Random.Range(-1f, 1f) * shakeMagnitude;
Camera.main.transform.localPosition = originalPos + new Vector3(x, y, 0);
elapsed += Time.unscaledDeltaTime;
yield return null;
}
Camera.main.transform.localPosition = originalPos;
}
IEnumerator HitPause()
{
Time.timeScale = 0f;
yield return new WaitForSecondsRealtime(hitPauseDuration);
Time.timeScale = 1f;
}
}
Feedback Loops
Feedback loops are cycles where the game responds to player actions, and those responses affect future actions. They're the engine of engagement.
Types of Feedback Loops:
POSITIVE FEEDBACK (Amplifying):
Player gets kill → Gets XP → Levels up → Stronger →
Easier kills → More XP → Faster leveling → ...
Effect: "Rich get richer" - Creates momentum and power fantasy
Problem: Can make losing feel hopeless (snowballing)
NEGATIVE FEEDBACK (Balancing):
Player falls behind → Gets power-up → Catches up →
Back to normal → Falls behind → Gets power-up → ...
Effect: Keeps competition close, rubber-banding
Problem: Can feel unfair ("I was winning!")
Common Implementations:
Mario Kart: Battle Royale:
┌────────────────────┐ ┌────────────────────┐
│ 1st Place: Banana │ │ Shrinking circle │
│ 8th Place: Star │ │ forces encounters │
│ │ │ │
│ Worse items when │ │ Limited resources │
│ ahead = catch-up │ │ prevent camping │
└────────────────────┘ └────────────────────┘
Reward Systems
Reward schedules (borrowed from behavioral psychology) determine when and how players receive rewards. They dramatically impact engagement and addiction potential.
Reward Schedules:
FIXED RATIO: Reward after X actions
│▓░░▓░░▓░░▓░░│ Every 3 kills = loot drop
Predictable, consistent grind
Example: Crafting (10 ore = 1 bar)
VARIABLE RATIO: Reward after random X actions
│░▓░░░▓░░▓░░░░░▓│ Random chance per kill
Most engaging (gambling/slot machines!)
Example: Loot boxes, rare item drops
FIXED INTERVAL: Reward after X time
│────▓────▓────▓│ Every 5 minutes = chest
Encourages checking back regularly
Example: Daily login rewards, energy refills
VARIABLE INTERVAL: Reward at random times
│──▓───▓─▓──────▓│ Random events
Creates anticipation and surprise
Example: Random world events, special spawns
Most Effective for Engagement:
Variable Ratio > Fixed Ratio > Variable Interval > Fixed Interval
Ethics Warning:
Variable ratio is ADDICTIVE. Use responsibly.
Consider: Is this creating value or exploiting players?
The Reward Pyramid
Reward Frequency vs Value:
╱╲
╱ ╲ LEGENDARY
╱ 🏆 ╲ (Rare, huge dopamine hit)
╱──────╲
╱ ╲ EPIC
╱ 💎💎 ╲ (Occasional, exciting)
╱────────────╲
╱ ╲ RARE
╱ ⭐⭐⭐⭐ ╲ (Regular, satisfying)
╱────────────────╲
╱ ╲ COMMON
╱ ●●●●●●●●●●●●●● ╲ (Frequent, expected)
╱────────────────────────╲
Frequent small rewards + Rare big rewards = Optimal engagement
Difficulty Curves
The difficulty curve is how challenge changes over time. Get it wrong and players quit (too hard) or get bored (too easy).
Difficulty vs Player Skill (Flow Theory):
Difficulty
│
High │ ╱ Anxiety Zone
│ ╱ (Frustrated, overwhelmed)
│ ╱
│ ╱ ═══════════════
│ ╱ FLOW ZONE ═══════════
│ ╱ (Engaged, challenged)
│ ╱ ═══════════════════
Low │ ╱ Boredom Zone
│╱ (Too easy, disengaged)
└─────────────────────────────
Low ───────────── High
Player Skill
Goal: Keep players in the Flow Zone as their skill grows
Common Difficulty Patterns:
Linear: Stepped: Sawtooth:
╱ __ ╱╲ ╱╲ ╱
╱ __╱ ___╱ ╲╱ ╲___
╱ __╱
╱ __╱ Each level harder,
Gradual Boss spikes then breather section
increase
Dynamic Difficulty Adjustment (DDA)
// Simple Dynamic Difficulty System
public class DynamicDifficulty : MonoBehaviour
{
public static DynamicDifficulty Instance;
[Range(0.5f, 2f)]
public float difficultyMultiplier = 1f;
private int consecutiveDeaths = 0;
private int consecutiveSuccesses = 0;
public void OnPlayerDeath()
{
consecutiveDeaths++;
consecutiveSuccesses = 0;
// After 3 deaths, reduce difficulty
if (consecutiveDeaths >= 3)
{
difficultyMultiplier = Mathf.Max(0.5f, difficultyMultiplier - 0.1f);
consecutiveDeaths = 0;
ShowMessage("Enemies weakened slightly...");
}
}
public void OnPlayerSuccess() // Beat boss, cleared area
{
consecutiveSuccesses++;
consecutiveDeaths = 0;
// After consistent success, increase challenge
if (consecutiveSuccesses >= 5)
{
difficultyMultiplier = Mathf.Min(2f, difficultyMultiplier + 0.1f);
consecutiveSuccesses = 0;
}
}
public float GetEnemyDamage(float baseDamage)
{
return baseDamage * difficultyMultiplier;
}
public float GetEnemyHealth(float baseHealth)
{
return baseHealth * difficultyMultiplier;
}
}
MDA Framework
The MDA Framework (Mechanics, Dynamics, Aesthetics) is a formal approach to understanding games from both designer and player perspectives.
MDA Framework:
Designer → Mechanics → Dynamics → Aesthetics ← Player
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ MECHANICS │ │ DYNAMICS │ │ AESTHETICS │
│ (Components) │ → │ (Behaviors) │ → │ (Emotions) │
├──────────────┤ ├──────────────┤ ├──────────────┤
│ Rules │ │ Emergent │ │ Sensation │
│ Systems │ │ gameplay │ │ Fantasy │
│ Actions │ │ from rules │ │ Narrative │
│ Objects │ │ interacting │ │ Challenge │
│ │ │ │ │ Fellowship │
│ What you │ │ What happens │ │ Discovery │
│ BUILD │ │ when PLAYED │ │ Expression │
│ │ │ │ │ Submission │
└──────────────┘ └──────────────┘ └──────────────┘
Example - Chess:
Mechanics: Pieces move in specific ways, capture rules
Dynamics: Trading pieces, controlling center, checkmate patterns
Aesthetics: Challenge (strategy), Fellowship (competition)
Example - Minecraft:
Mechanics: Block placement, crafting recipes, mob spawning
Dynamics: Building structures, surviving nights, exploring caves
Aesthetics: Discovery (exploration), Expression (building), Fantasy (world)
Exercise: Analyze Your Favorite Game
Goal: Apply design theory to understand why a game works.
- Choose a game you love. List its core mechanics
- Identify what player type(s) it primarily appeals to
- Map out its reward schedule (what rewards, how often)
- Describe its feedback loops (positive and negative)
- Analyze the difficulty curve (how does challenge evolve?)
- Apply MDA: What aesthetics does it deliver? How?
Bonus: Identify one design weakness and propose a solution