1. For a customized game, you can add this at the beginning of your program:
wear "/img/red-car-glibersat", 50
The wear
command changes the
turtle's look to another image.
This image is a red car by an internet user called glibersat.
The requested height is 50, and the requsted
image picked by putting its addres in
quotes: "/img/red-car-glibersat"
.
Internet addresses are called URLs: every
image or webpage on the internet has a URL. You can change the URL to another image.
Try right-clicking on any image in your browser to find its URL. Here is one:
wear {height: 20, turtleTwist: -90}, "http://openclipart.org/image/300px/svg_to_png/190173/SimplePurpleCarTopView.png"
A trick: if the image you want is the wrong size or
direction, you can resize it or twist it by adding
special values in curly braces as an extra input to
wear
.
2. For a car with customized controls, you can add code like this:
tick 60, ->
line.
speed Infinity tick 60, -> if pressed "M" dot black, 30 if pressed "up" then fd 2 if pressed "left" then lt 1
Use if pressed "M"
to add the M key as a control.
By indenting dot black, 30
under that line, we
can draw an "oil slick" whenever M is pressed.
Q1: ____________________
Q2: ____________________
________________________
Challenge 1 done: ____
Challenge 2 done: ____
Challenge 3 done: ____
3. Questions and Challenges:
//
, URLs can name the website with the file. From which website is the example purple car image loaded?
dot black, 300
?
/img/s/rocket-ship
?
http://