testreqop.blogg.se

Orange ball on the red block bouncing game
Orange ball on the red block bouncing game









orange ball on the red block bouncing game

For the first one, put in a Go To X-Y block to set the starting position You'll need three When (Greenīlocks here. The action code, and some code which controls whether the To the mouse, but only cares about the X position. Want, you can test-run the project now to see how it "sticks" Position of the mouse, so from the Sensing menu grab the rounded Mouse X block and put it over the text field in the Set X block.

orange ball on the red block bouncing game

One axis of movement, so insert a Set X to block in the loop. To happen all the time, so drag over a Forever loop. Green Flag start button, so you'll need a When (Green Flag) The codeĬontrolled by the mouse as it moves left and right, trying to (Don't forget to zoom out if needed.) Make itĪbout the height of Scratch's mouse cursor, and be sure it covers Pick the bright red colorįrom the color squares, then draw a filled rectangle at theīottom of the area. Click OK, and that's all for this sprite.

orange ball on the red block bouncing game

Key, click and drag the mouse button to draw a straight Like (but not red you'll see why later), then, holding the Shift Then choose a mediumīrush size from the dropdown below the tools. You canĬustomize this sprite as you wish, but a simple line would do. Scripts area.) Roughly the size of the Green Flag or Stop button Them in the menu - they don't even have to be added to the buttons in the Looks menu? You can double click them to execute You may want to resize it to an appropriate size now or later New Sprite from file button and pick any sprite of aīall you like (many are under the 'Things' directory). Will keep it aloft with a moveable flat platform, like theĬlassic NES game Arkanoid. Of the screen will be off-limits to the ball, ending the game. The designīall sprite on the stage move, bouncing off the walls. Interaction can easily be extended to allow for two players, or Without touching the bottom of the stage. Use the mouse to control a platform, keeping a ball bouncing











Orange ball on the red block bouncing game