[Squeakland] Car race - dual tracks, timing,etc..
Herb Schilling
hschilling at nasa.gov
Wed Nov 10 17:46:34 PST 2004
Hi,
Just wanted to share something that I came up with. I am new to
Squeak so don't expect much! I really only know the EToys way of
doing things.
This is building on the track following car tutorials I have seen
elsewhere. I wanted to let the students design their track following
algorithms and then have races between two cards at a time. The
project that I created has:
- two identical tracks
- "boundaries" that, if you hit them with our car, puts you
out of the race
- timers for both races
- buttons to put the cars "on mark", to start them, and to stop them
- two cars with drive "drive" methods. ( The races are
started by sending the
cars a "drive" message )
I am going to use Squeak's collaborative tools ( badges ) to let the
students send me their cars so that I can race them on my machine
that has a projector attached to it. We are going to have a real
competition with prizes. We will be using this project next week.
Right now the way to tell the project which cars are in the race is a
little awkward. You have to drag a car's tile to the setCarOne or
setCarTwo scripts that are left open on the desktop. Then you have to
click the "run this script once" button. I wish there were a way to
drag and drop a car onto a button or morph and have that set the car
assign to a race. I don't know how to do that.
One thing I wanted to add was some kind of variability to the race
events. The students get the same kind of track project to test out
their cars so they will have a very good idea how fast they can
complete the race. Maybe I could add some random "wind" that slightly
perturbs the cars as they drive.
I also would like a way to make sure all the car drive methods have
the same ticks per second. I know I can do that manually but that's
no fun.
Here is the project:
http://explorersposts.grc.nasa.gov/post631/advisors/squeak/Car%20Race.006.pr
--
Herb Schilling
NASA Glenn Research Center
Brook Park, OH 44135
hschilling at nasa.gov
We cannot solve our problems from the same state of consciousness
that created them. - Albert Einstein
More information about the Squeakland
mailing list