![]() ![]() For each of the falling apples we might have a script like this: The control for the basket is very similar to the control program for the character in the maze game above, but this time we only need to allow movement along the x axis. It’s easy enough for pupils to make something like this in Scratch. Imagine a game in which a player moves a basket from left to right collecting, say, apples as they fall down the screen, or avoiding falling rocks. Once pupils have created a basic maze game using code like this, they can then let their creativity run free by making the game their own - can they introduce additional hazards into their maze? Could they modify the game so that it has progressively more difficult levels? Could they introduce a time limit, or a limited number of lives? Could they have the character be chased around the maze by a computer-controlled character? Could there be items to collect as they find their way around the maze? Can they introduce some sound effects, background music or create animated costumes that change as their character moves around? This ‘iterative development’ approach is common in software engineering, where a ‘minimum viable product’ might be used to prove the concept or test the market before more features are gradually added in response to requests, testing or feedback. The basics of the program might be as follows:įigure 1 - Scratch script for a character in a maze game, returning to a starting point at the bottom left if it touches the red walls of the maze Pupils could program the sprite so it can’t cross the walls of the maze, or increase the sense of jeopardy in the game by making the character return to the starting point each time it hits the walls. Controlling the player’s character could be done using the cursor keys, moving the character up, down, left or right by changing the sprite’s y or x coordinate according to the key pressed. In a maze game, such as the classic Pac Man, pupils would create a background of a maze to find a path through, with a predefined starting point and exit. ![]() The classic games from the 1970s and 80s are worth revisiting as a starting point. Initially, pupils might be better served by developing their fluency in Scratch programming through working with relatively simple games rather than face the frustration of not knowing how to implement a sophisticated idea from a familiar, modern game. Pupils’ own media use is likely to encompass a wide range of computer games as well as more passive forms of media, and these games might provide some inspiration for their own creative work in Scratch. From a computational thinking perspective, this introduces pupils to a tree-like pattern which has wide ranging applications in subsequent programming. Pupils’ stories can often be adapted into games, for example modifying a traditional, linear narrative into a branching, choose your own adventure game by including input blocks and then if … then … else blocks to determine how the story continues according to the input the player provides. ![]() The examples in the three previous posts ( patterns, composition and storytelling) use sequence, repetition and output, with some limited use of variables, but if pupils are to learn about selection, input and more extensive use of variables, their Scratch programming must extend the range of media they develop to include interactive elements, for example by making a video game. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |