Introduction
Students will design and code an interactive game where players solve a dance sequence puzzle. This project will teach students how to use conditional logic, text variables, and animations. They will also create a riddle that hints at the correct sequence of moves: left, right, jump, enhancing their storytelling and coding skills.
Objectives
Students will:
- Write a riddle that provides clues for the dance sequence.
- Code a sequences of animated dance moves.
- Code text variables to track and check the dance sequence.
- Code conditional logic to create interactive gameplay.
Code Stories and Games with Elementari
Elementari's creative coding platform allows students to design interactive games. They will use node-based visual coding to code their animation sequences, set up conditional logic for gameplay, and incorporate text variables to track player progress. This platform makes coding accessible while also challenging more experienced coders.
New to Elementari? Click on the orange Start button to jump right into the lesson for free. Check out our Getting Started Guide for an overview of how Elementari works with your class. Get started for free for up to 35 student accounts.
Coding Concepts Covered
Relative Position Text Variable classroom.concepts.conditional.name User NavigationStudent Facing Instructions
Coding Challenge: You're the dance master. Create a game where the player will need to dance in the correct sequence in order to solve the puzzle. View the lesson example here.
See this puzzle in action in the interactive story Discovering Josephine Baker, an incredible African American woman who was a dancer, singer, spy, and more!
Set up the page by adding a character and two interactive buttons: "left" and "right".
Code the character to go left when the button "left" is clicked using the Move To block.
Now, code the character to go right when the "right" button is clicked!
Create and initialize a text variable dance. Record the dance move by using the Add Text to Variable block. E.g. When you click on the button "left" it will add "left " to the text variable dance.
Add a "Check Dance Sequence" button. Use the Compare Text block to check to confirm if the dance sequence entered by the player is correct.
Create a celebratory page that appears when the puzzle is correctly solved!
Create a page that appears when the puzzle is not solved correctly and have players try again.
Personalize your game by changing the backgrounds, adding more images, or customizing the code for a more complex dance sequence. Try coding the dance sequence to loop on the "win" page!
Project Example for Students
Play through this lesson's example project created on Elementari. Use this example to guide and motivate your students.
Standards
CSTA K-12 Computer Science Standards (2017)
Algorithms & Programming
2-AP-10 - Use flowcharts and/or pseudocode to address complex problems as algorithms.
2-AP-13 - Decompose problems and subproblems into parts to facilitate the design, implementation, and review of programs.
2-AP-17 - Systematically test and refine programs using a range of test cases.
3A-AP-13 - Create prototypes that use algorithms to solve computational problems by leveraging prior student knowledge and personal interests.
3A-AP-16 - Design and iteratively develop computational artifacts for practical intent, personal expression, or to address a societal issue by using events to initiate instructions.
ISTE Student Standards
Creative Communicator
6b - Students create original works or responsibly repurpose or remix digital resources into new creations.
6d - Students publish or present content that customizes the message and medium for their intended audiences.
6c - Students communicate complex ideas clearly and effectively by creating or using a variety of digital objects such as visualizations, models or simulations.
Computational Thinker
5a - Students formulate problem definitions suited for technology-assisted methods such as data analysis, abstract models and algorithmic thinking in exploring and finding solutions.
Innovative Designer
4a - Students know and use a deliberate design process for generating ideas, testing theories, creating innovative artifacts or solving authentic problems.
4d - Students exhibit a tolerance for ambiguity, perseverance and the capacity to work with open-ended problems.
4c - Students develop, test and refine prototypes as part of a cyclical design process.
4b - Students select and use digital tools to plan and manage a design process that considers design constraints and calculated risks.
AASL Standards
Inquire
I.A.2 - Recalling prior and background knowledge as context for new meaning
I.B.3 - Generating products that illustrate learning.
I.C.4 - Sharing products with an authentic audience.