Trevin's Myriad Projects

This page is a scrapbook of various projects I have thought up. Some of them are finished (or at least working), some are in development, and a few are still in the design stage.

Index
Puzzle Accessory TETRIS
3D Maze 3D -------
Dungeon Master Editor BASIC
Synthesized Mail Reader xhanoi
xtarget An Adventure Game
Leprechaun, etc. Diablo II Game Editor
Mille Bournes Beneath the Pyramids
My Linux xgames

Puzzle accessory

Puzzle Accessory

This is one of the first programs I made for the Atari ST.  It was built as a Desktop accessory, which meant that you could pop it up at any time from the Atari menu bar.  (The ST, unlike modern systems, was not truly multi-tasking; you could only run one primary application at a time, but multiple accessory programs could share main memory.)


Tetris sample screenTETRIS

This is NOT another TETRIS clone!  I emphasize NOT a cloneThis TETRIS is the real thing!  Well, as close as I could come to it on my own.  I spent weeks as the arcade studying the official ATARI game in order to get every detail just right.  So why hasn't this been done before?  Well, it has, I think, but there have been several complications due to the interference of some unnamed corporation.

I developed TETRIS originally for the 8-bit Atari computers way back when I was a college Junior (around 1990).  It was in black and white, but had decent sound effects.  Later on I re-wrote it for the Atari ST (while still in college--several of the guys in my dorm got to enjoy playing it) in full color, but without sound (I didn't have any documentation for the ST's sound chip).

I recently found this program buried on an older hard drive, and was able to start it up on an Atari ST emulator, but for some reason the game doesn't respond to any keys so I can't grab any screen shots of the game in action.  The screen shot shown here is one I painted by hand (based on the game's image files).

If you have an Atari ST and decide to download the game, please note that the address given in the .TXT file is way out of date — by nearly twenty years.  If you have an Atari ST emulator, you should know that there is also an arcade machine emulator available which you can use to play the original TETRIS arcade game!  It has rendered my program obsolete.


3-D Maze3D Maze

First of all, let me make clear that while mazes are not at all new, the concept behind this game is radically different and is 100% my invention.  Therefore I have placed a copyright on the game.  Unlike traditional mazes where you have from 1-4 openings in each cell -- left, right, forward, or backward -- this one adds an up or down dimension to the maze.  The maze is "carved out" of a cube.

I wrote the game originally for the Atari ST.  Although the graphics in the game aren't terribly sophisticated (especially by today's standards), they were about as good as I could get given my limited artistic talent and allowing the game to play at a reasonable speed. Artist's conception of a 3-D maze Eventually I'd like to rewrite the game again for (the more prevalent) unix systems, using a standard 3D graphics library to display the maze for me.  The image to the right here is a rendered approximation of what I'd like to see the game draw.

This game has recently been played on an Atari ST emulator, from which I got the screen shots.  If you have either a real Atari ST or the emulator, you can download the game and try it out for yourself.  You can ignore the request for payment in the .DOCumentation, especially as the address listed is outdated.

Here is another screen shot from my current work-in-progress (writing it for OpenGL on unix):

3DMaze screen shot

Unfortunately I have since discovered that this program does not run on all video cards. It has only been tested with ATI's fglrx drivers. On systems with nVidia drivers or OpenGL in software, it gets an error about an unsupported visual. Needs more work.


3-D game

This is another game concept I've had in mind since the early 90's.  I started writing some code for this in 68000 assembly language for the Atari ST.  I still have hard copies of the original code and hand-written psuedo-code, but no originals in electronic format.  More recently I started writing it again for unix, and I started learning OpenGL to get a decent display out of it.  (The new version is coming along rather well, graphics-wise. The above image is hardware-rendered with OpenGL.)


Dungeon Master Editor

This was a very ambitious project I had in mind for editing (cheating at) Dungeon Master games.  Unfortunately, I never got very far; most of my work was spent on designing the interface and decoding the saved game file, which was encrypted.  Due to the difficulty of the encryption, the hardware copy protection of the game, and/or the loftiness of my ambition, this project never really got off the ground.  I think I stopped working on it around 1992.

Sure would have been nice, though...

DM champion editorDM map editor

BASIC

One of the great things about the 8-bit Atari computer was that it has the BASIC (Beginner's All-purpose Symbolic Instruction Code) computer language built-in; and one of the great things about old version of BASIC is that it's very simple and it's an interpreted language, meaning that you type in an instruction and the computer does it right away.

For example (if there is anyone who is too young to remember BASIC), to get a modern computer to display a sentence using the C language, you would have to type the following (human input in bold):

% cat - > hello.c
#include <stdio.h>

int
main ()
{
  printf ("Hello, world!");             
}
^D
% cc -o hello hello.c
% hello
Hello, world!
% 

To get the same result in BASIC, all you need to do is:

READY
PRINT "HELLO, WORLD!"                   
HELLO, WORLD!

READY

Because of its simplicity and immediate response, BASIC is a great starting point for learning how to write computer programs.  A great many computer books and magazines in the early 80's contained sample BASIC programs.  Since modern computer systems don't come with BASIC, I wanted to write a BASIC interpreter for unix which would be able to run most of those old programs.

In 1999, after playing around with bison and flex, I decided that those tools might be suitable to let me generate a BASIC interpreter.  I worked on it for a while, and got far enough to run many of the programs found in the Creative Computing book BASIC Computer Games.  However, it still lacks support for a few key features, most of the documentation is still unwritten, and I haven't been able to come up with a good means of error reporting & recording.  So this project has been put on the back burner.

Also on the back burner at the same time is an ambitious project of converting the entire BASIC Computer Games book to an online format, which involves scanning the artwork and converting it from a raster image to vector graphics, creating a dot-matrix-like font for the program listings, and either scanning & OCR'ing or manually entering all program listings and accompanying text.  I spent a month or two on the first twenty pages, but since it was such slow work I abandoned it.


Synthesized Mail Reader

Sometime prior to the year 2000 I discovered a speech synthesizer for unix.  As I had already configured my computer to fetch my email periodically for me and announce when new mail has arrived, I figured it would be nice to have my computer also tell me who the mail was from so that I could decide whether to read it right away or leave it until later.  Since unix mailboxes are in plain text format, and emacs lisp gives you very powerful text manipulation capabilities, it wasn't hard for me to come up with a lisp program to convert my email's "From:" headers into an annoucement for the speech synthesizer to read.

It's been rather amusing when I have friends over and they suddenly hear my computer tell me that I have (for example) 3 messages from mozilla.org, 1 message from James, 1 message from XMission, and 4 SPAMs!  The next thing I'd like to do is have my computer figure out whether I'm actually at my desk when the mail arrives, ask me whether I want to hear the messages, and then read them to me.  But that will have to wait until I find a decent (open source) speech recognition program.

I won't post my mail reader here, since much of it is customized for my particular mailbox (using headers added by procmail and Spam Bouncer.  But if there's sufficient interest...


xhanoixhanoi

Soon after I got myself a free copy of BSD unix, I bought O'Reilly's series of manuals on the X Window System with the intent of learning how to write graphical programs for unix.  I read through many of the manuals from cover to cover, and tried a few examples, but it was several years before I got around to actually trying to write some X clients myself.

As programming exercises, I decided to try porting some old BASIC programs for the Atari which I have in A.N.A.L.O.G. 400/800, ANTIC, and COMPUTE! magazines from the late 70's and early 80's.  There are a lot of good programs in there!  They are relatively simple, but porting them is not always a piece of cake, because you have to move from a single-tasking spaghetti-code style of program to an event-driven structured code style.

The first program I pulled from these magazines was Towers of Hanoi, written by Ricky Knopman and published in the May/June 1981 issue of A.N.A.L.O.G. 400/800 Magazine.  Since Towers of Hanoi could be easily event driven, I decided to write it using the Athena widgets.

I decided for my first program that it would strictly use only the Xlib API; no toolkit widgets.  This was to help me understand X from the inside out, and it also matched the original program-driven style of code more than the event-driven style required by the toolkits.  The result is this Towers of Hanoi program, based on Ricky Knopman's game published in the May/June 1981 issue of A.N.A.L.O.G. 400/800 Magazine.


xtarget

My next exercise in X programming was the very next program (8 pages later) in the same A.N.A.L.O.G. magazine: Steve Smith's Target Shoot.  I decided that this one would strictly use only the Xlib API; no toolkit widgets.  This was to help me understand X from the inside out, and it also matched the original program-driven style of code more than the event-driven style required by the toolkits.  My implementation of the game also had the added feature of using a joystick input device just like the original game did.

The trouble with this game was that Atari joysticks are digital, meaning that each of the four directional positions are either on or off.  PC joysticks on the other hand tend to be analog, so getting an accurate joystick position depends on how good the potentiometers are and calibrating the joystick to find the center position and edge limits.  Also, XFree86's joystick support (at the time I wrote the program) had a very low resolution, which made it especially difficult to get an accurate reading.  I wish I could find a simple, digital joystick for the PC.

One thing I'd eventually like to do is figure out how some pure Xlib programs, like xgalaga or xboing, have such fast screen updates, while my attempt is rather slow at it.


A.N.A.L.O.G. adventure

An Adventure Game

The next magazine containing a suitable program exercise was A.N.A.L.O.G. 400/800 issue number 10.  As with the xtarget program, I only used Xlib calls (well, with a few Xpm library functions for icons).

The effort here was quite a bit more involved, not only because the original Adventure Game was a much larger program, but more especially because it was written as spaghetti code!  It was practically impossible to follow the program path in my head, so I had to convert the BASIC program into pseudo-code, then shuffle things around so I could separate it into modules, and finally re-implement it all in C.  compared to that, adding the Xlib calls to display the graphics was a piece of cake!  In the end though, I got a game which was playable.


Leprechaun, etc.

This is the next program in line in my computer magazines.  I haven't started it yet; after completing the Adventure Game, I was distracted by the demands of a job that actually paid me to write programs, so learning X was put on the back burner for an indefinite period of time.  So were the dozens (hundreds?) of other programs sitting in my dusty back-issues of computer magazines.


d2sEdit

a Diablo II Game Editor

When I suddenly found myself, er, free from the demands of writing programs for somebody else (yeah, that's it!), I decided to get back to programming for myself.  I started out writing a saved game editor for Diablo II as a text-based program, but after expanding it so far I realized that it would work much better as an event-driven program with a friendly graphical interface.  Since I had always (well, ever since college) wanted to learn Motif, and especially since Motif had recently been released to the open-source community, I decided to use the advanced Motif toolkit to design the interface to my program.

The result is probably the most sophisticated program I have ever written on my own.  At 2.5MB, it certainly seems to be the largest.


xmille

Mille Bournes

Okay, Mille Bournes isn't exactly my project.  It's a french card game published by Parker Brothers.  And xmille is a computer version of the game for X by Keith Packard.

But one of my ideas for a computer program (which I thought up way back in the late 80's) was a generic card game engine which would allow playing any card game the user wanted.  It would also be able to use an arbitrary set of card faces, so that it wouldn't be restricted to just those games using the standard 52-card deck.  (I wanted to be able to play Uno on the computer as well.)  Also, the program should be networked and show each player his own hand on a separate screen, so that two or more humans could play together, rather than just one person vs. the computer.

Part of the effort was to have available a library of card images, and to that end I scanned in each card in the Mille Bournes game.  Recently I cleaned up the images and scaled them down to match the size used by xmille.  Then I patched xmille (again -- it had required some bug fixes before) to use the scanned cards, if available, when on a color display. The resulting game looks excellent.

Note that this is the original Mille Bournes artwork.  Parker Brothers has re-released the card game with new card designs, and I don't like them.  (If anybody has a vintage Mille Bournes deck in good condition, it's certainly worth a lot now as a collector's item.)

No, sadly, I haven't even started on my ultimate card game program..


Beneath the Pyramids

This is (in my opinion) a classic game for the 8-bit Atari, published by Crystalware in 1981.  Written mostly in BASIC, with a little assembly language and hardware tricks thrown in, it was quite an expansive game that let you explore a pyramid for ancient egyptian treasures.  One of the technical aspects of this game was that, although most of the graphics were in black and white, it used color artifacting to add some color to the game.

What I want to do with this program is port it natively to X, giving it a nice, full-color, event-driven interface.  I have several concept drawings stashed away in an old folder (drawn in the late 80's).  I may even have a few bits of code scribbled out, but I don't remember.  This project never got to the coding stage.


Atari backups

The Atari's were such nice machines, I want to preserve all the software I have for them.  Unfortunately, all that software is stored on floppy disks, which have a limited shelf life.  And I'm afraid their shelf life may have already expired.

I have already backed up many of my 8-bit Atari floppies, but some of the Atari games (practically all of the ones for the Atari ST) have bad-sector copy protection on the disks, and aren't playable from backup disks.  Once those disks have expired, they will be lost forever.

Finishing the backups, and hacking the copy-protected programs so that they don't require the original (deceased) disks, is a project that has loomed large on my back burner for years.


My Linux

My Linux

This in't entirely a programming project (though it involves a bit of software maintenance), but it has proven to be quite ambitious.  After trying Fedora Core 3, I was disappointed to find numerous problems the Linux 2.6 kernel and Xorg 6.8 have with regard to device drivers.  Specifically:

Because of these problems, I decided I need to downgrade the kernel to 2.4 and revert the display server to XFree86.  But I still wanted to have the latest desktop environment and user applications.  That meant that instead of using an existing Red Hat Linux or Fedora distribution, I would have to create my own.  Thus, My Linux was born.

My Linux combines pre-built, recompiled, and custom packages from Red Hat Enterprise Linux 3 (kernel, XFree86), Red Hat Enterprise Linux 4 (gcc, openoffice, Perl), Fedora Core 4 (Gnome, KDE, evolution), the latest 3rd party sources (Acrobat Reader, dvdauthor, Firefox, Gimp, MySQL, PoV-Ray) and a few packages that I created myself (logos, xgames).

Since Fedora Core 6 was released (and I had to replace my computer shortly before then), I am no longer using My Linux. There is no longer a need, since ATI's fglrx driver now supports Xorg 7.x (I'm currently on version 8.42.3, which has been the most stable), VMware's startup script performs much better with udev, and the application software is more up-to-date than I could have possibly kept up in my own distribution.


xgames

I created this package (of other people's contributed software) as part of the My Linux project (above).  These are some of my favorite games from the old X11R5 days.  Newer games may have a nicer-looking interface, but these oldies are still playable and often addictive.  The package includes:

imaze- kill a happy face!
xbill- prevent your *nix servers from being assimilated by Bill
xboing- breakout-like arcade game
xgalaga- a native Xlib port of the Galaga arcade game
xmille- Mille Bournes card game

All games were originally downloaded from http://www.x.org/contrib/games/.  I have patched them so that they will run under X11R6.


Page last updated on Oct 26, 2008.

Valid XHTML 1.0! Valid CSS!