CoderDojo Sligo "Above all, be cool"

17
CoderDojo Sligo "Above all, be cool" Code and notes by Michael Madden, 2012

description

CoderDojo Sligo "Above all, be cool". Code and notes by Michael Madden, 2012. Today's Ninja Challenge: Make Better GhostBuster Game. Background!. Chomp!. Blink!. Tongue!. Music!. Today's Big Ideas. Communicating Sprites. Animation. Loops. Build on last week …. - PowerPoint PPT Presentation

Transcript of CoderDojo Sligo "Above all, be cool"

Page 1: CoderDojo Sligo "Above all, be cool"

CoderDojo Sligo"Above all, be cool"

Code and notes by Michael Madden, 2012

Page 2: CoderDojo Sligo "Above all, be cool"

Today's Ninja Challenge:Make Better GhostBuster Game

Background!

Chomp! Blink!

Tongue! Music!

Page 3: CoderDojo Sligo "Above all, be cool"

Today's Big Ideas

Communicating Sprites

Animation

LoopsBuild on last week …

Page 4: CoderDojo Sligo "Above all, be cool"

No Game from Last Week?No Problem!

Go to http://scratch.mit.edu/users/coderdojosligoand download Ghostbuster-V2-MM

Page 5: CoderDojo Sligo "Above all, be cool"

Steps To Make Your Improved GameAdd an eyes-shut costume for each ghost,Code to make it animate between costumes

Select a music track for the Stage,Add code to make it play forever

Make ghosts broadcast a messagewhen they're eaten

Animate PacMan to chomp when it receives a broadcast that a Ghost is eaten

Make PacMan broadcast each new level, Make the stage change colour for them

Page 6: CoderDojo Sligo "Above all, be cool"

How Animation Works

Page 7: CoderDojo Sligo "Above all, be cool"

How Animation Works

Page 8: CoderDojo Sligo "Above all, be cool"

Animate Your Ghosts: Costume

Copy the original

Edit the copy

Make costume2 different

Page 9: CoderDojo Sligo "Above all, be cool"

Animate Your Ghosts: Code

At the start, not blinking

Every now and again…

Close eyes for ½ second,then open them again

Page 10: CoderDojo Sligo "Above all, be cool"

A Music Loop

Page 11: CoderDojo Sligo "Above all, be cool"

Broadcasts: How Sprites Communicate

1: Make new message

2: A sprite broadcasts it3: Others can react to it

All computer languages have ways of exchanging data/messages between different parts of code

Page 12: CoderDojo Sligo "Above all, be cool"

Broadcasts - A TutorialClick on the picture to see a Scratch tutorial on Broadcasts

Download the tutorial and see how it works

Page 13: CoderDojo Sligo "Above all, be cool"

Making PacMan Chomp: Costumes

TIP: to make sure only difference is mouth,re-draw with no mouth, copy, then

add different mouths in each costume.

Page 14: CoderDojo Sligo "Above all, be cool"

Making PacMan Chomp: Code

All ghosts:Add 1 line PacMan:

Add block of code

Make new message

Page 15: CoderDojo Sligo "Above all, be cool"

Change Background Colour at Each Level

PacMan: Add 1 line

Stage: Add 2 blocks of code

Page 16: CoderDojo Sligo "Above all, be cool"

At the End …Upload your project to the Scratch Website

user: coderdojosligo password: _______

Access it from home

Improve it

Show your friends!

Page 17: CoderDojo Sligo "Above all, be cool"

Keep In Touch!

Email: [email protected]

Twitter: http://www.twitter.com/coderdojosligo

Scratch: http://scratch.mit.edu/users/coderdojosligo

Web: http://zen.coderdojo.com/dojo/109