Posted by
| Nick Gammon
Australia (22,973 posts) bio
Forum Administrator |
Message
| Expect the unexpected you mean? Always easier said than done.
The thing is, that if I wrote another MUD client from scratch these days I would do lots of things differently, with the benefit of hindsight. Right now there are script routines that overlap in functionality (eg. AddTrigger/AddTriggerEx, WorldName/GetInfo). Also the macros/keyboard accelerator implementations. The notepad windows. Spawned windows. Lots and lots of things.
A major change would be the way data is stored internally. I originally use the MFC (Microsoft Library) structures of lists, maps etc., but now I know STL (Standard Template Library) I would use that instead.
A while ago I tried to change the way the output buffer was stored from the current linked lists, to a STL deque, which would be have been sensible, and would have allowed lines to be easily deleted at random from the output buffer.
However, although it 95% worked, niggling issues remained that made me ditch it all. The screen didn't quite refresh properly, and I was spending hours and hours trying to work out why. Shoe-horning a new approach into the app that hadn't been designed for it from the start wasn't really working.
Similarly with the clearscreen idea. Sure, I understand what you are all saying, but if the screen could clear at a certain point in the drawing sequence, it changes a fair bit lots of things. For example, right now to draw the window, assuming the output window is scrolled to the bottom, I count back x lines where x is the size of the output window, and then start drawing. This doesn't work if halfway through there is a screen clear, so that is one calculation that changes. Then there is clicking to select a word or character. Again, to work out what line that click is really on is a matter of simple counting. But if there are screen clears it isn't.
Also, I can see where this is heading. Once you have screen clears, then you will want cursor positioning. You mention the idea of drawing a puzzle. So you will want to clear the screen, and then make the cursor jump all over it while the puzzle is being drawn.
Sorry, maybe one day. The 0.1% registration rate doesn't exactly encourage me to spend hours if not weeks adding a feature that maybe 4 people will use. I notice that SimpleMU doesn't support it either at present, although zMUD seems to. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|