Thursday, September 28, 2017

Car game

Car game

This is the game that we have made, it consists of 2 cars that go fast in the gray road and go slow in the grass. It is also a multiplayer game because there is a blue car and a red car. 

The game starts when the green flag is clicked, this is because in the scripts we have put "when (green falg) clicked". The cars go faster on the gray road, because it detects the color gray, so we told the cars to move more steps in the gray area and turn more degrees. In the green area the speed is the same but it moves less steps and turns less degrees when it detects the green color.

The cars have different keys but they have the same scripts. The blue car moves with the "w""a" and "d" keys. The red car moves with the "up arrow", "right arrow" and "left arrow" keys. When the cars sense these keys, they turn or go straightforward.


We've used all these blocks. Of course, the ones of sensing and movement have different things placed were we would have to put, for example "up arrow", we would also put "left arrow" or "right arrow".


This is what the screen looks like when we were programming the game. There you can see the scripts of the red car, which is selected in the lower left of the screen.


As you can see, here is almost the same programme as before but with slight changes. This is because it is the blue car's programme, so it has different keys as the red car.


Here is visual reference of what we've explained you earlier in this post, how the 'speed' of the cars work and how it detects color.

                                   Thanks for reading!
Collage:


No comments:

Post a Comment