Development Laboratory Welcome to Computer Game Development Laboratory Scratch Modules Welcome to the Build-It-Yourself Laboratory. I’m Seth, chief computer programmer at Build-It-Yourself. I’m John, chief inventor at Build-It-Yourself. www.build-it-yourself.com
Series and Parallel Execution Put on your socks. Then Put on your shoes. Take a shower. At the same time, Brush your teeth. www.build-it-yourself.com
Iteration Breath. www.build-it-yourself.com
Conditional Statements If there is candy on the plate, keep eating Conditional Statements If there is candy on the plate, keep eating! If not, ask for more! www.build-it-yourself.com
Variables The score in a game. www.build-it-yourself.com
Messages When you are hungry, call the pizza shop. Broadcasting messages allows communication between sprites and the stage. For example you may want to change a background color or costume when the space bar is pressed. www.build-it-yourself.com
Modular Programming 1) Create solutions quickly Modular Programming 1) Create solutions quickly. 2) Edit solutions quickly. 3) Make solutions more reliable. Spaghetti Code Ordered Code www.build-it-yourself.com
In many ways, a computer works just like your brain! Program Structures 1) Sequence vs. Parallel 2) Iteration 3) Conditional Statements 4) Variables 5) Messages 6) Modular Programming In many ways, a computer works just like your brain! www.build-it-yourself.com
Document how your program works. Add code comments. Program Guidelines Make descriptive names for all Scratch projects, costumes, sprites, variables, messages. Modularize the code. Break down code into simple, reusable, functional building blocks. Set up logical hand shaking rules so one module can easily drive another module. Initialize costume and variable states when the program starts. (position, size, show, value …) Avoid forever loops or make sure you stop a forever loop when it is no longer needed. Use ‘Repeat Until’ so big projects with many forever loops will not overload your processor. Document how your program works. Add code comments. www.build-it-yourself.com