1 Starting to Program From Scratch Today we look at scratch, a new programming language that lets you create your own interactive stories, animations, games, music, and art. Prepared by Fred Annexstein University of Cincinnati Some rights reserved 007 Supporting Issues Programming Logic Control and Conditionals Game Design CS110: Intro to Computer Science Core Issue Programming Concepts
2 Beginning Programming Download Scratch from You may want to use the.zip archive saved to dir \temp rather than the installer.
3 Interpreted <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1- transitional.dtd"> Hello, World! Hello, World! Varieties of Computer Languages Compiled int main(int argc, char * argv[]) { printf("Hello world!"); exit(0); }
4 Getting Started in Scratch Interpreted Environment 8 Categories of Programming Objects Use Help Screens to Find what you need Find Conditionals and Boolean Expressions Find Loops
5 Game Programming: “Knock the Kitty in Hole” Basic Design: 1.Start the game with 0 score and define its duration (10 seconds) 2.Pick random location at top to drop the Kitty 3.Use a touching mouse? sensing event to grab kitty (broadcast event), and if mouse released continue to kitty drop. 4.Use a touching hole? sensing event to test if kitty is in hole and add to score. Then go back to step 2 to drop another kitty.
6 Game Programming: “Knock the Kitty in Can”
7 Project to turn in: 1.Modify the Game above to include another sprite into the action. 2.Turn in your project by saving the scratch program and uploading to Bb. 3.Final Homework project: Due Thursday Nov 29. Create your own game or story animation in Scratch.