Learn Create Your Own Split Screen

Next Page

Most games written in Scratch will respond to keystrokes of one form or another.

Scratch provides a whole series of "event" blocks that lets you move your sprites around when certain things occur.

Events are important in Scratch, but in Javascript they are absolutely crucial.

Most Scratchers will have started with the standard Cat sprite, and some script that looks like this, letting you drive your sprite around in response to keystrokes.

We're going to do the same thing in Javascript.