I was introduced to computer games by my father when I was very young. I remember being awestruck with the ways we could interact with the Commodore Vic20 that he had purchased. This interest in games has also affected my programming. Games are not only fun to play, but also very fun to write. There is something very rewarding about creating something that other people will not only use, but enjoy.
This is a work in progress, although it is currently playable. At the moment it is a console based cribbage game for the GNU/Linux platform. It makes extensive use of the ncurses library for manipulating the console display, giving the game a simple, intuitive interface. Some of the planned updates on this game include:
- Setting it up as a network game, to play against other humans
- Adding a graphical user interface
- Improving the computer player
- Making a tool for creating the board
Currently, the game can only be played against the computer. It does however allow you to play against multiple computer players. The game rules are dynamically loaded from the file in which the information for the board is stored. There are currently two boards, one for a two-player game and one for three players.
As you may guess from the title, this is my variation of "Tetris". I originally wrote it with the Borland graphics library, and fixed it up with my own shortly thereafter. I have not yet rebuilt it to work with DJGPP. This is the same as "Tetris" but with three different playing modes:
- Normal: Just like the original game.
- Accelerating: Each piece speeds up as it falls, accelerating toward the bottom of the screen.
- Random: It occasionally produces randomly shaped chunks, which are often very hard to place properly.
My version of a good old classic. It never was particularily great, being one of my earlier works in C. It is, however, fun to play. This program was designed to look like a far better one that someone else wrote for the Amiga: "Better Dead Than Alien".
This is not a game in itself, but a collection of games that I wrote, all grouped together under one user interface. I wrote this primarily so that I could present them as a single, easy-to-use package.
My version of Tank Wars. It was assigned to me as a project in a high school computer programming course. I spent most the semester writing that game and had a whale of a time doing so. It too wound up being very thoroughly tested by many other students. Having been written in BASIC, and also one of my earlier projects, it isn't anything fantastic. It was pretty fun to play though, and a lot of fun to write.
Hexodus is the first truly original game that I wrote after developing the concept myself. Before then, all of my work had been variations of previously conceived games. It was written in C, and the most recent version was built using DJGPP. Originally, I wrote it with my own low-level MS-DOS graphics library. When fixing it up to compile with DJGPP, I decided to switch over to the Allegro library instead.
Blast is my version of Minesweeper, A logic puzzle that I've enjoyed for quite some time. This program has undergone two translations. When I first wrote it, I used the graphics library that came with Borland Turbo C++ 3.0. Eventually I wrote my own graphics library, and refurbished Blast to use it. This made the game run much smoother and gave me far more control over it's appearance. When I switched to DJGPP and started using Allegro, I altered it once more, leaving me with the third version.
Mastermind is an excellent two-player logic puzzle/board game from the 1970's. One day my mother was looking for a computerized version of it but was having no luck, so I wrote it for her. I only spent a weekend writing it, but did manage to complete it. Only one feature is missing, an explanation of how to play the game.
This is the first game that I wrote with my own graphics library. At the time, I was absolutely thrilled with the appearance of it. Compared to my prior work, it was excellent. In retrospect, it's nothing great. I could now write a much better version of it if I felt inclined to.
This is the first full sized game I ever wrote. I wrote it because I thoroughly enjoyed playing the original "Lode Runner" on the Apple II-e we had in the gradeschool I went to, but hadn't been able to find it anywhere else. I added several different features to it, which I found enhanced the game quite nicely. It also got very thoroughly tested in high school when one of the teachers was kind enough to place it on the network she maintained, allowing other students to play it. (and play it they did!) The worst problem with this game was the fact that I wrote it with BASIC, leaving me with a very limited graphics library. Also, the compiler I used, Quickbasic, was crippled when the program got too big. So it stopped getting developed at that point.
In developing software, it's often necessary - or at least fun - to make small demo projects to properly test new code. This is a collection of little demo programs I wrote with that in mind.
This is a quick little demo that takes an image and does some neat warping animation on the screen with it. I was using this as a handy way to test and iron out bugs in a function I recently wrote. The function can read a polygon from a source image, and draw its contents to another polygon in another image. What makes it so useful is that those polygons do not have to be identical. I have already used it to implement a blitting function with transformations that is much faster than the one I wrote in college. It does have a few limitations. For one thing, although the polygons in use do not have to be the same shape, they do need to have an equal number of defining points (for instance, you could copy between any two triangles, but not from a triangle to a square). This could actually be changed if necessary, but I do not consider it so for now. The other (more significant) limit is that the polygon to which it's drawing must be convex (although the one from which it's reading does not need to be). That too could be avoided, but doing so would slow the function down. This demo is always drawing to a rectangle (the whole window), but is reading from a polygon that is transforming.
The file linked at the top contains the source code and a make file, having been written to work on the GNU/Linux platform. A good friend of mine was kind enough to compile this on his Windows machine for me, so if you're using Windows and would like to see the program in action, you can download it in this zip file.
This "zip" file actually has three different programs in it, each one demonstrating the same algorithm. It started out as a simulation of a series of wagons being pulled, and evolved into these more interesting toys.
This is a GNU/Linux version of the worm algorithm that I originally developed under MS-DOS. It uses Mesa, the Linux port of OpenGL, and runs on the Xwindows desktop.
This is a simple little demo of transformations being done with my new image manipulating algorthm. It has a bunch of heads bouncing and spinning on the screen. The heads depicted are actually a slightly modified photograph of an origami mask that I made some time ago. The only modification to the picture was the addition of pupils on the eyes.
This is a screensaver style of graphical demo that uses a 3D graphics library I wrote when I was in college. It shows a bunch of spheres bouncing around on the screen. The angle of the lighting can be changed by moving the mouse, and the number of balls increased and decreased by clicking on the left and right mouse buttons respectively. The program will end when you hit the escape key.
Another quick demo of my old 3D graphics library. In this case, there is a model of a red maple leaf on the screen, which can be rotated using the mouse.
A simple program that draws a cube on the screen and lets you rotate it by moving the mouse. The main purpose of this program is to demonstrate a function I wrote which draws textured polygons in three dimensions. This was written for Xwindows on the GNU/Linux platform using SDL.
A bunch of particles with colour-coded masses almost following the laws of gravity. You move the heaviest particle around with the mouse and the others will follow.
This is another version of that same Mandelbrot set, written to work with Xwindows on GNU/Linux. It uses the Mesa graphics library and should port pretty easily to other platforms.
When I was in high school, I and a good friend of mine discovered screen savers (bear in mind that these were a new concept at that point). We both thought they would be fun to write and did so. This program demonstrates some of the ones that I wrote.
Over time I have come to need several custom tools and scripts for my own purposes. The ones listed here cover a rather broad spectrum, ranging from game development tools to end user utilities and from data mining scripts to old school projects.
Edpics is a simple program for drawing small eight bit images. It saves images in a very simple format: The first byte is the width of the image, the second byte is the height of the image, and the remaining data is the colour index of each pixel in the image (one pixel per byte). The main problem with this being that one could not save the palette with which the image was drawn. Also, since you are only given eight bits for the dimensions of the image, the largest image you could save would be 255 by 255.
Used for editing eight bit palettes that I could apply in games. This program is not intuitive, but I found it very useful and served its purpose quite nicely. It offers the basic functions of modifying individual colours and smoothly blending the colours between any indexes.
This is a simple desktop GUI that I wrote for MS-DOS. I wrote this because I did not care for "Windows 3.1", but wanted a simple GUI that I could use. Rather than using a window-based interface, it uses multiple desktops to group icons. It's nothing at all great going by today's standards, but was pretty darned good in it's day.
This is the second program that I wrote for my independent study in OAC calculus. This one will let you define a two-dimensional curve in various formats, and then animate the tangent of that curve interactively.
There are quite a few daily comics that I enjoy reading, and most of them are available for free via the internet. Unfortunately, in order to view them, I am forced to plough through a large number of advertisements on a separate web page for each one.
This script is one that I wrote which downloads the comics that I want to read, copying them directly on to my computer. This allows me to view them all on the same page, and without any unwanted solicitations.
Edpat is almost exactly the same as edpics, with one or two minor changes. I wrote it to make the editing of graphical patterns easier. It draws the pattern on the background of the screen as you edit it, and some of the drawing tools behave in a modular fashion. It uses the same file format as edpics, and thus suffers the same limitations.
Edfont is a font editor that I wrote for game design purposes. It is not anything great. I wrote it for my use only, so it isn't user friendly, or particularily intuitive. It stores the fonts in a very non-flexible format: The first byte is the width, the second byte is the height, and each remaining bit tells the status of each pixel in each character. For instance, if you made a font with the dimensions 10 * 16, the size of the file would be 8 + 8 + 10 * 16 * 256 bits. This is equal to 5140 bytes, or approximately 5 kilobytes.
When I studied OAC calculus in high school, we had to do an "independent study" to complete the course. For mine, I developed two pieces of software that applied to the field. This first one is a simple interface that would let you enter a pre-formatted function, and would return the derivative of that function.
A simple script I wrote that searches my computer for music, then plays songs or albums at random. When starting, it slowly tapers the speaker volume from zero up to a pre-selected level. I wrote this so that I could use it as an alarm clock in the morning. It's very nice to have an alarm clock that doesn't startle you awake with sudden noise, doesn't play advertisements, and can play your own selection of music.
Over time, as the Internet became a global presence, some of my work branched into that area. This is a short list of some software I've written that is used on-line.
This is a tool I wrote to help end users remove large e-mails that are waiting for them on the server. A very common problem with e-mail on a dial-up connection occurs when trying to download a large message. It takes so long to download the message that the mail client gives up, thinking that it's not getting any response from the server. This happens all the time with Microsoft's "Outlook Express" and leads to many calls for an ISP's technical support desk.
Although it was previously in use by an ISP for which I performed the gruesome task of technical support, it would appear that they no longer wanted it after I left. So if you would like to see a working version of it, there's currently a copy running at http://very.weirdly.net/mailmasher.php.
Being both an avid cyclist and a bit of a geek, I like to collect statistics on the trips I take on my bicycle. At first I built a simple database to keep track of my numbers, but it's a bit of a pain to manually enter them using MySQL. To make it simpler I decided to write a series of web forms and scripts that could be used to enter the data. This snowballed into a multi-user data tracking system, and a library that can be easily modified to handle a variety of multi-user systems. This involves too many different files to be viewed directly through this web page, but if you would like to see the scripts, they are available through the link above.
I took up origami some time ago, and have designed and folded several different shapes over time. Eventually I decided to index them and present them publicly, so I registered the domain www.diagrami.com and started photographing my work. I created a database from which the images and the corresponding information could be retrieved, and wrote the page using PHP and MySQL.