Thursday, September 28, 2017

Report Driving car game Wunderlich and Ramirez Calvo



In this post you will be informed about how we worked during the third term with the car driving exercise. At the end of the second term we were working with a program, called Scratch. Half of our activities were with this program. With Scratch we learned a lot of things, which we will tell you later. On the other hand you will be informed about which were our problems, and how we fixed them. Also you are going to read about our achievements in the car driver game, which were the blocks that we used and how they work.

We had to create a game called “Driving Game”, which has the low difficulty level. This game started with a red car, which had some scripts and an oval track. A script is a consignment that you give to a character, in this case the car, so that it does what you want, for example: drive on the track. We are going to tell you later which were those scripts.


We had to do five different activities. To perform these activities we had to use some blocks obligatory. If we didn’t use one or more of those blocks, we were doing something wrong. So, for us, these blocks were very helpful!




If we didn’t have that extra help, we would not use the operators, and we would probably have something wrong. But operators were at first, a problem for us, because we didn’t know how to use them. But we fixed the problem by asking a classmate. When we understood how to use them, they helped us a lot and we were able to correct some things that we had wrong in our game.

In the following image, you will see which were the blocks, that the car has at the beginning of the game.




The first exercise was to make the car drive around the race and now we are going to explain you which blocks did we use to make that possible. We add the following blocks: If you press the right arrow key, the car will turn five degrees to the right. If you press the left arrow key, the car will turn five degrees to the left. If you press the up arrow key, the car increase the speed. And if you press the down arrow key, the car will decrease the speed.



Another exercise, was that when the car is touching the green area, the car has goes slower. This were the blocks that we used to make that possible:


Inside of the forever block, so that every time the car was touching the green area the car goes slowly, we put a "if...then. Else..." block. In the first space of this block we put a sensing block called if touching color..., in this case green. Then we put the "move...steps" control and there inside the speed variable

We had to create a speed variable to resolve the third exercise and that was another of our achievements. To resolve the more ideas exercise we had to create other variables, which we called laps and seconds. It was very difficult for us, because first we didn’t know how to use it. But this expanded our use of blocks, because now we can use some blocks, that we didn’t know that existed. When you create a variable, automatically the following blocks would appear:


If you want to create a variable follow these steps:

1. Go to the Data area
2. Click on the create a variable button
3. Name the variable

Another of our activities was to change the race course to a different background. To make this activity we did 3 different tracks, and each one is a different level. To do this we used these blocks: Still inside of the "forever" block, we put the "if...then" control. In the "if...then" control we put the "touching Object1" block. To understand that better, the Object 1 is a finish line that we created and every time a car touches that line, you wait 0.5 secs and then the laps number would change for example to 1. If the laps number is 3, then you pass the first level and obviously you go to the second one. The same happens with the third level, but with another number of laps (6). If you finally did 3 laps in each level you switch to the party background and there appears a message, saying that you won and if you want to play again click on the green flag!




The more ideas exercise says that we must create a new race court, so in the next image you will see the three different levels from our car game. The third level is the race court that we created.




Other activity was to create a multiplayer and play with a friend. In the multiplayer, we put the same blocks as the first car, but changing some things, like the variables, because for example if both cars would have the same speed, both would drive just as fast and any player would win. So for each variable we created a second one for the multiplayer, for example called speed 2. Also we changed the buttons from the multiplayer, for example to turn right instead of the right arrow we put the d key.



We learned how to make a count of laps. This was a little bit difficult for us, because we didn’t know that we could create laps, and it took us a while to discover them. But when we understood how to do it, it was not very difficult to do. They work like this. If one of the cars, crosses the finish line, then the number of laps which was for example 0, changes to 1. To make that possible we used this blocks:




The last exercise was to make an activity with the gas and to make that possible we first created a variable called senconds. We call it like this, because we make that the car has only 20 secs to go to the gas station and recharge the gas. Every time the car touches the gas station, the timer restarts and the car has 20 secs to go to the gas station again. If it doesn't make it on time, you go back to the first level. Finally this activity was another of our archivements, because it took us a lot of time to resolve it, but a classmate helped us a lot and we could do it!




No comments:

Post a Comment