Snap Documentation
IntroductionGet startedGlossaryReferences
1.0.0
1.0.0
  • Introduction
  • Get started
    • The First Day
    • Algorithms
    • Programming Languages
    • SNAP Self-Portrait
      • Do now
        • I Am ...
      • Labs
        • Getting to Know You
  • Snap!
    • Getting started with Snap!
      • Labs
        • Welcome to Snap! - Part 1
        • Welcome to Snap! - Part 2
    • Building Blocks
      • Do now
        • Tracing and Debugging
      • Labs
        • SNAP Scavenger Hunt
    • Drawing Shapes
      • Do now
        • Drawing a Triangle
      • Labs
        • Squares, Triangles, and Stars, Oh My!
    • Costumes
    • Animation
      • Do now
        • Sprite Communication
      • Labs
        • Sprites in Action
    • Storytelling
      • Do now
        • Knock Knock
        • Click Event Interaction
        • Movement Interaction
    • Project
      • Animated Storytelling
  • Loops
    • Loops
      • Do now
        • Introduction to Loops
      • Labs
        • Squares and Triangles Redux
    • Nested Loops
      • Do Now
        • Debugging Loops
      • Labs
        • Yellow Brick Road
    • Inputs and Conditionals
      • Do now
        • Stairs
      • Labs
        • What Shape is That?
    • Variables
      • Do now
        • Debugging
      • Labs
        • Guessing Game
    • Boole in the House
      • Do now
        • Variables Practice
      • Labs
        • Triangles of All Kinds
    • Combining Loops and Conditionals
      • Do now
        • Boolean Practice
      • Labs
        • What Goes Up...
    • Quiz
      • Loops
    • Pong
      • Do Now
        • Bouncing Ball
    • Project
      • Pong
      • Pong - Alternative
  • Customization
    • Abstraction and Friends
    • Procedures
      • Do now
        • Drawing Squares
      • Labs
        • Drawing Shapes
    • Customization - Part 1
      • Do now
        • Jumping
      • Labs
        • Let Me Check My Calendar
    • Customization - Part 2
      • Do now
        • Practice using Arguments
      • Labs
        • If My Calculations Are Correct...
    • Quiz
      • Customization
    • Project
      • Platform Game
      • Platform Game - Alternative
  • Lists
    • Intro to Lists
    • Static Lists
      • Do now
        • Letters of a Word
      • Labs
        • You Talkin' to Me?
    • List Practice - Part 1
      • Do now
        • Quote of the Day
      • Labs
        • Guess Who
    • List Practice - Part 2
      • Do now
        • Traversing List
      • Labs
        • Number Cruncher
    • Sequential Search
      • Do now
        • List Tracing
      • Labs
        • It's Around Here Somewhere
    • Lists
    • Guess My Word
      • Do now
        • Gentle Guess My Word
    • Project
      • Guess My Word
  • Cloning
    • Introduction to Cloning
      • Labs
        • Connect the Dots
    • Cloning Sprites
      • Do now
        • Star Wars Troopers
      • Labs
        • Lots of Balls
    • Communicating with Clones
      • Do now
        • Star Wars Troopers using Cloning
      • Labs
        • Fewer Balls
    • Quiz
      • Cloning
    • Space Invaders
    • Project
      • Space Invaders
  • Final Project
    • Design Basics
    • Research and Ideate
    • Defining Requirements
    • Building a Plan
    • Project Implementation
    • Project
  • References
    • How to's
      • Create Snap Account
      • Save & Share Projects
      • Snap Window
      • Sprites
      • Scripts
      • Movement & Position
      • Drawing
    • Readability
    • Snap elements
      • Motion
      • Looks
      • Sound
      • Pen
      • Control
      • Sensing
      • Operators
      • Variables
  • Glossary
Powered by GitBook
On this page
  • Lab
  • 1. Run, Spot, Run!
  • 2. Here be Dragons!
  • 3. Run Away!
  • Grading Scheme/Rubric

Was this helpful?

  1. Snap!
  2. Animation
  3. Labs

Sprites in Action

PreviousLabsNextStorytelling

Last updated 5 years ago

Was this helpful?

Lab

In this lab, you will use costumes and movement to create simple SNAP animations.

1. Run, Spot, Run!

1.1) In a SNAP project, click on the file menu, then click costumes. Import the costumes "dog2-b" and "dog2-c".

1.2) Write a script to make the sprite change costume each time the space bar is pressed. The sprite should switch back and forth between the two costumes.

1.3) Add code so that the sprite will face to the left, move a few steps, and change costume when the left arrow key is pressed. If you've done it right, it should look like the dog is walking when you press the left arrow key repeatedly.

1.4) Add code so that the dog can walk to the right as well.

2. Here be Dragons!

2.1) Create a new sprite. Following the same steps as in part 1.1, import the costumes "dragon1-a" and "dragon1-b"

2.2) Write a script to make the sprite appear to breathe fire when the 'f' key is pressed. The sprite should switch to the "fire-breathing" costume for a few seconds, then switch back to the "normal" costume.

2.3) Modify your code so that the dragon "attacks" the mouse pointer when the 'f' key is pressed. When the 'f' key is pressed, the dragon should take the following actions in order:

  • Make sure it is in the "normal" costume

  • Point at the mouse pointer

  • Glide to the mouse pointer's position

  • Change to the "fire-breathing" costume

  • Pause to breathe fire

  • Change back to the "normal" costume

3. Run Away!

3.1) Add another sprite to your program. (This sprite can have any costume you choose.)

3.2) Write a script to make this new sprite point away from the dragon and move when the 'r' key is pressed. (You'll need more than one block to do this.)

3.3) Modify your code so that instead of moving when the 'r' key is pressed, the new sprite moves when the dragon "attacks." The "fleeing" sprite should move when the dragon starts breathing fire.

3.4) Add a second sprite that runs away from the dragon as well.

Grading Scheme/Rubric

Lab 1.4 Criteria

2.2 Dragon breathes fire

0.25 points

2.3 Dragon attacks mouse pointer correctly

0.75 points

3.2 A sprite runs away from dragon

0.25 points

3.3 Sprite runs away when dragon breathes fire

0.5 points

3.4 Another sprite runs away too

0.25 points

PROJECT TOTAL

2.0 points

Menu->Costumes
Import Costumes