Software, technology, sysadmin war stories, and more. Feed
Sunday, December 9, 2012

Broken primitives and leaky fills

Did you ever have a technical problem with something that you "fixed" by just not using the technology in question? Did you also try to look up the answer years later just to get some sort of closure, only to find that as far as the web of today is concerned, it never existed? That happens to me now and then.

I've been working on a project which needs to do a proper text-based interface. It's almost like building something from a simpler time when you didn't have to try to make text-based pseudo-graphical menus or full-on pointy-clicky stuff to get people to use your tool. It got me thinking about what life used to be like in the BBS world.

It seemed like the simplest systems would just push basic ASCII at you: numbers, letters, and the simple characters you could get on your keyboard. They wouldn't use any funny things like VT100 control sequences to move your cursor around, clear the screen, or change colors. You just got a stream of line-oriented text, and it became a continuous scroll of activity.

Later on, I discovered the colors and graphics which were possible when connecting from one Commodore machine to another and they actually exploited the full range of the so-called "PETSCII". For whatever reason, these systems tended to ask you to say "Shift-@ for graphics" when you connected. On a suitable machine, that was actually possible since @ was its own key off to the right of P. It's not like many keyboard layouts now which park @ on the 2 key.

It was a clever approach, since someone on another system would try to type it with a shift-2 and would just send a @. It would notice the wrong character and would use ASCII mode for them instead.

Still after that, I saw systems which would just ask you straight out if you wanted ANSI color graphics or not. The difference was that if you said no, they'd switch to a simpler version of things. They didn't support the PETSCII environment since it made no sense. yOU COULD TELL A MISMATCH BETWEEN THE bbs AND A USER SINCE THEIR UPPER AND LOWER CASE CHARACTERS WOULD BE INVERTED, JUST LIKE THIS.

The last attempt I saw to spice up the dialup world was RIPscrip. It worked by having its own set of codes much like VT100 terminal sequences, but these were supposed to invoke drawing primitives. It seemed to support boxes, lines, clickable regions, and arbitrary polygons.

It also supported one other feature which is where my problem came in, and which also explains why I never took it seriously: flood fills. For whatever reason, when I ran a terminal program in RIP mode on my machine, it would frequently fail to draw certain shapes completely. It might draw a rectangle or circle but would miss a few border pixels here or there. This would give a weird effect but it was generally harmless.

The problem began when someone first drew a shape and then commanded a flood-fill into that space. Since it was unbounded on my system, the flood would "escape" and it would start filling the space outside of the shape. Sometimes, this would mean it would devour the entire screen. Due to the relatively low speed of such things, you could actually watch it happening and would just know when it was about to break loose and go wild. All you could do was sit there and wait for it to finish.

This sort of thing rendered entire parts of these supposedly-modern systems useless to me, since it would frequently cover up the text, buttons, or whatever else it was I was supposed to be seeing. I'd wind up with a screen which looked more like abstract art than a proper user interface.

I never figured out what was going on, and even now, I can't seem to find any reference to it ever happening to anyone else. It's probably for the best, since it meant I didn't spend a lot of time trying to come up with new versions of everything just to make it work in that environment. Right around that time, the web was becoming more useful and colorful, and it was a far better place to invest effort.

I guess if I had infinite free time then I could try to revive some of this stuff from archives and ancient backups and see if it could be reproduced in a DOS emulator. If that worked, then it would be time to "open the hood" and try to figure out just why those primitives were being drawn full of holes. That would probably yield a decent explanation after long enough, but that's all it would accomplish. The actual need no longer exists.

Besides, actual customers pay better than theoretical ones.