Jump Scare Maze Game
Experience: 1st year, 4th quarter
Practice: Creating computational artifacts, Collaborating around computing, Testing and refining computational artifacts, and Communicating about computing
Concept: Algorithms, Control, Modularity, and Variables
Length: 80+
Overview and Purpose
Coders create a player controlled maze game with a funny jump scare that appears on one of the levels. The purpose of this project is to combine understandings from prior projects to create a game with a funny jump scare.
Preparation (20+ minutes)
Suggested preparation
Customizing this project for your class (10+ minutes): Remix the project example to include your own jump scare.
(10+ minutes) Read through each part of this lesson plan and decide which sections the coders you work with might be interested in and capable of engaging with in the amount of time you have with them. If using projects with sound, individual headphones are very helpful.
Download the offline version of Scratch: Although hopefully infrequent, your class might not be able to access Scratch due to Scratch’s servers going down or your school losing internet access. Events like these could completely derail your lesson plans for the day; however, there is an offline version of Scratch that coders could use when Scratch is inaccessible. Click here to download the offline version of Scratch on to each computer a coder uses and click here to learn more by watching a short video.
Resources for learning more
- BootUp Scratch Tips
- Videos and tips on Scratch from our YouTube channel
- BootUp Facilitation Tips
- Videos and tips on facilitating coding classes from our YouTube channel
- Scratch Starter Cards
- Printable cards with some sample starter code designed for beginners
- ScratchEd
- A Scratch community designed specifically for educators interested in sharing resources and discussing Scratch in education
- Scratch Help
- This includes examples of basic projects and resources to get started
- Scratch Videos
- Introductory videos and tips designed by the makers of Scratch
- Scratch Wiki
- This wiki includes a variety of explanations and tutorials
Getting Started (6-10+ minutes)
Suggested sequence
1. Review and demonstration (2+ minutes):
Begin by asking coders to talk with a neighbor for 30 seconds about something they learned last time; assess for general understanding of the practices and concepts from the previous project.
Explain that today we are going to create a player controlled maze game with a jump scare (the jump scare appears near the end of level 4 in the sample project). Display and demonstrate the sample project (or your own remixed version).
Resources, suggestions, and connections
Practices reinforced:
- Communicating about computing
Video: Project Preview (1:17)
Video: Lesson pacing (1:48)
This can include a full class demonstration or guided exploration in small groups or individually. For small group and individual explorations, you can use the videos and quick reference guides embedded within this lesson, and focus on facilitating 1-on-1 throughout the process.
Example review discussion questions:
- What’s something new you learned last time you coded?
- Is there a new block or word you learned?
- What’s something you want to know more about?
- What’s something you could add or change to your previous project?
- What’s something that was easy/difficult about your previous project?
2. Discuss or review (3+ minutes):
Have coders talk with each other about how they might create a project like the one demonstrated. If coders are unsure, and the discussion questions aren’t helping, you can model thought processes: “I noticed the sprite moved around, so I think they used a motion block. What motion block(s) might be in the code? What else did you notice?”
After the discussion, coders will begin working on their project as a class, in small groups, or at their own pace.
Practices reinforced:
- Communicating about computing
Note: Discussions might include full class or small groups, or individual responses to discussion prompts. These discussions which ask coders to predict how a project might work, or think through how to create a project, are important aspects of learning to code. Not only does this process help coders think logically and creatively, but it does so without giving away the answer.
Example discussion questions:
- What would we need to know to make something like this in Scratch?
- What kind of blocks might we use?
- What else could you add or change in a project like this?
- What code from our previous projects might we use in a project like this?
- What kind of sprites might we see in a maze?
- What kind of code might they have?
- How could we use a keyboard to control a character?
- How could we switch to a different level when we reach a goal?
- What could happen if we touch a wall?
3. Log in (1-5+ minutes):
If not yet comfortable with logging in, review how to log into Scratch and create a new project. Alternatively, coders can add on to their previous maze game if they worked on the An Amazing Maze Game project or the Blinking Maze Game.
If coders continue to have difficulty with logging in, you can create cards with a coder’s login information and store it in your desk. This will allow coders to access their account without displaying their login information to others.
Alternative login suggestion: Instead of logging in at the start of class, another approach is to wait until the end of class to log in so coders can immediately begin working on coding; however, coders may need a reminder to save before leaving or they will lose their work.
Why the variable length of time? It depends on comfort with login usernames/passwords and how often coders have signed into Scratch before. Although this process may take longer than desired at the beginning, coders will eventually be able to login within seconds rather than minutes.
What if some coders log in much faster than others? Set a timer for how long everyone has to log in to their account (e.g., 5 minutes). If anyone logs in faster than the time limit, they can open up previous projects and add to them. Your role during this time is to help out those who are having difficulty logging in. Once the timer goes off, everyone stops their process and prepares for the following chunk.
Project Work (75-115+ minutes; 2+ classes)
Suggested sequence
4. Review or introduce a maze game (20-60+ minutes, or at least one class)
If this is the first maze project, go through steps 4-8 of the An Amazing Maze Game lesson to learn how to create the base project of this maze game.
Otherwise, have coders open their previous project and give them about twenty minutes to read through their prior comments to review what they created, and to add even more to their project (perhaps some project extensions).
Resources, suggestions, and connections
Standards reinforced:
- 1B-AP-08 Compare and refine multiple algorithms for the same task and determine which is the most appropriate
- 1B-AP-10 Create programs that include sequences, events, loops, and conditionals
Practices reinforced:
- Communicating about computing
- Testing and refining computational artifacts
- Creating computational artifacts
Concepts reinforced:
- Algorithms
- Control
Suggested questions:
- How did your comments from your previous project help remind you what your code does?
- What could you change to improve your comments?
- What’s something new you’ve learned since you first created this project that you could add to make it even better?
5. Clean up your code with functions (10+ minutes)
Note: This chunk was a “Project Extension” in the An Amazing Maze Game lesson and a part of the main lesson in the Blinking Maze Game, so coders may have already completed this step.
5 minute demonstration
Pull up your code with the forever loop and ask the class to figure out what the three sections of the forever loop are (movement, checking if touching a wall, and checking if touching the goal). Tell the class we can make this much easier to read by putting each of these sections into their own functions (My Blocks) with a descriptive name.
Demonstrate how to do this with each of the three sections and make note that My Blocks don’t move on to the next algorithm until the previous block (function) is completed.
5+ minutes to clean up their code and 1-on-1 facilitating
Leave your code on the screen and give coders time to clean up their code. Encourage peer-to-peer assistance and facilitate 1-on-1 as needed.
Standards reinforced:
- 1B-AP-10 Create programs that include sequences, events, loops, and conditionals
Practices reinforced:
- Testing and refining computational artifacts
- Creating computational artifacts
Concepts reinforced:
- Algorithms
- Control
- Modularity
Video: Clean up your code with functions (3:54)
Quick reference guide: Click here
Suggested questions:
- How do functions and comments help you understand the parts of a project?
- What’s the difference between the two?
- What other projects could you make easier to read by creating functions for each part of the code?
- When shouldn’t you use functions and just keep a longer algorithm?
A note on using the “Coder Resources” with your class: Young coders may need a demonstration (and semi-frequent friendly reminders) for how to navigate a browser with multiple tabs. The reason why is because kids will have at least three tabs open while working on a project: 1) a tab for Scratch, 2) a tab for the Coder Resources walkthrough, and 3) a tab for the video/visual walkthrough for each step in the Coder Resources document. Demonstrate how to navigate between these three tabs and point out that coders will close the video/visual walkthrough once they complete that particular step of a project and open a new tab for the next step or extension. Although this may seem obvious for many adults, we recommend doing this demonstration the first time kids use the Coder Resources and as friendly reminders when needed.
6. Code a hidden jump scare (25+ minutes)
5+ minute small group discussion
Ask coders to get together in small groups or pairs to try and figure out how to add a funny jump scare in a maze game. Point out that there are several ways to create a funny jump scare in a maze game and encourage groups/pairs to compare and contrast each method they come up with. After a couple minutes of discussion, ask for volunteers to share different approaches with the full class (or larger groups) and compare each approach.
10+ minute reverse engineering
Without displaying the code, use the sample project (or your remixed project) to demonstrate how the funny jump scare occurs when the sprite reaches a certain location on the final level. Ask coders to try and reverse engineer what they saw in the sample project. Note, younger coders should continue to work in small groups or pairs for this process, but they will add the code to their own projects.
Every couple of minutes, demonstrate the jump scare in the sample project again and give one of the following hints:
- You will need a sprite for your funny jump scare and another sprite that triggers the funny jump scare
- The sprite that triggers the funny jump scare will blend into the background of your maze and won’t do anything until your player’s sprite touches it
- You’ll need to combine a control block with a sensing block before triggering your funny jump scare
- You’ll need to broadcast a message from your hidden sprite to the funny jump scare sprite
Bonus challenge if someone figures it out early: Try and figure out how to make it so the funny jump scare appears when the player’s sprite reaches a certain location on the screen (using X and Y coordinates) rather than bumping into a hidden sprite.
2+ minute demonstration and discussion
Demonstrate how to combine a wait until block with a touching block to detect when the player touches the hidden sprite. Point out the hidden sprite needs to cover the entire path or the player might miss it.
8+ minute implementation time
Give time for coders to either watch the video demonstration or use the quick reference guide to create their own funny jump scare. If coders have completed their funny jump scare, encourage them to spend time testing and debugging the project to make sure the funny jump scare only occurs on their final level.
Standards reinforced:
- 1B-AP-08 Compare and refine multiple algorithms for the same task and determine which is the most appropriate
- 1B-AP-10 Create programs that include sequences, events, loops, and conditionals
- 1B-AP-11 Decompose (break down) problems into smaller, manageable subproblems to facilitate the program development process
- 1B-AP-15 Test and debug (identify and fix errors) a program or algorithm to ensure it runs as intended
Practices reinforced:
- Communicating about computing
- Testing and refining computational artifact
- Creating computational artifacts
- Fostering an inclusive computing culture
Concepts reinforced:
- Algorithms
- Control
- Program development
Video: Code a hidden jump scare (5:19)
Quick reference guide: Click here
Video: Suggestions for reverse engineering (4:25)
7. Play testing (20+ minutes, or an entire class)
5+ minute play testing
Either in pairs or in small groups, give coders a few minutes to take turns trying out each other’s maze games and discussing how they used code and the image editor tools to create their mazes.
5+ minutes to revise their project and 1-on-1 facilitating
Give coders five or so minutes to revise their projects based on feedback and ideas they gathered from their peers. Encourage peer-to-peer assistance and facilitate 1-on-1 as needed.
I recommend repeating this process several more times to encourage sharing ideas and getting peer feedback
Standards reinforced:
- 1B-AP-10 Create programs that include sequences, events, loops, and conditionals
- 1B-AP-13 Use an iterative process to plan the development of a program by including others' perspectives and considering user preferences
- 1B-AP-16 Take on varying roles, with teacher guidance, when collaborating with peers during the design, implementation, and review stages of program development
Practices reinforced:
- Collaborating around computing
- Communicating about computing
- Testing and refining computational artifacts
- Creating computational artifacts
Concepts reinforced:
- Algorithms
- Control
Facilitation tip: It may help to model the kind of feedback one might give to a game like this. To practice this, display the maze I created for this lesson or one of the mazes I previously created in this studio. Ask coders what’s something they like about the project, what they might be curious about, and what suggestions they might have for improving the project(s).
Note: When testing out specific levels, a quick way to get to the desired level is to use code to switch to the specific backdrop when the green flag is clicked.
8. Add in comments (the amount of time depends on typing speed and amount of code):
1 minute demonstration
When the project is nearing completion, bring up some code for the project and ask coders to explain to a neighbor how the code is going to work. Review how we can use comments in our program to add in explanations for code, so others can understand how our programs work.
Quickly review how to add in comments.
Commenting time
Ask coders to add in comments explaining the code throughout their project. Encourage coders to write clear and concise comments, and ask for clarification or elaboration when needed.
Standards reinforced:
- 1B-AP-17 Describe choices made during program development using code comments, presentations, and demonstrations
Practices reinforced:
- Communicating about computing
Concepts reinforced:
- Algorithms
Video: Add in comments (1:45)
Quick reference guide: Click here
Facilitation suggestion: One way to check for clarity of comments is to have a coder read out loud their comment and ask another coder to recreate their comment using code blocks. This may be a fun challenge for those who type fast while others are completing their comments.
Assessment
Standards reinforced:
- 1B-AP-17 Describe choices made during program development using code comments, presentations, and demonstrations
Practices reinforced:
- Communicating about computing
Although opportunities for assessment in three different forms are embedded throughout each lesson, this page provides resources for assessing both processes and products. If you would like some example questions for assessing this project, see below:
Summative (Assessment of Learning)
The debugging exercises, commenting on code, and projects themselves can all be forms of summative assessment if a criteria is developed for each project or there are “correct” ways of solving, describing, or creating.
For example, ask the following after a project:
- Can coders debug the debugging exercises?
- Did coders create a project similar to the project preview?
- Note: The project preview and sample projects are not representative of what all grade levels should seek to emulate. They are meant to generate ideas, but expectations should be scaled to match the experience levels of the coders you are working with.
- Did coders use a variety of block types in their algorithms and can they explain how they work together for specific purposes?
- Did coders include descriptive comments for each event in all of their sprites?
- Can coders explain how they used broadcast blocks or My Blocks as functions to make their code more organized and easier to read (modularity)?
- Can coders explain how they used sensing blocks and broadcast blocks in their funny jump scare maze game?
- Did coders create a maze game with a funny jump scare that appears when a sprite touches another hidden sprite?
Formative (Assessment for Learning)
The 1-on-1 facilitating during each project is a form of formative assessment because the primary role of the facilitator is to ask questions to guide understanding; storyboarding can be another form of formative assessment.
For example, ask the following while coders are working on a project:
- What are three different ways you could change that sprite’s algorithm?
- What happens if we change the order of these blocks?
- What could you add or change to this code and what do you think would happen?
- How might you use code like this in everyday life?
- See the suggested questions throughout the lesson and the assessment examples for more questions.
Ipsative (Assessment as Learning)
The reflection and sharing section at the end of each lesson can be a form of ipsative assessment when coders are encouraged to reflect on both current and prior understandings of concepts and practices.
For example, ask the following after a project:
- How is this project similar or different from previous projects?
- What new code or tools were you able to add to this project that you haven’t used before?
- How can you use what you learned today in future projects?
- What questions do you have about coding that you could explore next time?
- See the reflection questions at the end for more suggestions.