Scratch for Java

Tutorials

Seven small projects, meant to be done in order. Each one introduces one new idea and reuses everything before it.

All but the sixth need no downloads at all — every picture and sound they use is built into Scratch for Java.

Chapter What is new
1 Your first program A sprite, a costume, and run()
2 Make it Walk Several costumes, timers, animation
3 Catch the Coins A score, random numbers, collisions
4 Red Light, Green Light Messages between sprites
5 Guess the Number Asking the player something
6 Bouncing Hedgehog A full game, from a project template
7 Dodge the Rocks A window with a title, a game and a game over screen

For teachers

Chapters 1 to 5 and chapter 7 were written to be worked through at a keyboard in roughly a lesson each, and every code block on those pages is compiled as part of building this site, so nothing on them can quietly stop working.

Each chapter names the Scratch block it is replacing wherever there is one, so a class that came from Scratch can keep using the vocabulary it already has. The Differences to Scratch page collects the handful of places where Java genuinely asks you to think differently — the most important being that there is no forever loop and no per-sprite wait.

Tutorials

Create Shareable URL

Select Sections