Scratch racing game




















The first step on creating your own car racing game is to open up Scratch on your desktop. When step 1 has been completed, and Scratch has loaded, you will need to delete the small sprite that is on the right side of the screen, this can be done by hovering over the cat in the grey area, a small drop down list will appear, you then press 'Delete'. The cat has been used as an example of a sprite. You now need to create a new sprite, one that is relevant to the game you are wanting to create.

You can create the sprite by drawing it free hand, or uploading one. To create one you click on the 'Paint new sprite' button. When you have completed step 3 a blank page will appear, it will have all the tools in which you will need to create your sprite.

When finished creating this sprite you need to add a small dot in front of the car, this will later be explained. When step 4 is completed and the new car sprite is created, you press 'OK'. When this has been done the new sprite that you have created will be on the Scratch page. This will be the sprite used for your racing car racing game sprite.

Adding another car to make it two player you hover over the sprite and click duplicate, this will then copy the racing car and make another one exactly like it. You may change the colour of the second sprite, you can do this by editing it. The edit button is under the heading 'Costumes' this will only appear when you have clicked on the sprite s you would like to edit. You should also add a small coloured dot in front of the duplicated racing car. The colour dot should not be a colour that is already used in the game.

When wanting to change the layout of the background, you click on the 'Stage' button, this will then allow you to create your own racing game background. When you have created the background for your car racing game you can move the cars around and place them wherever you like. To get your cars to move, you have to set them so they can move individually and go in different directions, you do this by making a script for them.

This is done by clicking on one of the sprites. This is the script for the pink racing car. The script for the duplicated car will be slightly different compared to the first racing car. Learn more about joining as an editor! See discussions in the Community Portal. Cookies help us deliver our services. By using our services, you agree to our use of cookies. More information in German OK. The Wiki is working on a dark theme, and you're seeing it! Got feedback? Post on the Wiki Forum Topic. Related Books Free with a 30 day trial from Scribd.

Katherine Hayles. Related Audiobooks Free with a 30 day trial from Scribd. Who Owns the Future? Jaron Lanier. Views Total views. Actions Shares. No notes for slide. Scratch Programming Racing Game Tutorial 1. Getting Started Log in to Scratch, then go into your projects and create a new project. Making a Car Next, right click on the cat and click delete. Making the Car Move To make the car move, we need to drag some blocks to make some code.

In the scripts tab of your car, use the blocks on the left of the screen to make this piece of code. Each colored piece can be found in the different colored sections on the left. Making the Car Move Right click on the top of the group of code and click duplicate. Then, attach the new group of code to the bottom of the first group. Making the Car Move To finally let the car move, make a new piece of code with a start block and a forever loop.

Next, drag the code you put together before into the forever loop. Now, hit play and use the arrow keys to drive the car. Variables Variables store information that we can use throughout the game. For this game, we are going to use a variable named speed to change the speed of the car. Using Speed We want the car to slow down when it is driving off-road. To do this, we are going to make a new script that sets the normal speed when the game starts. We also need to add speed into the movement code where 10 and used to be, and multiply speed by -1 to make the car move backwards for down arrow.

Laps Draw a new sprite that can serve as a start line for your race. Make it just wide enough to cover the track left to right. Duplicate the sprite, and put the copy on the other side of the track.

If you like, you can make the start line look different from the midpoint line by coloring it differently.



0コメント

  • 1000 / 1000