Friday, September 29, 2017

Report driving game Felice and Eiffler

Report: driving game

In this post, we are going to explain you how we made our driving game work. We used the programme "Scratch", in which you have to combine different blocks to make objects and other things respond to your actions.

We had to create a game using these 10 blocks obligatory:



This is how the game works:


There are two cars, so you can play alone or in pairs. To win, you have to cross the start/finish line 4 times. There are also two other checkpoints, which you have to go through so the round counts. You can move car 1 (the red one with no number) with the up arrow (forward) the left arrow (tu turn left) and the right arrow (to turn right). Car 2 (the yellow one with the number 2 on it) moves forward by pressing the "w", turns right by pressing the "d" and turns left by pressing the "a".

How we made the car move:



As you can see in the picture above, we used variables. To make the game work the way we wanted to, we created 12 variables.

Laps and check variables:
We used these to count how many times the player crosses the finish line, so he can win after the 4th time he does this. 

These blocks in this order make that if the finish line is touching the car, and the player has touched both checkpoints (so that variables check 1 and check 2 equal 1), the player laps (another variable) changes by 1. If the player laps is already 3, then a message its sent to the car object that says "won". You can't see this messaje when you are playing, but it makes that the car who recieved the message says "I win!!!". The instructions are twice because each player has their own variables (for example, "Player 1 laps", "Player 2 laps", "Player 1 check 2", etc.). That is because both cars don't have the same information, because they are not performing the same actions. Something extra is that we hid the "check" variables, so the player can't see them.

Speed variables:

What we did to increase the speed of the car was ordering the blocks so that if you are pressing the up arrow or the w arrow (depending on which car you are playing with), the "speed" variable of that car changes by 1. That makes the car go faster, because we put that when you click on a key that makes the car move (the up arrow, for example) it has to move as many steps as the speed is. For example, if "Speed 1" equals 2, then car 1 will move 2 steps. We made that for both cars, so we had to make 2 speed variables.
The car goes much slowlier when it is on the grass. That is because we programmed that if the car is touching the green color, the speed should set to 1, which makes the car only move 1 step. We also made that if you press the down arrow (in car 1) or the "s" (in car 2), the speed changes by -1. When you are in the grass, if your speed was already less than 0, it will change to -1.

Gas:
We made that the cars can run out of gas.
This is how we did it:

Both gas variables start with 5 (so both cars start with 5 liters). The game waits 8 seconds, and after that the gas variable changes by -1. That happens every 8 seconds. To recharge the gas (make the variable "gas" change and be higher), we created a new object (it's called Object 1 and it's the GAS that the player can see on the track). We ordered the blocks so that if the car is touching that object, its respective variable sets to 4 after a few seconds (only if your gas is already less than 4). If you don't recharge your gas, at some point your gas variable will equal 0, and that makes that the variable "finish" to 1 sets. We will explain how this works now.

Finish variables:
We created two finish variables, one for each car, so that the car stops when its "gas" variable is 0 or less (the car doesn't have any gas).
When the game starts, both "finish" variables are set to 0. When the "gas" variable is 0 or less, the "finish" variable of that same car sets to 1. And all the programmes that make the car move have a block before that says that should only happen if the "finish" variable is 0, so if it is 1 none of that will happen.

Report 3. Term Sofia Antreassian and Valentina Lemos

For this deadline we had to create a game called "Driving Game" in Scratch. In this post we are going to explain how we used the blocks and how they work. Also you will be informed about which were our problems and how we fixed it. 

We created a multiplayer game with two cars with different numbers and a speedway called "Driving Game" which has a low difficulty level. We have to use this blocks obligatory and if we don't have one, something has to be wrong. 


At the first time we didn't know how to use the operators, so we asked a partner for help and we understood everything!


 The car number 1 moves with the arrows and the car number 2 with the keys; a, s, d, w. If you press the right arrow (in the car 2 the key d) the car will turn 4 degrees to the right and with the left arrow (key a in the car 2) turns 5 degrees to the left. If you press the up arrow (in the car 2 the key w) the speed will change 0.4 each time you press it and if you press the down arrow (key s in the car 2) the variable for speed changes -0.4 each time you press it.
How the car moves:
                                              
There is 1 speed for each car and the faster the car drives, higher the speed number will be. If the car touches the grass, it will slow down until you drive back up to the track. 
How to make the car go slower on the grass:

The blue car has te variable "laps1". When car crosses the finish line(the black line), the game waits 0.7 seconds and then changes the variable for 1. if we do not put these seconds, they put a lot of laps and we only want one for each race. With the car number 2 it works exactly the same, but the only thing that changes it`s the name of the variable.
How the laps works:


Here are some images of the game:


Driving Game Report




First we started making a oval track. This is a very simple track, because is the first and later we do a more complex. This track and the sprites were provided by scratch. Then we start making the scripts.

First must we think how do to you can turn the car. So we put the scripts that are in the black circle. After it, we should make that the car go forward and to go back (circle red and green), that is when things get a little bit difficult.
First we should create a variable called speed. 


This photo above here is the variable. We can use it to move the car foward.
Then we have to consider that when the car touches the grass it goes slower. So use the scripts that are in the blue circle (the secon photo)

When we have finish the game we make a more complex track. Like this Photo under.


We also make optionals variables for "Laps" and for "Gas". The exit goal in the track count the Laps yo do. And the yellow circle recharge the gas. 

This are the scripts you needs to do to count the Laps you do. When you touch the black or white colour of the exit goal it cuount 1 Lap more.


We create the variable "Gas" to makes you know the autonomy of your car or how much gas did you have. You can also recharge your gas in the yellow circle.

To the last we duplicate all this scripts to another car. So you can play a race online with your friend. We painted the car of another color to distinguish them.


And that is how we created the game, we hope you enjoyed it !!! 

Ignacio Fromm and Mateo Burger 2.A

Report 3. Term Mayer & de Artiagoitia. Low difficulty game.

How we scripted our game

THIS GAME STARTS, WHEN YOU CLICK THE GREEN FLAG.

First car
First we had to make our car move. So, as you can see in the picture, we made it go forward with the up arrow key, turn 5 degrees left with the left arrow key and turn right with the right arrow key. The map has the race track and the grass, the green part. And the requirement was that when the car was on the grass, it had to move slower. I used the blocks “touching color  ?” and “set speed to 2”, to make the car only go forward by 2.

You can see that instead of using steps, we used a variable called speed. To create the variable you have to go to data and click “create a variable”. Once you have the variable, you have to make it increase using the block “change speed by -”.
You can also set the speed to 0, 1, 2, …
And to make the speed decrease, I had to make it change by a negative number (-0,15). At the top you can see a a block that says “set speed to 4”, that means that the speed will be 4 when the game starts (when you click the green flag).



Then we could also add more ideas we had. And I wanted a meter-counter, so I created a variable called “meters”, and the counter would change by 1, when you were moving, but not when it was touching the color green.
When the counter is on 750, the backdrop will change to another track. And when it arrives on 1500 it would change to another backdrop, where the winner of the two cars will glide in 1.5 seconds to a determined place.





Second car

With this car I made basically the same as with the first one. I had to change only a few things:
  • Instead of using the up, left, right and down arrow key y used the letters w (up), a (left), d (right) and s (down).
  • The variable “speed” was replaced by the variable “speed1”.

  • I also had to change some blocks, but specially the variable “meters”. I created a new variable, called “meters2”, because if you use the same meter-counter for to cars, it won’t work (increase).







Finish line


The finish line appears when the green flag is clicked.
I wanted to make the finish line disappear, when the backdrop changes to “blue sky2”, no matter which meter-counter arrives earlier to 1499.

Added information

First car:   

Second car:

Finish line:

Oval track:

Oval track2:

Blue sky2:

collage 1.jpg

Report - Driving Game (Casares & Schafer)

How we made our Driving Game






Our driving game looks like this.





First we did basic things: 




The first step was make the car move:  
For that, we used this controls: 
Secondly, the car has to move slower in the grass, like it would be in real life:

The game have also a multiplayer option, you can play with a friend.

To do that, we used this controls:

Enjoy playing our game!
Thanks for reading!

Scratch game first term Martin and Ranftl



Hi, in this post we are going to tell you the basics of how we created the driving Game.




We started first with an oval track(the oval track and the sprites were provided by scratch).Then we started to create the scripts.





Up to now everything in the scripts was inside a forever

-The first thing was making the car turn left and right wich we did this way :

(if the "left or right " arrow is pressed the car will turn in the following direction)
After it we should make the car go forward that is when things get a little bit difficult.
First we should create a variable called speed, it is made like this:
After you press the make a variable button it is pretty much self explanatory,but you just give it a name and now you can use it for what you want .
We will use this variable like this:
(when you press the up arrow the "speed" is going to raise)
And after this an other requirement was to move the car in many different speeds that is why the variable comes in.

As a solution to be able to regulate the different speeds we did the same with the down arrow(the thing shown  in the picture above)  but we change the positive value for a negative one.

To this we had to add as a requirement that if you are touching the green zone the car should go slower.That in the scripts was something like this:
By this every time you are touching the "grass" it should go slower.

As a non obligatory thing we added a lap counter,and it was something like this:
-we created a variable called laps 
-if you were touching the red zone "the start" the counter should go one up.
 
And that is how we created the game, we hope you enjoyed it and the only thing left  is to set the parameters in which you want the car to start and play !!!!