Monday, October 10, 2016

Recap: Games Tools and Techniques

Recap: Games Tools and Techniques

Iv'e learned how to use a game tool and command the techniques of a Javascript code. I watched videos how the game tool is used to make the character move. I now know how to use a command tool, to enable the object/avatar to move.

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 3 x
Screen Shot 2016-09-06 at 9.15.18 AM.png
moveForward();
moveForward();
moveForward();
The move forward button allows the bird move forward 3 times.
Move forward,
move forward,
turn right,
move forward.
Screen Shot 2016-09-06 at 9.10.15 AM.png
moveForward();
moveForward();
turnRight();
moveForward();
The move forward button allows the bird to move forward 2 times. Turn right button enables the bird to switch on the right to move another space.  




Move Forward,
turn left,
move forward,
turn right ,
move forward.
Screen Shot 2016-09-06 at 9.17.35 AM.png
moveForward();
turnLeft();
moveForward();
turnRight();
moveForward();
The turn right and left tool enables the bird to switch opposite directions.
Turn right,
move forward,
turn left, move forward,
move forward,
move forward,
move forward,
turn left,
move forward.
Screen Shot 2016-09-06 at 9.24.16 AM.png
turnRight();
moveForward();
turnLeft();
moveForward();
moveForward();
moveForward();
turnLeft();
moveForward();
All the tools enable to move spaces, by using (turn right, turn left move forward)
Repeat 5 times (move forward)
Screen Shot 2016-09-06 at 9.29.20 AM.png
for (var count = 0; count < 5; count++) {
 moveForward();
}
Repeat 5 times enables to make the same movement.
Turn right,
repeat 5 times
(move forward)
Screen Shot 2016-09-06 at 9.31.31 AM.png
turnRight();
for (var count = 0; count < 5; count++) {
 moveForward();
}
Repeat 5 times is a special tool that is used for repeating the move forward.
Repeat 4 times
move forward,
turn left,
repeat 5 times move forward.
Screen Shot 2016-09-06 at 9.34.14 AM.png
for (var count = 0; count < 4; count++) {
 moveForward();
}
turnLeft();
for (var count2 = 0; count2 < 5; count2++) {
 moveForward();
}
The repeat tool is used for a shorter way to use one, to multiply the number as many times to move forward.
Repeat 3 times
move forward 2 times
turn left,
move forward 2 times,
turn left,
move forward 2 times.
Screen Shot 2016-09-06 at 9.37.28 AM.png
for (var count = 0; count < 3; count++) {
 moveForward();
 moveForward();
 turnRight();
}
moveForward();
moveForward();
turnLeft();
moveForward();
moveForward();
The grey repeat times is a block tool that isn’t allowed to be deleted.
Repeat until monster, move forward
Screen Shot 2016-09-06 at 9.40.25 AM.png
while (notFinished()) {
 moveForward();
}
Repeat until monster helps the computer understand what you are targeting for.




Repeat until monster, move forward 2 times,
turn left,
move forward 2 times,
turn left, move forward 2 times

OR

Move forward
move forward
turn left move forward
move forward.
Screen Shot 2016-09-06 at 9.43.22 AM.png
while (notFinished()) {
 moveForward();
 moveForward();
 turnLeft();
 moveForward();
 moveForward();
 turnLeft();
 moveForward();
 moveForward();
}
It can be used for the other block movements to be selected in the pink block.
Repeat until flower
Move forward
Turn left
Move forward
Turn right
Screen Shot 2016-09-06 at 9.47.24 AM.png
while (notFinished()) {
 moveForward();
 turnLeft();
 moveForward();
 turnRight();
}
(Repeat until daisy flower)  is exactly the same with the monster.
Repeat Until Flower
Turn right
Move forward
Turn left
Move forward
Turn right
Move forward
Turn left
Move foward
Screen Shot 2016-09-06 at 9.52.14 AM.png
while (notFinished()) {
 turnRight();
 moveForward();
 turnLeft();
 moveForward();
 turnRight();
 moveForward();
 turnLeft();
 moveForward();
}
Can be used multiplied times to move spaces, (Turn left, turn right, move forward).

Screen Shot 2016-09-06 at 10.01.47 AM.png
while (notFinished()) {
 moveForward();
 if (isPathLeft()) {
   turnLeft();
   moveForward();
 }
}

(If path do) is another shorter way to drag another block movement.
Repeat Until Akon
Move Forward
If path to left
Turn left
Move forward
Screen Shot 2016-09-06 at 10.12.13 AM.png
while (notFinished()) {
 moveForward();
 if (isPathLeft()) {
   turnLeft();
   moveForward();
 }
}
(If path do) is exact like the above explanation.
Move foward
Turn right
Turn right
Turn left
(Repeat until)
Screen Shot 2016-09-13 at 9.36.44 AM.pngScreen Shot 2016-09-13 at 9.36.28 AM.png
while (notFinished()) {
 if (isPathForward()) {
   moveForward();
 } else {
   if (isPathRight()) {
     turnRight();
   } else {
     turnLeft();
   }
 }
}
Grey blocks are mandatory to the movement.