1 / 6

Game Controls

Game Controls. Collision Detection. Moving with the Arrow Keys. Moving with the Arrow Keys.

ulani
Download Presentation

Game Controls

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Game Controls Collision Detection

  2. Moving with the Arrow Keys

  3. Moving with the Arrow Keys • There are still a few things in the Scratch user interface that you probably have not used yet. Experiment with the rotation controls shown below and make sure you understand the behavior of each. These will probably come in handy at some point!

  4. Moving with the Arrow Keys • To make a character move around based upon the keys that you have pressed. You will need to use one of the rounded "top block" pieces, such as in the example shown below. These can respond to key presses and start a script.

  5. Two characters running! • We are going to make a small game of tag in Scratch. Make a second character that is controlled by a different set of keys. • We want to be able to refer to our characters with intuitive names. By default, your sprites will probably be called things like Sprite1 and Sprite2. Rename them by clicking on the sprite and typing into the text box at the top of the screen, as shown below:

  6. Game of TAG! • We want one of the characters to react if the two characters touch. • Note: One really important thing to note here is that once we click the green flag, the scripts above will always be running: notice that they always have a white outline. Compare this to the script below that would only run once when you click the green flag. The functionality above is often called an infinite loop, and can be very helpful when we want something to continue running forever. OR

More Related