| Keyboard Movement | ||||||
Flash PlayerThis site makes use of the Macromedia Flash plugin to display videos. Click here to download the Macromedia Flash player. Video Tutorials
Wherever you see the
eye icon
on this site, |
Using Starlogo TNG you can create keyboard
controlled movement very simply. We will look at two types of movement - First Person 3D movement, where you move forward using the up arrow and steer left or right using the left and right arrow keys, and 2D movement, similar to that used in 2D games like Pacman. First Person 3D Movement2D MovementIn 2D movement the turtle moves up, down, left or right depending on which key is pressed, similar to the way a Pacman character is moved. We do this by setting the heading for the turtle. Heading directions can be seen in the diagram below.
To create 2D movement, change the Move procedure from above (leave everything else the same) to the following:
|
|||||
|
|
||||||