Fixing a TriTryst bug / binary patches

I’ve had many reports over the years of my game TriTryst failing on non-US versions of Windows.  I didn’t give it much thought, figuring that the game was trying to do something culture-specific.  Since I don’t have the program’s source code or a non-US version of Windows to play with, I just told everybody that it was a known issue with no fix.  I got another of those reports the other day and somehow it dawned on me that one likely cause was the thousands separator in the score display.  You see, we created a custom font for the score display but only created characters for the digits and the comma.  “What would happen,” I thought to myself, “if somebody used something other than the comma for a digits separator?”

I found the regional settings for Windows 2000, changed the digits separator to a period, and fired up TriTryst.  Sure enough, when the score reached 1,000 points, the game crashed.  Better, Visual Studio offered to let me debug the program.  You just gotta love just-in-time debugging.  Looking at the disassembly, the problem was obvious.  The code knows about the comma and the digits, and anything else in the score string will cause the program to crash.  A couple of minutes with an assembler and my trusty file dump/patch utility, and I had a program that would handle just about any digits separator I’m likely to encounter.

Making the patch on my system was pretty easy once I figured out the problem.  But distributing the patch turns out to be a major pain.  All I need to do is change two bytes in the executable program.

Back in the DOS days when programs often were smaller than 64K, it was a trivial matter to create a batch file that would load the program in DEBUG, patch a few bytes, and write the file back to disk.  DEBUG was a standard part of DOS so you could count on it being there.  DEBUG is still installed with Windows XP, but it’s still designed for use with 16-bit programs that are smaller than 64K.  If there’s a way to automate it to patch beyond the first 64K, I don’t know what it is.

I also couldn’t find a free Windows-based binary patch program that I could use to make a simple patch distribution.    After considering all of my options, I wrote a custom Delphi program to do it and posted the program on my TriTryst BugFix page.  I’m not terribly happy with that solution, though.  If you know of a free binary patch program that I can use to distribute simple patches, I’d sure like to hear about it.

TriTryst on Windows 2000 and Windows XP

I finally took the time to install my game TriTryst on Windows 2000 and Windows XP systems, and take some notes.  I’ve put those into a presentable form and published them here.  There’s also a page that describes some of the cheats and Easter eggs that are in the program.  Hopefully, those pages will help those people who’ve been having trouble with the program on their new systems.

TriTryst

I’m getting an increasing number of messages from people who’ve been playing my game TriTryst, but are having difficulty getting it to run on their newer systems.  It never ran well (if at all) on Windows NT, but I had very little trouble with it on Windows 95, 98, ME, and 2000.  I’m getting reports now that it won’t work on Windows XP.  Next week I’ll be back in the office where I have easy access to XP machines, and I will do some experimentation to get the program running there.

I’m also getting requests for updates or fixes to the game.  I have a working prototype clone of the game that I finished over a year ago, but haven’t released it because the art is so horrible.  That and I need to come up with a new name for the game.  The original publisher of the game has been acquired so many times that I doubt the owners of the intellectual property have any idea that they own the game.  I’m not at all worried about the legal ramifications of releasing a clone of the game, seeing as how I have no access to the original source code and there were no trade secrets in its operation.  My clone is written in a different language using totally different tools and technologies.  Still, the name itself probably is copyrighted, so I’ll have to come up with something different.

The final hurdle is how to market the darned thing.  I could just put it on my web site as freeware, I guess, but I’m going to incur some support costs (mostly time), and will inevitably have to address problems that crop up on other systems.  I don’t have the resources to test the game on every conceivable platform, and would have to pay somebody to do that if I wanted to market the game.  Shareware is an option, I guess, and I could use income from registrations to complete the platform testing and possibly extend the game’s capabilities.  Finally, there’s the idea of kioskware—selling the rights to a company that fills the $10.00 bins in discount computer stores.  Do such things still exist?

TriTryst nears completion

I’ve spent a lot of time this weekend on my rewrite of TriTryst.  The game’s functionality is complete now, at least the first version.  I have to write the online help, create some levels, and do something about the art.  Something that I didn’t realize before this weekend is just how hard it is to create a playable level.  I’m sure this problem isn’t limited to this particular game.  There’s a very fine balance between too hard and too easy, and you have to take into account your experience level as you’re working.  What I may find easy after years of playing the game, a novice may find very difficult.  This is one reason I’ve added the ability in the game for users to create their own levels.  It takes time to design and test a level, and a feel for what’s fun, too hard, or too easy.  Perhaps somebody who’s better at it than I am will create some levels and send them to me.

So how close is the game to done?  Barring anything unforeseen, I will have the first version of the game (With a new name. Any suggestions?) completed and uploaded to my web site by the end of January.

TriTryst Work / GIF Images in Delphi

I got tired of recompiling my game program to try out different foreground/background texture combinations, so I built a little test program onto which I can drop images for testing.  I’m going to download a bunch of textures and put Debra to work picking out good combinations.  She has a much better sense of esthetics than I do.  I’ll probably add the ability to select textures and tile sets to the game itself, but not for the first version.

When building the test program I ran into a problem with Delphi that I had forgotten about:  there’s no Borland-supplied support for GIF images.  Not a problem–I searched for “delphi gif” on Google, and in less than five minutes had GIF support in my program.  The solution I found is the TGIFImage component by Anders Melander.  Not only does the component appear to work flawlessly, but it’s very well documented.  I download and examine a lot of code from the Web, and rarely do I run across anything so thoroughly documented.  The Web site is chock-full of information about the component, LZW compression, other GIF components, and the JEDI initiative.  The full download kit includes much of this information and a very instructive demonstration program.  If you need GIF support for Delphi or C++Builder, definitely check this one out.

Cloning TriTryst

One of my home projects is to complete a knock-off (in Delphi) of the game TriTryst that I originally wrote in C for Virgin Interactive back in 1995.  The basic game logic is working, and I can actually play the game.  But the art is ugly.  Okay, really ugly.  So I’m trying to come up with something a little more palatable before I let the world see the game.

Making art on the computer is hard.  And the available programs don’t make it much easier for the novice.  There are photo editing programs that will do all kinds of nifty things to photographs, and high-end graphics packages like Adobe Photoshop that will do anything as long as you already know what the “Magic Wand” tool does.  Photoshop is powerful, but the user interface?  Ugh!  I haven’t yet run across a simple program that will let me quickly and easily create some basic shapes in different colors, add some lighting and transparency, and save the individual images as BMP files all with the same palette.  Is it really that hard, or am I just artfully challenged?