Columns

version 1.2

Basic Information

Columns is a falling tile game similar in nature to Tetris, played in a 6x18 grid. Rather than filling up horizontal rows to erase lines, in Columns you are required to put tiles of the same color or pattern in rows of three or more. Well, not required exactly, but if you don't then you won't really last too long...


System Requirements

Columns was written for a 386 or better with a VGA card or better. (If you have an MCGA card it will probably still work.) A joystick and Soundblaster card are optional. Columns should work with just about any version of DOS, but so far I have only been able to test it under DOS 5.0 through DOS 6.2. If you run into problems with earlier versions of DOS, feel free to write to me at the address listed at the end of this file, and I will see what I can do to fix the problem.

WARNING!! It appears that if you have UNIVBE installed, it conflicts with the graphics library I used. Your machine will lock up tight if you try to run Columns with UNIVBE loaded. I believe that this is because the graphics library tries to access the video hardware directly, even when at the same time UNIVBE is doing the same thing.

NEW! I recently discovered that the problem is not exactly specific to the UNIVBE driver. Rather, it only occurs when I have both the UNIVBE driver and my mouse's CLOAKING driver installed at the same time. This CLOAKING driver came with my Logitech mouse, to allow my mouse driver to load into Extended memory rather than conventional or upper memory.

The sound and music library I am using requires a 386 or better, and should work with the Sound Blaster series of cards, a Gravis UltraSound card, or a ProAudio Spectrum card with SB emulation. (Sorry, there is no Adlib support.)

If disk space is at a crunch for you, then you can delete any of the sound and/or music files (the *.SFX or *.DSM files). You can also delete the SETSOUND.EXE program; just be sure to run it at least once to configure the sound for your particular system first.


Legal BS

This software is provided as is, without warranty of any kind. The author shall not be liable for damages of any kind. Use of this software indicates you agree to this. (Don't mind me. I just have to cover my legal behind. PC compatibles are just way too incompatible to deserve the name.)


Changes From Version 1.0 to 1.1

A few things have changed since my initial release of Columns. First, it is now possible to toggle the sound and music while the game is paused. Of course, this was only noticeable in the registered version of Columns.

Second, a new version of DSIK was released which allows me to determine whether a sound sample has finished playing yet. Previously, I simply used a long-enough delay.

Third, there was also a minor problem with releasing memory for the music and sound effects. This only affected my machine when I quit playing on the 2nd level (or the 12th), where the music is 100K. And of course, all my beta testers were just more interested in playing the game then they were in reporting any problems... :^)

Finally, I made a few more additions to the FAQ section. If you have had problems running Columns then be sure to look at this section.


Starting Columns

First, run the SETSOUND program to configure your sound and music. If you only want to use the PC speaker, then choose "None" for your soundcard.

When you first run Columns, it will try to create a configuration file with the default settings. This file (and the score file) will be stored in the same directory as your Columns executable, so if you want you can put Columns into your path and it will keep everything together for you. After starting, you should then see the Columns Menu:

The menu system is fairly simple: Select a menu item by pressing its corresponding key, or highlight it using the up and down cursor keys and select it by pressing the [Enter] key. Alternatively, you can use your joystick (if you have one) to highlight and select any menu item.


Playing Columns

Select option 1 from the Columns Menu and the game will start immediately. A column is comprised of three tiles stacked in a vertical row. The three tiles are selected randomly from any of six different colors or patterns. Move the column of tiles left and right with the left/right cursor keys or your joystick. Rotate the colors/patterns on the column with the up/down cursor keys or your joystick. Drop the column into position with the space bar or your joystick's fire button.

Other keys available during the game are:

P/Esc: Pause the game temporarily.  This blanks the playing field
       to help prevent cheating.
S: Toggle the sound on and off.
M: Toggle the music on and off.
N: Toggle the display of the next piece.
Q: Quit the current game.
Three matching tiles in a straight line forms a triple. Four in a row forms two triples, five forms three, and so on.

Whenever you line up three or more tiles of the same color/pattern they will explode, points will be awarded (see below), and all tiles above will drop down into postion. If more triples are formed after falling, they too will explode and more points will be awarded. This continues until no more triples are formed.

Click here for an example of how richocheting works.

The level increses by one every time 50 triples are formed.

The column will slowly fall if you don't drop it yourself. At level 1, it moves down once every second, at level 2 it moves down twice a second, at level 3 it moves down three times a second, and so on. While you might not be able to tell much difference between levels (say) 5 and 6, I am sure you will be able to tell the difference between 5 and 10!

The game is over when one of the falling tiles is still sticking up above the 6x18 playing field after all triples have been completed. A column which is wholly or partially sticking out can still form part of a triple though. If your score is one of the ten best then you can enter your name to be put into the high score list.


Scoring

For each triple formed, you get as many points as the level you are currently playing. But when the triples start ricocheting their value increases by the playing level. So if you are playing at level 5, the initial triples are worth 5 points each, and the richocheted triples are worth 10, 15, 20, 25, and so on.

Click here for an example of how richocheting works.

Depending on your ability, you may be able to get higher scores by starting at higher levels. Although you may be able to reach the same level easlily, by the time you get there the playing field could be half-filled with misplaced tiles and you may not be able to line up as many ricochets. Remember that you get more points for the ricochets!


Changing User Settings

Select option 2 from the Columns Menu and you will be presented with a submenu:

Highlight and select each item as you did for the Columns Menu, but with a small difference. You can now also use the left/right cursor keys or your joystick to adjust any setting.

The settings shown here are the default ones, if you are playing Columns for the first time. You can change the default settings to reflect your own preferences. (see below)

The starting level is the playing level at which your game will start. The other items show whether or not you want the sound on, whether or not you want to see the next piece, how loud you want the sound effects and music, and whether you want to use colors or patterns. Some people cannot distinguish between all six colors for various reasons (such as color blindness, or you may be playing on a monochrome monitor), and so I have put in six distinct bitmap patterns you can use instead of color.


Configuration

Your favorite user settings can be stored in a configuration file called "COLUMNS.CFG". The default contents of the file is:

JOY=AUTO
LEVEL=1
SOUND=ON
MUSIC=ON
SOUNDVOL=16
MUSICVOL=4
NEXT=ON
BM=OFF
This reflects the default settings Columns will use if you are running it for the first time. These items may be specified in any order, and they are not case sensitive. (If any are missing then it will assume the default value.) You may also specify any option on the command line, superceding the value in the configuration file. Type "columns /?" to see all available options.

The first item tells Columns how to choose which joystick will be used. JOY=AUTO means that it will try to use a joystick in port 1 if it is available, but if it is not then it will try to use a joystick in port 2. Otherwise, if none are plugged in, it will ignore the joystick. Other options are JOY=1, which automatically selects game port 1, or JOY=2 which selects game port 2. If you picked either of these two options and the joystick is not available, then it will behave as if you used JOY=AUTO to pick a game port. One last option is JOY=OFF which tells Columns to completely ignore any joystick which may be connected.

The second item specifies the default starting level, which can be from 1 to 10. LEVEL=5 will start the game at level 5, for instance.

The next four items are used to adjust your sound and music volumes.

The last two items show whether to default to showing the next piece visible ON or OFF, and the bitmaps vs. colors ON or OFF.


Technical Information

You can substitute your own sound effects for my default ones if you want. "All you have to do" is convert your sound into raw unsigned 8-bit data sampled at 8192 Hz. Simple, no? If you don't already have it, I recommend the SOX program. The basic syntax for using SOX to convert one of your own samples is:

        sox inputfilename -b -u -r 8192 sound.raw
SOX should automatically handle .WAV, .AU, .AIFF files for you. Just make sure you read the documentation first, though. Make sure you rename your resulting sound.raw file to the appropriate .SFX file.

The music files are MOD files converted to a special format for easier use in programming. You can convert MOD files of your own with the CONV program (included in the archive DSIK_PAS.ZIP. There is also a Borland C and a Watcom C++ version available. This program will handle file of types MOD/669/STM/S3M/MTM. Note that I have only allowed for up to 8-channel MOD files.

If your MOD file is of another format, then I recommend that you use ScreamTracker (scrmt32.zip is the latest version I am aware of), and save the file in ProTracker format, and then convert it again with CONV. Some of the songs included with Columns were originally MIDI files, which I converted to MOD files (ptmid3.zip), then to ProTracker files (scrmt32.zip), and finally to their present form. (Whew!) Mind you, ptmid only handles most MIDI files of types 0 and 1. Many of the MIDI files I tried ptmid couldn't handle at all and locked up my machine completely. And once, due to a conflict with a disk write cache, it managed to corrupt half of the games on my hard drive. Ah well, it was all for a noble cause. :^)

The songs I chose were mostly piano ragtime, with a few snappy classical pieces to boot. The reason for this is that Columns really *needs* a light snappy music score. Not only that, but these songs mostly are old enough to be completely in the public domain, so I didn't have to pay a musician to write music from scratch. The song names are (to the best of my knowledge):

music0:   The Entertainer
music1:   Black and White Rag
music2:   Maple Leaf Rag
music3:   Hungarian Rag
music4:   The 12th Street Rag
music5:   St. Louis Rag
music6:   Blue Goose (?)
music7:   Flight of the Bumblebee
music8:   Dizzy Fingers
music9:   Moonlight Sonata Movement III
congrats: Hallelujah
menu:     (?)

Programming Columns

Many thanks should go to the following authors:

Scott Ramsays, who wrote SPX. I got my keyboard and joystick handling routines from his library. This is in fact a complete game programmer's library for Turbo/Borland Pascal 7.0. If you are still using Pascal 6.0, then version 2.0 of SPX should work, although I don't happen to know where it can be obtained.

Carlos Hasan, who did DSIK. This is a "Digital Sound Interface Kit", and versions are available for both C and Pascal. A demo of this wonderful product is available. In my opinion, I fully recommend this library for all game and demo programmers. It only costs about $30USD, and is a royalty-free system.

Jordan Hargrave, who put the SVGA BGI driver package together. These BGI drivers have been placed into to public domain, and work on probably just about every SVGA video card on just about every possible video mode. Well sure, Columns is only using the MCGA 320x200 video mode, but by using these drivers it will be fairly simple to make new versions of Columns at SVGA video modes. Mind you, I'm a programmer and not an artist, but I made sure that the potential is there. But if I don't get any postcards (or registrations) then I don't see the point of bothering. Write to me!

Andrew Scott, who wrote PTMID. This is a wonderful program which can convert most type 0 and 1 MIDI files into MOD files. And as per your license, if Columns actually manages to turn a profit for me, I'll be sure to send you something. Perhaps a registered version of Columns? :^)

The Future Crew demo group, who wrote ScreamTracker. This was used to convert the MOD files converted by PTMID into a form which could be converted to the final DSM format.

Chris S. Craig, who wrote SCOPTRAX. I used this program to tweak a few of the SFX samples, such as eliminating extra white noise from the start and end of some of the samples.


Columns FAQ