How to Make a Two-Player Racing Game
A two player racing game is a project that lets one compete in racing against another person.
Preparation
Create three sprites:
- Player 1
- Player 2
- Finish Line
Player 1
First, create a new sprite, then change the costume to a car in the Sprites Library where there are sprites, add a if <> then block, then a Point in Direction block, and then add a Шаблон:B block. It should look like this:
Continue to do this with the left arrow, down arrow, and so on. Then, place the scripts in a forever block, and under a when green flag clicked block. It should look like this once finished:
Player 2
For the second player, get another car from the sprites library. Do the same thing as done with player one, only using the W (up), A (left), S (down), and D (right) keys. Once finished, it will look like this:
Backdrop
Go into Paint Editor and paint a backdrop.
Players
Once the backdrop is finished, add the following code to both players:
Instructions
Player 1 will move with the up, down, left and right keys, and Player 2 will move with the W, A, S and D keys.