

~ Shows You How to Write Your Own Computer Games! ~
MicroWorlds 2.0 for Windows 95 is a great way for kids to get started on programming.
However, the documentation that comes with it is really awful. Most kids would quickly
become frustrated and bored long before they realized just what kinds of fun things they
can do with programming.
This guide is designed to introduce a kid who has never programmed before to MicroWorlds 2.0 for Windows 95. It makes it as easy as possible for a kid to start having fun creating their very own programs even games! The documentation (such as it is) that comes with MicroWorlds can then be used as a reference.
If you have any questions, suggestions, comments, or complaints please let me know at gregl@DELETE_THIS_PARTgregl.net (Delete the "DELETE_THIS_PART" before sending), or use the Turtle Tech Discussion Forum.
How to Get Microworlds
You can even get it for FREE!
Getting Started
Here's how to install MicroWorlds and get it started.
1st Project
This project will show you the very easiest way to make a very simple program with
MicroWorlds.
2nd Project
This project will show you how to make a turtle say "Hello, World!".
3rd Project
This project will show you how to use a very important part of MicroWorlds called the
Command Center.
4th Project
This project will show you how to make a turtle move a random direction and distance when
clicked. It will also how you how to write a "procedure".
5th Project
Your first game!
This project will show you how to make a real game. In this game, the turtle will move
randomly whenever you click it. Whoever can click it the most times in 10 seconds wins!
6th Project
This project will show you how you can give your game to your friends, even though they
dont have MicroWorlds! More There are many more things you can do in MicroWords.
More
A few more games.
You can order MicroWorlds 2.0 for Windows 95 (and also MicroWorlds 1.0 for DOS/Windows, and MicroWorlds 2.0 for Macintosh) from either of these folks:
You can download a FREE TRIAL copy from Logo Computer Systems. Be sure to download the right version -- they have one for Windows 95 computers, and another one for Macintosh computers.
If you use the free trial version, be sure to copy all the programming code you write in it to a word processor* and save it there, because the free trial version can't save the programs you write with it! If you forget to copy all the programming code to a word processor, you'll lose your code, so be careful!
I'll add exact steps on how to do that as soon as I have time. If you need help now, just email me.
*Or Notepad (Start | Programs | Accessories | Notepad). If it isn't there, try Start | Run, type in "notepad" (without the quotes), and press Enter. If that still doesn't work, try the same with Wordpad instead of Notepad.
If MicroWorlds is not already installed and started, heres how to do it:
Put the MicroWorlds 2.0 for Windows 95 CD in your computers CD-ROM drive.
You might automatically get a new window with some icons. If you do, double-click the Setup (or Setup.exe) icon. Then, follow the instructions that appear.
If you do not get a new window when you put the CD in, click on the Start button, then choose Settings, then Choose Control Panel, then double-click on the "Add/Remove Programs" icon. Then, click on the Install button. Then, click Next. When it finds Setup.exe on your CD-ROM drive, click Finish.
Follow the instructions that appear. If you want to be able to give your games and other programs that you write to your friends so that they can run them on their computers even though they dont have MicroWorlds, choose Custom (instead of Typical), and select the checkbox for Player. Of course, you can always go back and add it later if you chose Typical. You probably do NOT want to select the checkbox for movies, because that would take almost 250 Megabytes on your hard drive!
After you have installed MicroWorlds, start it by clicking the Start button, then choose Programs, then look near the bottom of the list and choose MicroWorlds 2.01 (your version number might be different).
It takes MicroWorlds a long time to start. When its ready, youll have a new set of 3 windows, with a little turtle in the middle of the largest window. Now youre ready to get started!
This project will show you the very easiest way to make a very simple program with MicroWorlds.
1. In the left-hand window, click on the button that looks like an eye (its the 5th button up from the bottom, below the button that looks like an arrow, and above the button that looks like a pair of scissors). The mouse pointer should change shape from an arrow to a little eye.
2. Click on the turtle in the middle of the main window. A window should appear, with the cursor flashing in the Instruction edit box.
(Another way to get the same window is to right-click on the turtle.)
3. With the cursor flashing in the Instruction edit box, type in "fd 2" (without the quotes).
4. Below the Instruction edit box, there are two radio buttons. One of them is named "Once", and the other is named "Many Times". Click on "Many Times" to choose it.
5. Click OK. The window should go away.
6. Click on the turtle. The turtle should start running.
Congratulations you have written your first real program! Welcome to the world of programming! You are now a real programmer! Of course, you can make much more fun and interesting programs than this one with MicroWorlds. This was just the very easiest program to start with.
7. When you want to stop the turtle, go to the Edit menu and choose Stop All.
(A quicker way to stop the turtle is to hold the Control key down on the keyboard and press the Break key on the keyboard, making sure to keep the Control key held down.)
8. Save your new project by going to the File menu and choosing Save Project. You might want to name it "Practice project 1". You can save it in any folder you want.
The "fd" command is short for "Forward".
"Many Times" means to keep repeating the command forever. So, it keeps moving forward 2 steps until you tell it to stop.
This project will show you how to make a turtle say "Hello, World!".
Since youre a real programmer now, you can do what all programmers traditionally do when they are learning a new programming language -- you can write a "Hello, World" program! Well make a turtle say "Hello, World!".
1. In the right-hand window, click on the button at the top that looks like a turtle hatching from an egg. A yellow border should appear around it, and the mouse pointer should change shape to a hand with a pointing finger.
2. Click anywhere in the large window. A new turtle will appear.
3. Click on the button that looks like a box with the letters a, b, & c in it (its right below the hatching turtle button). The mouse pointer should change to a pen.
4. Click in the main window, and drag down and to the right an inch or two. While you are dragging the mouse, a rectangle should stretch from where you first clicked to wherever you are dragging to. When you are done dragging, release the mouse. A text box should appear, named "text1".
5. Click the secondary mouse button (usually the right-hand mouse button) on the new turtle.
4. In the Instruction edit box, type in this programming code:
text1, insert "|Hello, World!" |
Be sure to get all four spaces in the right places, and be sure to get the two vertical lines. The vertical lines are the shifted backslash on most keyboards.
5. Leave the "Once" radio button chosen (dont choose "Many Times"!), and click OK.
Congratulations! Youve created your very own "Hello World" program! If you are very young, and you know a grown-up professional programmer, you might surprise him or her by saying you wrote a "Hello World" program all by yourself! They should be quite impressed!
The "text1" command tells the rest of the command what text box to write the text into.
The "insert" command adds text to the textbox wherever the cursor is flashing.
This project will show you how to use a very important part of MicroWorlds called the Command Center.
The command center is the bottom window, when the top button in that window is pushed in. This window allows you to type in all kinds of commands to do things and get information.
1. In the Command Center, type in "fd 10" (without quotes), and press Enter. The turtle should move forward.
2. Type in "bk 10", and press enter. This time, the turtle should move backward.
3. Type in "seth 45" and press enter. The turtle should change direction.
4. Type in "fd 10", and press enter. The turtle should move forward but this time, going in its new direction.
5. Type in "setc "red" (type in the quote before the "r", but not the other two quotes), and press enter. The turtle should turn red. "setc" means "Set Color".
Type in "setinstruction [launch [bk 20]]", and press enter. Then, click the turtle. The turtle should move backward, because the SetInstruction command changes the turtles instruction. Right-click on the turtle, and see if the Instruction edit box has changed.
Now you know how to use the Command Center. If you show MicroWorlds to a grownup programmer, you can tell them that the Command Center is the "debug window". Then, they will know what the Command Center is for.
This project will show you how to make a turtle move a random direction and distance when clicked. It will also how you how to write a "procedure".
1. Create a new project (choose File | New Project).
2. Go to the Pages menu and choose Procedures. The Procedures Page will appear.
3. Type in this code:
to click
seth random 360
fd random 9999
end
This is a MicroWorlds "procedure". It allows you to run as many commands as you want without typing each of them in the Command Window.
4. Go to the Pages menu, and choose Page1.
5. Right-click the turtle, and type in "click" (without the quotes) in the Instruction edit box.
6. Click OK.
7. Click the turtle. Each time you click it, the turtle should move a different direction, and a different distance.
The "seth" command is short for "Set Heading". It sets the direction the turtle aims at, in degrees.
The "random" command makes a random number lower than the number after it. So, "random 360" makes a random number from 0 to 359.
So, "seth random 360" aims the turtle in a random new direction from 0 to 359 degrees.
Youve already seen the "fd" command. "fd random 9999" moves the turtle forward a random distance. 9999 is the maximum, so this command moves the turtle forward any possible distance.
You can run this procedure from the Command Center. Simply type in "click" (without the quotes) in the Command Center, and press enter.
This project will show you how to make a real game. In this game, the turtle will move randomly whenever you click it. Whoever can click it the most times in 10 seconds wins!
1. Go to the File menu, and choose New Project.
2. Go to the Pages menu, and choose Procedures.
3. Type in this code:
to start
setinstruction [click]
setc "red
make "scr 0
opaque "score
score, ct
score, insert "| |
transparent "score
resett
when [timer = 100] [gameover]
end
to click
make "scr :scr + 1
seth random 360
fd random 9999
end
to gameover
setinstruction []
setc "black
opaque "score
score, ct
score, insert :scr
end
4. Go to the Pages Menu, and choose Page1.
5. Click on the button that looks like a finger pushing a button (its the fifth one down from the top, below the microphone).
6. Click in the somewhere in the upper left corner of the main window. A window should appear, which the cursor flashing in the Instruction edit box.
7. In the Instruction edit box, type "start" (without the quotes).
8. Click OK. A small button should appear named "start".
9. Click on the button that looks like a box with the letters a, b, & c in it (below the hatching turtle button).
10. Draw a small text box somewhere near the lower right corner of the main window. A text box should appear.
11. Click the button that looks like an eye (above the scissors button).
12. Click on the new text box you created in step 10. A window should appear.
13. In the Name edit box, type in "Score" (without the quotes).
14. Click OK.
15. Save this project (File | Save Project). You can call it "First Game".
Youre now ready to try your game! Click on your "start" button (you might have to click twice). The text box should disappear, and the turtle will turn red. You have ten seconds to click the turtle as many times as you can. Each time you click the turtle, it will move.
After 10 seconds are up, the turtle will turn black again and will not respond to your clicks. The text box will reappear, with your score.
To play the game again, click your start button again.
The "make" command creates a "variable". A variable is a special thing that can hold different values. "scr" is the name of the variable being created. We used "scr" because it looks kind of like "score" (we couldnt call it "score" because we also have a text box named "score"). The "0" at the end of that command tells the "scr" variable to hold a value of 0. Later, the code changes the value held by "scr" each time the turtle is clicked.
The "opaque" command makes the "score" text box visible, which is necessary to change the text in it.
The "ct" command is short for "Clear Text". So, the "score, ct" command clears out the text in the "score" textbox.
The "transparent" command makes the text box invisible. We wouldnt want it to hide the turtle during the game.
The "resett" command starts a timer (it stands for "Reset Timer), so well know when the ten seconds are up.
The "when" command tells MicroWorlds to always be checking for something. "[timer = 100]" tells the "when" command that the thing it should be checking for is when the timer reaches 100. The timer counts 10 for every second, so the timer reaches 100 after 10 seconds. "[gameover]" tells the "when" command what to do when the timer reaches 100. It tells it to run the "gameover" procedure.
In the "click" procedure, the "make" command looks a little different. On this line, the "make" command is told to recreate the "scr" variable, and the last part of the command ":scr + 1" tells it to make the new "scr" the value of the old "scr", plus 1. So, if "scr" was 4, then this command would recreate "scr" with a value of 5.
The "setinstruction []" command makes the turtle have no instruction, so that it does not respond when you click it.
If you want to change how long the game lasts, you can change the number in the "when" command in the "start" procedure. Remember, the timer counts 10 for every second.
If you want, here's a completed version of the game.
This project will show you how you can give your game to your friends, even though they dont have MicroWorlds!
To run your program on their computers, your friends only need to have the contents of the C:\Program Files\LCSI\MicroWorlds 2.01\Player directory. If you like, you can just download PlayrZip.exe from here. Copy it to a floppy for each of your friends, and also put this instructions file (ReadMe.txt) on the floppies (copy the text from your browser, then save it as a file).
If you dont have the C:\Program Files\LCSI\MicroWorlds 2.01\Player directory, you can install it from the original MicroWorlds CD. Just start Setup.exe, and choose Custom (instead of Typical), and select the checkbox for Player.
That directory is too much for one floppy disk, so it will have to be zipped. You might want to ask a grown-up to help you zip the contents of that directory into a self-extracting file. You can download the Zip program (PKZip 2.6 for Windows) from http://www.pkware.com/pkzip_win.html. You dont have to pay to download the shareware version.
In the instructions below, Ill assume that you used PKZip 2.6 for Windows to zip the contents of the C:\Program Files\LCSI\MicroWorlds 2.01\Player directory into a self-extracting file named "PlayrZip.exe".
1. Copy PlayrZip.exe to a new floppy disk put it in the floppy drive, click the Start button, choose Programs, and then choose Windows Explorer.
2. In Windows Explorer, in the left-hand window-pane, locate the "a:" drive, and right-click on it. A menu should appear.
3. In the menu, choose "Copy Disk". A new window should appear.
4. In the "Copy Window" window, click start. It will start copying from the disk.
5. When its done copying, it will ask for a blank disk to copy to. When that happens, pull out the original disk and put in the blank one. Then, click OK.
6. When its done, label the disk, and copy your project to it (your project will be wherever you saved it).
7a. Give the new floppy to your friend. Tell them to do this:
(you might want to put these instructions on the floppy disk, in a file named "Readme.txt", like this)
7b. Double-click PlayrZip.exe, and let it extract the player to C:\Microworlds\player.
7c. If they want, they can also copy the project file to their hard drive.
7d. Double-click on C:\Microworlds\player\MWPlayer.exe. This will start the player (it takes a little while to start). It will look like yours, but with only one window and not as many menus.
7e. Go to the File menu, and choose "Open Project". Then, browse to wherever they copied your program file to (or to the floppy, if they left it there).
Now, theyre ready to run your game!
Before you give the player and your programs to your friends, you should test them in the player and make sure they work there. You can do this by starting the MWPlayer.exe file in the C:\Program Files\LCSI\MicroWorlds 2.01\Player directory.
Thats all I had time to write about, but I'll add more as soon as I can.
Here are some games I wrote, but I haven't had time to write out the instructions for writing the games on your own. It might be fun to try to figure it out, though!
1. Race_Track.mw2
Justin, my older nephew, wanted a racing game. Here it is, although I plan to make it so you can "drive" the turtle with the keyboard arrow keys instead of with the mouse.2. Bee_and_Flowers.mw2
Fly the bee to as many flowers as you can in 30 seconds. Each time you reach the flower, you win a point, and the flower moves.3. Speed_Math.mw2
Answer as many addition questions as you can in the time given. You can tell it how hard the questions are allowed to be, and how much time you want it give you.4. Keyboard_Control.mw2
This isn't a game, but it's kinda fun anyway. It shows you how to control a turtle with the keyboard instead of with the mouse, which can make games more fun. That way, you can change the turtle's direction with the arrow keys, and change the turtle's speed with whatever other keys you choose, like maybe the 'z' and 'x' keys ('z' to slow down, and 'x' to speed up). As soon as I can find the time, I'll add keyboard control to Race_Track.mw2 and Bee_and_Flowers.mw2 above. Maybe you can beat me to it!Do you have ideas for other games, but aren't sure how to write them? Tell me about them by sending me email at gregl@DELETE_THIS_PARTgregl.net (Delete the "DELETE_THIS_PART" before sending), and if possible I'll try to help.
There are many more things you can do in MicroWords. What youve seen so far is only a tiny little bit of what you can do. You can read through the Users Guide to find out what other things you can do.
To get an idea of some other possibilities, go to the File menu and choose Open Project, and browse to the C:\Program Files\LCSI\MicroWorlds 2.01\MicroWorlds Samples directory. There are 14 example programs there for you to play with.
If you cant see all the text in some of them, you might have to switch to Small Fonts. You might want to get a grownup to help with this. Click on the Start button, then choose Settings, then choose Control Panel, then double-click on the Display icon. In the Display Properties window that pops up, click on the Settings tab. In the Settings tab, check the Font Size. If it says "Large Fonts", try changing it to "Small Fonts". Then, you will probably have to restart your computer.
If you have any questions about how to do stuff in Microworlds, be sure to try the Turtle Tech Discussion Forum!
Do you have games you've written? I'd like to link to your web page, or post them here. Of course, I'd list you as the programmer. Just let me know!
Do you know of other pages of MicroWorlds (or other Logo) games I can link to? If so, please let me know!
Here are some more ideas for things you can do with MicroWorlds.
Copyright ©1996-1998 by Greg Lovern. All rights reserved. No part of this document may be reproduced or used in any form or by any means -- graphic, electronic or mechanical, without written permission from the author. A reviewer may quote brief passages. A World Wide Web page may have hyperlinks to this page.
Back to Turtle Tech Home
This page was last modified sometime in the afternoon.