Classic Computer Magazine Archive A.N.A.L.O.G. ISSUE 78 / NOVEMBER 1989 / PAGE 107

Compukid Connection

O    T  A  N  E  N  B  A  U  M  !

A Holiday Tree-Trimming Kit by D.A. Brumleve
holiday tree-trimming

    The holidays are approaching, and parents will be considering gifts to buy for their children. If your children enjoy your ST, a computer-related gift may be just the thing.
    If it's software you're looking for, you will be pleased to know that truly excellent programs can be had cheaply or at no cost. Last winter I discovered several arcade packages on the market. These "best hits" are groups of three or more of the older arcade games (six months or more past the release date); they are sold as one unit for the price of a single brand-new release. Some of the packages contain duds, but more typically, all of the programs in a package are high-quality arcades. Two such packages were a big hit with our three older boys last December.
    At nominal cost or at no cost at all, you can obtain public-domain or freely distributed programs of high quality. [ST-LOG programs are not in the public domain; even though we allow limited distribution, we retain all rights-ed.] Some of these can be customized to create personal software gifts. For example, last December I noticed in the documentation for Monkeys and Balloons by Frank Cohen (from the October 1988 issue of ST-LOG) that he suggested customizing his program by altering the DEGAS Elite .PCI files. I took a fresh look at the program, a version of Breakout in which the mouse controls two monkeys holding a trampoline. A clown bounces off the trampoline in an attempt to pop balloons overhead. I altered the DEGAS pictures so that the clown resembled my then-five-year-old daughter, Catherine, complete with eyeglasses and a letter "C" on her sweatshirt, and the monkeys were made to look like her brothers, Willy and Joey. The final product was copied to a green disk and a red label was attached. She loved it!
    That same year I downloaded a program from GEnie called HANGOPUS by B. Cafferky for my son,Willy, a Bloom County fan. This version of Hangman lets you create word-puzzle files. I made files for Willy that included vocabulary from his hobbies. The resulting program was copied to a special red disk. There are many other public-domain programs that include the possibility of customization. And there are hundreds of other challenging publicdomain games for children; your online service, user's group library or public-domain dealer will have many fine offerings.
    The holidays are also a good time to consider a new set of joysticks; certainly, ours have a life expectancy of less than a year. Another accessory a child really appreciates is a joystick extender. These are short cords with a male joystick plug at one end and a female plug at the other. They are inserted into the joystick and mouse ports of your computer; when the child must remove joysticks or the mouse, the device is unplugged from the extender and not from the computer, thus saving wear and tear on the computer's ports. Extenders also make changing joysticks on a 1040 much more convenient. Though not quite as exciting as a new game, mouse pads are appreciated by children also.

    The Germanic tribes in ancient times had a long-standing reverence for the evergreen tree (Tannenbaum). These trees demonstrated that life could continue even in the "dead" of winter. To celebrate this sign of life, they brought the trees into their homes in the winter. When these people became Christians, they retained their pagan custom. As the evergreen ritual coincided with the celebration of Christmas, it eventually became part of that celebration: the Christmas tree.
    My mother always enjoyed decorating for the holiday season, and the focal point of her endeavors was the Christmas tree. We brought home a huge tree every year and stood it up in our front hallway, where it was circled by the main stairway. We children dropped tinsel and decorations onto its top branches from the balcony.
    This holiday season, you and your child can enjoy the fun of decorating the tree without a trip to the attic to gather box upon box of bulbs and bells. Tannenbaum, on this month's ST-LOG disk, is a music-and-design program with a holiday theme. It is intended for use by children as young as two or three. The child (or adult!) uses the mouse to choose from a variety of animated and nonanimated decorations to decorate a Christmas tree. The animation of the decorations (twinkling bulbs and more) can then be set into motion while the computer plays the traditional German holiday song, "O Tannenbaum!"

Getting Started
    To use the program, deARC the file TANNENBM.ARC and copy TANNENBM.PRG, TANNENBM.PI1, TANNENSP.MBK and TANNENMU.MBK to a freshly formatted disk. (The other file in the ARCed file, TANNENBM.BAS, is the STOS BASIC source code for the program; you will need it only if you want to examine the program's construction with the STOS interpreter.) The program will work if placed within a folder, so long as all four needed files are present in that folder. The program will run on any ST with a color monitor. To run the program from your ST's desktop, be sure that your screen is in low resolution and then double-click on TANNENBM.PRG in the directory listing. The title screen will appear, followed automatically by the main program screen.

The Main Screen
    The main screen is divided into three areas: the Options menu, the Christmas tree display and the decorations boxes.
    The decorations boxes contain two kinds of decorations. The bottom row of boxes (two boxes of tinsel and a yellow globe) are framed by a gold box. These are nonanimated decorations. You may place any number of these decorations on the tree. The upper three rows of boxes hold animated decorations. Only 14 total animated decorations can be placed on the tree. These 14 may be all of one type of decoration, or a combination of many.
    The Options menu includes four boxes: The EXIT option gives the user an opportunity to quit the program and return to the desktop. The PLAY option starts the movement of the animated decorations and the accompanying music. Clicking the mouse on the PLAY option will cause the computer to play the tune whether any decorations are on the tree or not. The NEW option erases any and all decorations currently placed on the tree. The UNDO option erases only the decoration that was last selected.
    The Christmas tree display area, of course, contains the tree. Decorations can be placed almost anywhere within this area; it is not necessary to put them directly on the tree. Some of the larger decorations can be placed so that they nearly touch the rectangle surrounding the tree display, but others must be placed a bit farther inside the perimeter.

Using the Program
    To choose a decoration, point the mouse arrow at any of the items in the decorations boxes and click either or both mouse buttons. The mouse arrow will disappear, and in its place will be a copy of the decoration you have chosen. Move the mouse to the tree display and position the decoration wherever you choose. Then press either or both mouse buttons again to put the decoration in place. If the position is not precisely what you'd like, click UNDO and repeat the procedure.
    When your tree is trimmed to your satisfaction, click PLAY and watch the decorations move while the music plays. You can speed up or slow down the tempo by pressing any of the function keys on the top row of your ST's keyboard. The original tempo of the music as presented can be restored by pressing the F4 key. After the song is over, the mouse will reappear, and you can make other selections.

Special Effects
    The function keys do not affect the speed of the animations. To achieve the fastest animation of a decoration, use only one single decoration; the computer will animate one decoration much faster than it will 15.
    Children may enjoy exploring symmetry on this rather symmetrical representation of a tree. A pyramid of angels, a flock of birds and numerous combinations can demonstrate such balance.
    Don't neglect the black areas of the tree display. Twinkling stars are just as charming when hanging from your display ceiling as they are on the tree.
    Certain combinations of decorations or their unusual placement can yield surprising results and expand the ability of the program to mimic an actual Christmas tree. For example, the tinsel supplied in the decorations boxes can imitate candlesticks or true icicles, depending on where it is displayed. I chose to draw rather globby chunks of tinsel because that is how my children apply tinsel to a real tree. When combined with one of the small globes or the twinkling star, however, the tinsel becomes a convincing candlestick.
    Some decorations are especially pleasing when placed so that they overlap others of the same or different type. The effect of such displays, when animated, can be quite striking. When two decorations overlap, STOS gives priority to the decoration that is lower down on the screen. When you choose a decoration and move it around in the display area, you will notice that it sometimes seems to be on top of other decorations and sometimes behind (or underneath) them. This is quite effective in duplicating the layered look of a Christmas tree. When animated, the priority of the decorations relative to one another is preserved; if a bird is behind a pinwheel when placed on the tree display, it will continue to be behind the pinwheel while both are animated.
    The nonanimated decorations in the bottom row of the decorations boxes have the lowest priority. A nonanimated decoration will always be behind the animated decorations. The only exception occurs when the nonanimated decoration is the last decoration selected; in this case, it will have the same priority as the animated decorations. To see how this works, place an animated decoration on the tree. Then select a decoration from the bottom row and place it over the first one so that the nonanimated decoration is "on top." Now select another decoration of any kind. As soon as you select another decoration, the nonanimated decoration moves behind the first one.
    Each type of animated decoration has its own animation sequence. When the PLAY option is selected, the first animated decoration the computer changes is the one you placed on the tree first. The next one to change is the one you placed second, and so on. The order of animation (and thus the order in which you have placed the decorations on the tree) can be an important influence on the effectiveness of your display.
    To get started in experimenting with these effects, try placing pinwheels in a row. Place the first pinwheel near the upper left-hand corner of the tree display. Then place another pinwheel just a bit to the right of it, so that it overlaps the blades on the right side of the first pinwheel. Add more pinwheels to this row and then click the mouse on PLAY. Many other types of decorations can produce such interesting effects when used alone or in combination with other types.

Sing Along!
    Many children, at least when prodded, enjoy singing along with music programs. Below, I provide an English-language version of the song for those of you who may not be familiar with it. (Note that this version, by John W. Schaum, is not a direct translation of the German, though it does effectively convey the spirit.)
O Christmas Tree! O Christmas Tree!
Your lovely branches thrill me.
O Christmas Tree! O Christmas Tree!
You fill my heart with glee.
Your ornaments of red and blue,
Your pretty lights of many hues,
O Christmas Tree! O Christmas Tree!
Your lovely branches thrill me.
    Before closing, I want to thank David Plotkin for his valuable assistance in the development of this program. This was my first effort in STOS, and Mr. Plotkin's contribution of time and wisdom is much appreciated.
    I hope you and your children will enjoy Tannenbaum. Happy holidays!
D.A. Brumleve

    D.A. Brumlevee, M.A., is involved with children and computers in a variety of ways. The mother of five children, ages two to ten, she serves as the adult facilitator of the Children's ST Users' Group in Urbana, Illinois. An avid programmer, she has developed a beginner's course in GFA BASIC and is the author of PreSchool KidProgs (MichTron) and numerous freely distributed programs for young ST users. Her daughter, Catherine, is a student at Creative Discovery School.