๐Ÿš Overview

Drone Duel is an educational programming game where you build a sequence of conditional instructions to guide a drone through increasingly complex obstacle courses. Drag and drop logical blocks, deploy your drone, and watch as it navigates real-time challenges using your code. The faster and more efficient your program, the quicker your drone flies!

๐ŸŽฎ How to Play

๐Ÿงฉ Build Your Program

  1. Drag blocks from the palette into your program area
  2. Arrange blocks in logical order (top to bottom execution)
  3. Remove blocks by clicking the โœ• button
  4. Maximum 10 blocks — choose wisely!

๐Ÿš€ Deploy Your Drone

  1. Click "Deploy Drone" to launch
  2. Your drone executes your program, moving up/down to avoid obstacles
  3. Speed decreases with more blocks — efficient code = faster drone
  4. Reach the finish line within 60 seconds to win!

๐Ÿง  Logic Blocks

BlockTypeBehavior
IF obstacle ahead โ†’ move UP Condition Detects obstacle directly ahead, moves up
IF obstacle ahead โ†’ move DOWN Condition Detects obstacle directly ahead, moves down
IF obstacle above โ†’ move DOWN Condition Detects obstacle above the gap, moves down
IF obstacle below โ†’ move UP Condition Detects obstacle below the gap, moves up
ELSE โ†’ go STRAIGHT Default Executes when no conditions are met

๐ŸŽฏ Game Mechanics

Speed System

  • Base Speed: 100%
  • Speed Penalty: -16% per block in your program
  • Minimum Speed: ~22% (with 10 blocks)
  • Efficient programs = faster drones = better scores!

Obstacles

  • Static obstacles — Fixed gaps to navigate
  • Moving obstacles — Gaps that shift up and down (Level 2+)
  • Dynamic spawns — New obstacles appear mid-flight (Level 2+)

Drone Features

  • Up to 2 drones in Level 3 (dual programming!)
  • Crash recovery — 3 lives per level
  • Real-time decision making — Your code evaluates every frame

Timing

  • 60-second time limit per level
  • Timer pauses during crashes and respawns
  • Complete levels faster for better scores

๐Ÿ† Levels

LevelObstaclesMovingDronesChallenge
1 8 static No 1 Introduction to logic
2 9 + 2 dynamic Yes (some) 1 Moving obstacles + dynamic spawns
3 10 + 2 dynamic Yes (mixed) 2 Dual drones, complex patterns

๐Ÿ“Š Scoring & Feedback

Real-time HUD

  • Timer — Counts up to 60 seconds
  • Speed Meter — Shows current drone speed
  • Crash Indicator — 3 dots show remaining lives
  • Progress Bar — Tracks distance to finish line

Visual Feedback

  • Warning glow — Obstacles flash before spawning
  • Particles — Crashes create explosion effects
  • Drone glow — Visual aura around active drones
  • Finish line — Green flag at course end

๐Ÿ“š Teacher Toolbox

๐Ÿ’ฌ Discussion Questions

  1. Why is adaptability more important than a long script? — The course changes mid-flight; a rigid long program can't handle new obstacles. Short, adaptable code responds to real-time conditions.
  2. How do real-time systems work? — Like this game, real systems (drones, robots, self-driving cars) must process sensor data and adjust actions continuously.
  3. What's the trade-off between more blocks and speed? — More blocks = heavier processing = slower drone. Efficient code is fast code.

๐Ÿ”ง Debug Activity

  • Load the "Faulty Program" from the Teacher Toolbox
  • Remove unnecessary blocks to improve speed
  • Observe how code optimization affects performance

๐Ÿ’ก Strategies

Beginner Tips

  1. Start simple — Use just 2-3 blocks
  2. Use ELSE to handle fallback cases
  3. Test incrementally — Add blocks one at a time

Advanced Techniques

  1. Combine conditions — Multiple IF blocks for different scenarios
  2. Prioritize actions — Place most likely conditions first
  3. Optimize code — Remove redundant blocks to increase speed
  4. Dual drone management (Level 3) — Program applies to both!

Common Pitfalls

  • โŒ Too many blocks โ†’ Slow drone
  • โŒ Missing ELSE โ†’ Drone freezes when no condition met
  • โŒ Wrong condition order โ†’ Ineffective responses
  • โŒ Overcomplicating simple obstacles โ†’ Wasted blocks

โœจ Features

  • Drag-and-drop programming — No typing required!
  • Real-time execution — See your code in action instantly
  • Dynamic obstacles — Courses change mid-flight
  • Speed-based scoring — Faster = better
  • Dual drone mode — Program two drones simultaneously
  • Crash recovery — 3 lives per level
  • Teacher Toolbox — Built-in educational resources
  • Debug mode — Load faulty programs for analysis
  • Responsive design — Works on desktop and tablet
  • Visual feedback — Particles, glow effects, progress tracking

๐ŸŽฎ Controls

ActionInput
Add block Drag from palette or click block
Remove block Click โœ• on block in program
Deploy drone Click "Deploy Drone"
Reset course Click "Reset Course"
Open Toolbox Click "Teacher Toolbox"
Close Toolbox Click โœ• or outside modal

๐Ÿ”ง Technical Details

  • Pure HTML/CSS/JavaScript — No external dependencies
  • Real-time game loop with delta time
  • Canvas rendering with particle effects
  • Drag and drop API for block programming
  • Responsive layout with ResizeObserver
  • State management for each level

๐Ÿซ Educational Value

Computer Science Concepts

  • Conditional logic — IF/ELSE statements
  • Program execution — Sequential processing
  • Real-time systems — Continuous sensor evaluation
  • Code optimization — Efficiency vs. readability
  • Algorithm design — Problem-solving strategies

Critical Thinking Skills

  • Pattern recognition — Identifying obstacle types
  • Logical reasoning — Predicting program behavior
  • Debugging — Finding and fixing errors
  • System design — Balancing trade-offs
Published 9 days ago
StatusReleased
PlatformsHTML5
Author2d creator
GenreEducational
Tags2D, Singleplayer
AI DisclosureAI Assisted, Code, Graphics, Sounds, Text

Download

Download
DRONE DUEL.html 42 kB

Leave a comment

Log in with itch.io to leave a comment.