Skip to main content

Week 3 -- 2D Arc: Enemies, Hazards & Level Design

Date: May 1, 2026 Arc: 2D Game (Week 2 of 3)

Brian produced the remaster. Play 2 minutes -- a level with varied enemies and hazards.

  • What to notice: enemy placement teaches you the rules. First encounter is safe, second is dangerous. Hazards are visible before they kill you.
  • "Good level design is invisible teaching."

Play-Test Spotlight

Selected student demos their 2D world with tuned movement.

Learn

Collision Events

When objects touch, things happen. In GDevelop:

Condition: Player is in collision with Enemy
Action: Delete Player / Respawn at checkpoint / Lose a life

Object Groups

Organize your objects! Instead of writing separate events for every enemy type, create groups:

  • Enemies group: all enemy objects
  • Hazards group: spikes, lava, pits
  • Collectibles group: coins, gems, power-ups

Enemy AI Patterns

PatternHow it worksGood for
PatrolWalk between two points, reverse at eachGround enemies, guards
ChaseMove toward the player when closeAggressive enemies, ghosts
SentryStay still, shoot at intervalsTurrets, archers

Level Design Principles

  1. Teach through play -- introduce hazards in a safe context before making them dangerous
  2. Escalate difficulty -- each section should be slightly harder than the last
  3. Reward exploration -- hidden paths, bonus items, secrets
  4. Rest points -- give the player safe moments between challenges

Key Vocabulary

TermDefinition
Collision eventA rule that triggers when two objects touch
Object groupA collection of objects that share the same events
Patrol AIEnemy moves back and forth between two points
CheckpointA save point the player returns to after dying
RespawnThe player reappearing after death

Build

  1. Add a patrolling enemy with collision leading to player respawn.
  2. Add a static hazard (spikes, lava, pit) with collision leading to respawn.
  3. Add a death effect: animation, sound, screen flash.
  4. Set at least one checkpoint.
  5. Redesign your level layout to teach the player about the hazards through placement.

Play & Feedback

Play each other's levels. Feedback: "Where did you die the most? Was it fair? Where did you feel smart?"

Resources & Further Reading

Stretch Goals

  • Multiple enemy types with different behaviors.
  • A hidden area or secret path that rewards exploration.
  • See the Level Design Worksheet for planning tools.