Create a Capture the Flag Game
Design two team bases with flags.
Program AI teammates and opponents.
Add win conditions when a flag is captured.
Part 1
Planning and Design Constraints
Review of KODU Basics:
Quick recap of key features, such as creating objects, paths, and programming behaviors.
Introduction to the Task:
Explain the "Capture the Flag" game concept.
Show an example of a simple Capture the Flag game built in KODU.
Define Design Constraints:
Students must adhere to the following constraints:
Bases:
Design two team bases, each distinct in layout and visual style.
Include at least three obstacles (e.g., walls, trees, or barriers).
Flags:
Place a flag object in each base.
AI Characters:
Create at least one AI teammate and one AI opponent for each team.
AI behaviors must include basic actions such as guarding the flag and pursuing the opposing team’s flag.
Win Conditions:
Program the game to trigger a win when a flag is captured and brought back to the home base.
Sketch Designs:
Students sketch their base layouts, pathways, and key object placements on paper.
Part 2: Building the Environment in KODU
Environment Setup:
Students begin building their game environments in KODU based on their sketches.
Incorporate pathways and obstacles as per the design constraints.
Feedback and Revision:
Teachers or peers review the designs to ensure the constraints are met.
Provide suggestions for improvement, focusing on balance and playability.
Part 3: Programming AI Teammates and Opponents
AI Teammates:
Demonstrate how to program AI teammates to:
Seek and retrieve the opponent's flag.
Avoid obstacles and opponents.
AI Opponents:
Program AI opponents to:
Guard their team's flag.
Chase and tag intruders.
Student Activity:
Students program the behaviors for AI teammates and opponents.
Part 4: Programming Win Conditions and Testing
Win Conditions:
Guide students to program the win condition:
When a flag is brought to the base, a message (e.g., “Team A Wins!”) is displayed, and the game ends.
Testing and Debugging:
Students test their games, ensuring all elements function correctly.
Debug any issues with guidance from the teacher.
Part 5: Showcase and Reflection
Showcase:
Students present their games to the class, explaining their design choices and gameplay mechanics.
Reflection:
Discuss the challenges faced in adhering to design constraints.
Encourage students to share what they learned about balancing creativity with problem-solving.
Formative: Observe students’ progress during the building and programming phases.
Summative: Evaluate the final game based on:
Adherence to design constraints.
Creativity in base designs and obstacle placement.
Functionality of AI teammates and opponents.
Proper implementation of win conditions.
This lesson promotes creativity, logical thinking, and teamwork while allowing students to apply their KODU programming skills in a structured yet open-ended project.