Light at the end of the tunnel

I’ve been partially, but not completely, black-boxing the development of the TableMaster GUI.

Here’s what it looks like right now:

Current Screenshot

Some things never change. There was one thing I’m doing that I couldn’t figure out a really elegant way to do; the only solution seemed to be brute force and awkwardness. So I broke down and looked at my old code to see how I’d done it back then. Yeah. Same way.

Continue reading “Light at the end of the tunnel”

Menus and popups and options, oh my!

Wow … I’d forgotten that I had so many popup menus in there. Right-click menus were kind of a new thing at the time and I kind of went nuts with them.

My design philosophy for the TableMaster GUI, which hasn’t changed, is that it should be up to the user, not to me, exactly how they want to do something. So for any given function, there would be multiple ways to do it: from the main menu, a popup menu, clicking a button, with a hotkey … pretty much any way you thought you might be able to do something, you could. This made for a very useful UI for the user, but a bit of a hairball for the programmer.

The fun (ha!) part at this point is that about a week before I decided to go ahead with the TableMaster project, I got a new computer desk. It’s really an awesome drop-front desk that I found in a cluttered antique shop and fixed up a bit, with little pigeonholes and things and even an almost-secret drawer, but putting it in place necessitated moving several shelving units, building a new bookcase, and disrupting, well, pretty much everything. So my old CD backup of the TM/Win source (which modern Delphi would probably choke on, but at least I could look at what I’d done) is down there … somewhere.

Given a few of the things I’ve found, though — for instance, I’d completely forgotten that I had a built-in table editor with some fairly interesting features, though now I remember it and remember that I wanted to take that farther than I ever did (envisioning something like the Delphi IDE for table writing, which might have been, um, overkill? just a little?) –maybe I should stop coding and start digging.

So here’s another question for the hypothetical readers I imagine I have: Did you ever actually use the TM/Win table editor? Or did you just use Notepad? Is there a reason for me to put that in the first release? In a later release? Never?

Continuing on…

The GUI is almost finished. I’m hooking up the configuration saving right now, and I still have to do the dice buttons. It’s coming along nicely. Of course, I did this already, 20 years ago!

I decided to use an .ini file instead of the Registry for config. TableMaster being what it is, it should be as portable as possible. Registry-based configuration is naturally tied to a specific computer. Therefore, it will be using an .ini file instead, so you can put the whole thing (including all your favorite tables) on a thumb drive and take it with you. Plus that will make it a lot easier if I want to port it to another platform in the future, which is a definite possibility.

Of course, this is the easy part, but it had to come first before I can start building the table engine itself. It looks like I’ll be moving on to that next week. Things are coming back to me a lot faster than I expected (I haven’t really programmed in anything that isn’t Perl or PHP since the original Wintertree days) and I’m remembering “oh, yeah, that’s how I did that” (sometimes interspersed with “… but why?).

A little TableMaster history: Back in the day, the table engine was actually a separate program; in fact, that program — GENERATE — originally existed without any sort of front end at all. When I built the original for myself, it just ran off the MS-DOS command line: GENERATE 10 GEMS. Things were so much simpler back then, eh? After all, when I started development on this, there was only Windows 3.1 and that was just a shell over MS-DOS. The first Windows front end was written in Visual BASIC, and it didn’t work very well; Visual BASIC didn’t work very well. I chucked that and TM remained a DOS program (I have to give a shout-out here to my old friend Bill Swallow for his excellent MMI library, which I used for most of the screen handling in TM/DOS) until Borland Delphi came out in 1995.

I suppose I should be coding instead of reminiscing. Given the number of people who are reading this (current count: 0) compared to the number who will buy TableMaster when it’s ready (hopefully some number > 0) it would seem to be the more profitable course of action, certainly. But here I am, listening to Celtic music and taking a break from TableMaster coding, and all of a sudden it’s 22+ years ago. Except I don’t have to worry about running a BBS for support nowadays!

Random historical trivia: my first development machine for TableMaster was a 6 MHz 80286 with Hercules monochrome graphics, 1 meg of memory, a 5.25″ floppy drive (which I still have somewhere!), and  a 20 meg hard drive.

Note on version numbering

Back in the day, I wasn’t all that good at setting proper version numbers. The original TableMaster was up to 3.something, when it really should have been 1.3.something. That leaves me with a problem today, though, in that there would be some confusion. “TableMaster 2? But I already have TableMaster 3, I bought it in 1998!”

So, to keep things sorted out, I’m going with Roman numerals in the name. It’s TableMaster II, and version numbering will start over and be where it should be.

Beside, I’m black-boxing a lot of it — that is, starting with the known input and expected output, and writing what goes in the middle without reference to the previous code — because, frankly, there are places in my old code I’m afraid to go. There are a lot of better ways to do things than what I did in the process of learning Turbo Pascal in 1992, which is how the first proto-TableMaster got started. (and obviously I’m not using Turbo Pascal anymore, either!) So since it’s going to be mostly new code anyway, it’s definitely a new program; just one that does what the original did, only better. And without the grues lurking in the dim recesses of the code.

So: TableMaster II.