Pages

Tuesday, 11 October 2016

Recap : Games - Tools and Techniques

Recap : Game - Tools and Techniques



Game Tool Command

Game Tool

Javascript Code

Technique - What does the tool do?

Move Forward
moveForward();
moveForward();
The move forward tool enables the object or character to move forward
Move Forward
moveForward();
moveForward();
moveForward();
The move forward tool enables the object or character to move forward
Move Forward
Move forward
Turn right
Move Forward
Screen Shot 2016-09-06 at 9.21.14 AM.png
moveForward();
moveForward();
turnRight();
moveForward();
The move forward tool enables the object or character to move forward

The turn right tool enables the object or character to turn right.
Move Forward
Turn Left
Move Forward
Turn right
Move forward
Screen Shot 2016-09-06 at 9.26.33 AM.png
moveForward();
turnLeft();
moveForward();
turnRight();
moveForward();
The move forward tool enables the object or character to move forward

The turn right tool enables the object or character to turn right

The turn left tool enables the object or character to turn left
Turn Right
Move Forward
Turn Left
Move Forward
Move Forward
Move Forward
Turn Left
Move Forward
Screen Shot 2016-09-06 at 9.28.58 AM.png
turnRight();
moveForward();
turnLeft();
moveForward();
moveForward();
moveForward();
turnLeft();
moveForward();
The move forward tool enables the object or character to move forward

The turn right tool enables the object or character to turn right

The turn left tool enables the object or character to turn left
Repeat 5 times
Do Move forward
Screen Shot 2016-09-06 at 9.31.30 AM.png
for (var count = 0; count < 5; count++) {
 moveForward();
}
The repeat 5 times tool enables the character or object to repeat one move five times

The move forward tool enables the object or character to move forward
Turn Right
Repeat 5 times
Do Move forward
Screen Shot 2016-09-06 at 9.33.02 AM.png
turnRight();
for (var count = 0; count < 5; count++) {
 moveForward();
}
The turn right tool enables the object or character to turn right

The repeat 5 times tool enables the character or object to repeat one move five times

The move forward tool enables the object or character to move forward
Repeat 4 times
Do Move forward
Turn Left
Repeat 5 times
Do Move forward
Screen Shot 2016-09-06 at 9.34.52 AM.png
for (var count = 0; count < 4; count++) {
 moveForward();
}
turnLeft();
for (var count2 = 0; count2 < 5; count2++) {
 moveForward();
}
The repeat 4 times tool enables the character or object to repeat one move five times

The turn left tool enables the object or character to turn left

The repeat 5 times tool enables the character or object to repeat one move five times

The move forward tool enables the object or character to move forward
Move Forward
Move Forward
Turn Right
Move Forward
Move Forward
Turn Right
Repeat 3 times
Do Move Forward
Screen Shot 2016-09-06 at 9.36.30 AM.png
moveForward();
moveForward();
turnRight();
moveForward();
moveForward();
turnRight();
for (var count = 0; count < 3; count++) {
 moveForward();
}
The move forward tool enables the object or character to move forward

The repeat 3 times tool enables the character or object to repeat one move five times

The turn right tool enables the object or character to turn right.
Repeat until Pig
Do Move Forward
Screen Shot 2016-09-06 at 9.38.58 AM.png
while (notFinished()) {
 moveForward();
}
The repeat until pig  tool enables the character or object to repeat one or multiple moves until the object

The move forward tool enables the object or character to move forward
Move Forward
Move Forward
Turn Left
Move Forward
Move Forward
Turn Left
Repeat until Pig
Do Move Forward
Screen Shot 2016-09-06 at 9.41.20 AM.png
moveForward();
moveForward();
turnLeft();
moveForward();
moveForward();
turnLeft();
while (notFinished()) {
 moveForward();
}
The move forward tool enables the object or character to move forward

The turn left tool enables the object or character to turn left.

The repeat until pig  tool enables the character or object to repeat one or multiple moves until the object
Repeat Until Flower
Do move forward
Turn Left Move Forward Turn Right
Screen Shot 2016-09-06 at 9.44.31 AM.png                
           while (notFinished()) {
 moveForward();
 turnLeft();
 moveForward();
 turnRight();
}
Con
The repeat until Flower  tool enables the character or object to repeat one or multiple moves until the object

The move forward tool enables the object or character to move forward

The turn left tool enables the object or character to turn left

The turn left tool enables the object or character to turn left
Repeat Until Flower
Do Turn right
Move Forward
Turn Left
Move Forward
Screen Shot 2016-09-06 at 9.49.00 AM.png
while (notFinished()) {
 turnRight();
 moveForward();
 turnLeft();
 moveForward();
}
The repeat until Flower  tool enables the character or object to repeat one or multiple moves until the object

The turn right tool enables the object or character to turn right

The move forward tool enables the object or character to move forward


The turn left tool enables the object or character to turn left
Repeat Until Flower
Do Move Forward
If path to the left
Do turn Left Move Forward
Screen Shot 2016-09-06 at 9.51.56 AM.png
while (notFinished()) {
 moveForward();
 if (isPathLeft()) {
   turnLeft();
   moveForward();
 }
}
The repeat until Flower  tool enables the character or object to repeat one or multiple moves until the object

The move forward tool enables the object or character to move forward

The if path to the left/right enables the object or character to choose if there is a path to the left/right they can turn left and move forward.
Repeat Until Flower
Do Move Forward
If path to the right
Do Turn Right
Move Forward
Screen Shot 2016-09-06 at 10.04.42 AM.png
while (notFinished()) {
 moveForward();
 if (isPathRight()) {
   turnRight();
   moveForward();
 }
}
The repeat until Flower  tool enables the character or object to repeat one or multiple moves until the object

The move forward tool enables the object or character to move forward

The if path to the left/right enables the object or character to choose if there is a path to the left/right they can turn left and move forward.
Repeat Until Acorn
Do Move Forward
If Path to the left
Do Turn Left
Move Forward
Screen Shot 2016-09-06 at 10.10.22 AM.png
while (notFinished()) {
 moveForward();
 if (isPathLeft()) {
   turnLeft();
   moveForward();
 }
}
The repeat until acorn  tool enables the character or object to repeat one or multiple moves until the object

The move forward tool enables the object or character to move forward

The if path to the left/right enables the object or character to choose if there is a path to the left/right they can turn left and move forward.
Repeat Until Acorn
Do Move Forward
If Path to the Right
Do Turn Right
Move Forward
Screen Shot 2016-09-06 at 10.12.37 AM.png
while (notFinished()) {
 moveForward();
 if (isPathRight()) {
   turnRight();
   moveForward();
 }
}
The repeat until acorn  tool enables the character or object to repeat one or multiple moves until the object

The move forward tool enables the object or character to move forward

The if path to the left/right enables the object or character to choose if there is a path to the left/right they can turn left and move forward.
Repeat Until Acorn
Do If path ahead
Do Move Forward
Else Turn Left
Screen Shot 2016-09-06 at 10.24.54 AM.png
while (notFinished()) {
 if (isPathForward()) {
   moveForward();
 } else {
   turnLeft();
 }
}

The repeat until acorn  tool enables the character or object to repeat one or multiple moves until the object

The move forward tool enables the object or character to move forward

The if path to the ahead enables the object or character change its direction and moveforward or the can make another decision to turn left or right
Repeat Until Acorn
Do if path ahead
Do move forward
Else
If path to the right
Do turn right
Else turn left
Screen Shot 2016-09-07 at 1.34.22 PM.png
while (notFinished()) {
 if (isPathForward()) {
   moveForward();
 } else {
   if (isPathRight()) {
     turnRight();
   } else {
     turnLeft();
   }
 }
}
The repeat until acorn  tool enables the character or object to repeat one or multiple moves until the object

The move forward tool enables the object or character to move forward

The if path to the left/right enables the object or character to choose if there is a path to the left/right they can turn left and move forward.

The turn right tool enables the object or character to turn right

The turn left  tool enables the object or character to turn left

This table shows what i have learnt from DigiTech. What it shows is codes and screenshots of the moves that i did. The site I used to do this was code.org. After we completed a level we had to take a screenshot and post it onto the table, then we had to insert the code into the table.