Silicon Valley Hacker Culture Introduction to Scratch (continued) UC Santa Cruz CMPS 10 – Introduction to Computer Science www.soe.ucsc.edu/classes/cmps010/Spring11.

Slides:



Advertisements
Similar presentations
Create a Simple Game in Scratch
Advertisements

Summer Computing Workshop. Introduction to Variables Variables are used in every aspect of programming. They are used to store data the programmer needs.
Create a Simple Game in Scratch
Mission Technology Introduction to Scratch! June 2007.
Scratch for Storytelling Dr. Ben Schafer Department of Computer Science University of Northern Iowa.
Harry Potter Scratch Game
Code Club Session 3 Shark Eats Fish. Picture of finished product here.
Write Your First Computer Game!. Coding: Programming Languages Just like you can speak Chinese to someone who understands Chinese to tell them what to.
Mrs. Chapman. Tabs (Block Categories) Commands Available to use Script Area where you type your code Sprite Stage All sprites in this project.
Introduction to Scratch UC Santa Cruz CMPS 10 – Introduction to Computer Science 13 May 2011.
1 An introduction to programming concepts with Scratch.
What is Scratch? Scratch as Logo Dr. Ben Schafer Department of Computer Science University of Northern Iowa.
Mr. Wortzman. Tabs (Block Categories) Available Blocks Script Area Sprite Stage All sprites in this project.
Fish Chomp. The screen where you can see what happens when you play your game is called the STAGE. The SCRIPT BANK is where the types of instructions.
INTRODUCTION TO THE SCRATCH PROGRAMMING ENVIRONMENT.
Microsoft Windows LEARNING HOW USE AN OPERATING SYSTEM 1.
1 iSee Player Tutorial Using the Forest Biomass Accumulation Model as an Example ( Tutorial Developed by: (
Code Club Session 2 Dance Party. What will we learn ?  How to change the background  How to create animations  How to make objects talk to each other.
Introduction to Scratch!
Using MIT Scratch for Programming and Control Exercise 3 Ball Game Year 9 ICT Autumn Term 2007.
We will be creating a spaceship that simulates real movements in space. The spaceship will fire a laser beam that can destroy targets. The spaceship will.
Summer Computing Workshop. Session 2 Input in Scratch  Multi-Character input - This is used when the user is prompted to enter a number or word.  Problems.
How to make a Shooting Target game in Scratch!. WE ARE GOING TO MAKE A TARGET GAME. This game will have: A Target that will move when clicked. A Timer.
Art 321 Lecture 7 Dr. J. Parker. Programming In order to ‘make things happen’ on a computer, you really have to program it. Programming is not hard and.
Introduction to Scratch Scratch as Logo Dr. Ben Schafer Department of Computer Science University of Northern Iowa.
2015 CSE/EGR Summer Camps 1 Computer Science Concepts 1. What is an algorithm? 2. Binary information coding 3. Programming concepts via Scratch Designed.
Moving Sprites in Scratch Exploring Computer Science – Lesson 4-4.
Introduction to Programming G50PRO University of Nottingham Unit 2 : Introduction To Scratch Paul Tennent
Variables. Todays Lesson  In todays lesson you are going to:  Learn to use variables  Learn to ask for user input  Learn to save the users response.
Game Maker – Getting Started What is Game Maker?.
Fish Chomp. The screen where you can see what happens when you play your game is called the STAGE. The SCRIPT BANK is where the types of instructions.
Algorithms Writing instructions in the order they should execute.
Creating a Simple Game in Scratch Barb Ericson Georgia Tech June 2008.
Create a Halloween Computer Game in Scratch Stephanie Smullen and Dawn Ellis Barb Ericson October 2008.
Computer Programming Modeling a Passive Solar Home.
Introduction to Computer Programming - Project 2 Intro to Digital Technology.
Using MIT Scratch for Programming and Control Exercise 4 – Cat and Dog game Year 9 ICT Autumn Term 2007.
Scratch for Interactivity Dr. Ben Schafer Department of Computer Science University of Northern Iowa.
How to create a basic game in Scratch. The Scratch Stage The Scratch stage is 480 pixels wide and 360 pixels high x increasesx decreases.
Moving Sprites in Scratch Exploring Computer Science – Lesson 4-4.
Today's Ninja Challenge: Write Your First Computer Game!
1 CSC 221: Computer Programming I Fall 2009 Introduction to programming in Scratch  animation sprites  motion, control & sensing  costume changes 
ICT/COMPUTING RULES Only use software allowed by the teacher
Computer Programming Modeling a Passive Solar Home.
Computer Programming with Scratch JAOIT 8. Scratch Scratch is a programming language that makes it easy to create your own interactive stories, animations,
Creating a Simple Game in Scratch Barb Ericson Georgia Tech May 2009.
Introducing Scratch Learning resources for the implementation of the scenario
Scratch Programming Cards
Introduction to Scratch
Create a Halloween Computer Game in Scratch
Scratch for Interactivity
Scratch Unit Overview We are going to look at computer programming and how to create your very own computer game The piece of software we will be using.
Scratch: iteration / repetition / loops
Scratch for Interactivity
Learn… Create… Program
Go to =>
Learn… Create… Program
Go to =>
Moving Sprites in Scratch
Go to =>
Go to =>
Learn… Create… Program
Learn… Create… Program
Creating a Simple Game in Scratch
CSC 221: Introduction to Programming Fall 2018
Presentation transcript:

Silicon Valley Hacker Culture Introduction to Scratch (continued) UC Santa Cruz CMPS 10 – Introduction to Computer Science 16 May 2011

UC SANTA CRUZ Homework #4  To be posted online later today  Two parts  A skills-building part that builds up capability through a series of assignments  An open-ended creative part  Do something interesting using Scratch

UC SANTA CRUZ Silicon Valley Hacker Culture  Going back to at least 1975 (and drawing inspiration from the 60s counter culture movement) Silicon Valley has hosted a culture of people hacking with technology  Hacking – playing around with technology, in ways that sometimes were, and sometimes were not aligned with its original purpose  Homebrew Computer Club ( )  A club for early personal computer enthusiasts  The Apple I computer emerged out of this club

UC SANTA CRUZ Silicon Valley Hacker Culture Today  Hacker Dojo  A community of engineers, artists, scientists, activists, entrepreneurs and other creative people centered around a co-working and social facility in Mountain View, CA.   TechShop  A membership-based workshop that provides members with access to tools and equipment, instruction, and a community of creative and supportive people so they can build the things they have always wanted to make.  Computer-controller laser cutters, 3D printers, sewing machines, wood router, etc.  California locations in Menlo Park & San Francisco, San Jose (summer 2011) 

UC SANTA CRUZ Maker Faire  May 21-22, San Mateo Fairgrounds   Large show featuring many people who are creating novel things, many using computer controllers or software  Inspiration to become a maker, someone who makes things (as opposed to someone who only consumes things)  Extra credit deal:  Go to Maker Faire  Submit your ticket stub, along with a 3-4 paragraph description of what you liked and didn’t like about the show  Due end-of-day, day of the final exam.  Up to 10 extra credit exam points

UC SANTA CRUZ Sprites Sprites are anything visual you see on screen. Each Sprite has an associated block of program code. Box of available sprites On-screen sprite

UC SANTA CRUZ Scripts Clicking on a sprite brings up its associated code (middle pane) Script pane (code pane) This code controls how this sprite moves

UC SANTA CRUZ How to program Drag and drop code blocks into code pane Can be free floating, or connect to other sequences of code Can also select and move code from code pane to remove Double-click on code block to execute – you’ll see results in the upper right window

UC SANTA CRUZ Different kinds of statements Different buttons in the upper left window bring up different programming blocks Click a button here to bring up different code blocks here

UC SANTA CRUZ Conditionals in Scratch  Scratch supports conditionals  if condition then action  if condition then action1 else action2  These are found in the Control tab  Notice that the condition is a smooshed hexagon shape  Conditions can be found under the operators tab (green) and the sensing tab (blue)  Conditions are dragged and dropped into the hexagon shaped holes in a conditional

UC SANTA CRUZ Example of a conditional: Collision detection  Collision detection  Use the “touching” condition, found on the Sensing tab  Clicking on the black triangle brings up a pull-down menu  Mouse-pointer is the arrow you move with the mouse  Edge is the edge of the stage (white window in upper right of screen)  Anything below this is the name of another sprite  “Puffy” is the same of a sprite  Example  After the green flag is pressed, do forever  Move forward 5 steps  Turn two degrees  If the sprite is touching another sprite named Puffy  Move 20 steps backwards

UC SANTA CRUZ Example of a conditional: Key input  Key input  Use the “Key ___ pressed?” condition, found on the Sensing tab  Clicking on the black triangle brings up a list of keys that can be detected  Example  After the green flag is pressed, do forever  Move forward 5 steps  Turn two degrees  If the space bar is pressed  Move backwards 20 steps

UC SANTA CRUZ Variables  A variable is a named storage location for data  Can use variables to remember things for later…  E.g., remembering a random number  … or for counting things  E.g., a score, the number of times something happened, etc.  To create a variable  Click on “Make a variable” on the Variables tab  Will ask you:  For a name for the variable (pick a descriptive name)  Whether the variable is for just one sprite, or for all sprites  Example  Variable named “random-number” Set variable to a specific value Change variable + or - by a specific change in value Is the variable visible in the stage window

UC SANTA CRUZ Variables example: high-low game Pick a random number between 1 and 100 Put the random number in the variable named random-number Repeat until the player’s answer is the same as the random number (the player guessed correctly) Ask the player to guess a number between 1 and 100 If the guess is less than the random number, say “Too low!” If the guess is greater than the random number, say “Too high!” If the guess is the same as the random number, then the “repeat until” loop will stop, and the program will reach here (the first statement after the repeat until loop). Say, “You guessed it!”

UC SANTA CRUZ Coordination between sprites: broadcast  Sometimes you want one sprite to cause another sprite to do something  This is accomplished by the first sprite broadcasting a message  The second sprite receives the message, and then does something  Example When I see the space bar has been pressed… … I say “Hello!” hello message

UC SANTA CRUZ Pop quiz  Open-notes, no computers, cellphones, etc.  Questions are evenly weighted 1.Which type of switching (circuit or packet) does the Internet use?  Packet switching 2.What technology did Tim Berners-Lee invent so that every computer could display internet-hosted documents?  HTML Also acceptable: Web browser 3.What technology did Tim Berners-Lee invent so that every internet resource has a human-friendly name?  URL 4.PHP is an example of a language that runs inside of what?  PHP runs inside a web browser. Also acceptable: HTML (PHP is a programming language with statements interspersed among HTML elements) 5.What is a web application?  A software application that runs inside a web server (and also has some code running inside a web browser) 6.Give an example of a Web 2.0 web site  Many possibilities: Facebook, Google Maps, the Scratch website, YouTube, etc.