Creating courses is actually quite simple once you get the hang of it. I'm going to walk you through a couple simple steps to get you started.
- The best way to start is to look in the contrib directory at other user made courses. Here you will notice 5 important files. The first one is called course.tcl, the other 4 are: elev.rgb, terrain.rgb, trees.rgb, and preview.rgb
- Tux racer courses can be created with a photo editor. No 3D modeling program is needed. I recommend gimp. It is free for linux, and was recently ported to windows also for free
- A little explanation on those 5 files mentioned earlier:
course.tcl - a small script that tuxracer reads to find out the name, author, and dimensions of the newly made course
elev.rbg* - A picture file which contains the different elevations of the course
terrain.rbg* - specifies where the course will snow, ice, and/or rock
trees.rbg* - specifies where trees, bushes, flags, herring, start signs, and finish signs will be placed
preview.rbg* - the picture that tuxracer displays in the menu
***(RGB is a type of picture file (like .jpg) that tuxracer uses)
- Elev.rgb
I always start with this file first because it shows the basic outline of your course
- Create a new file, I usually do about 250 by 1000
- To specify different elevations, you use different colors
- White is the highest, black is the lowest
- Of course you can use different gradients of gray to get elevations in between
- If I wanted to create a course that had one trench down the middle the whole way, it would look like this :
- The black line is the trench that tux will be racing in, the white area is the high walls
- Save this file as elev.rgb
- Terrain.rgb
- This file tells tux racer whether to use snow/ice/rocks
- Create a new file the same size as elev.rgb
- White is snow, Black is ice, and Gray is rock (any gray will be rock)
- I want the trench of my course to be snow, and the high area to be rock
- The trench area (the black area on elev.rgb) is going to be all white (this is snow)
- The high area (what was white on elev.rgb) is going to be grey (this is rock)
- Save this file as terrain.rgb
- Trees.rgb
- This file tells tux racer where to put trees, herring, flags, etc.
- Create a new file the same size as elev.rbg (250x1000)
- You need to use this palette for colors:
- I'm going to add a start banner at the beginning of the race, and a finish banner at the end of the racer
- I'm going to also add herring (blue) all down the trench
- Each herring should only be one pixel, if you make a huge glob of blue, then there will be a huge glob of herring on your course
- The background should be black, don't use any other color b/c tuxracer will attmpt to match it to another color, and you will get trees and bushes in places you don't want them
- This file now looks like this:
- You can add anything on the palette. The reset (purple) is incase tux gets stuck, the user can press backspace and will be placed at the closest purple dot
- Course.tcl
- This is the most important file in creating a course
- If information is not entered correctly, your course may not work!!
- I always take one of the course.tcl files from another course and use it as a template
- The first item you need to enter is the course name (this is what will appear on the tuxracer menu), this should be done with:
tux_course_name "My Course"- The next item is the author (this will say 'contributed by: your name' on the tuxracer menu)
tux_course_author "Mark"- The next item is the course dimensions. I usually make these the same size as the picture 250x1000
NOTE** you can use a different size than your images, but be careful, tuxracer will sometimes throw a fit and crash immediately if it doesn't like your dimensions
tux_course_dim 250 1000- The next item is the starting point. This counts from the top right corner on your rgb images in pixels (this is usually a guess and check)
tux_start_pt 125 1- The next item is the angle of the mountain. The higher the number the steeper the mountain
tux_angle 27- The next item is the elevation scale. The higher the number, the higher the elevations. **In my example, if I wanted a super deep trench, i would choose a high number like 30, if if wanted hardly any trench, then i would choose a small number like 5
tux_elev_scale 10.0- The next two items specify the names of elev.rgb and terrain.rgb, always include these
tux_elev elev.rgb
tux_terrain terrain.rgb- The last line initializes your course, always include this one to
tux_course_init- Save that text file as course.tcl
- Preview.rgb
- This is just a preview of your course that tuxracer will show in its menu
- I just take a snapshot while i'm racing with the "=" button
- The size doesn't matter, tuxracer will automatically scale it
- Save it as preview.rgb
- Almost Done
- Put all five files you just created in a new folder under the contrib directory
- Load up tuxracer and try out your new course
Tuxracer Belly Rub © 2002-2003 Arthur J. Yarwood.
|