Monday, 22 October 2007

And now for a message...

One of the problems with adding friendly monsters, or for that matter talkative monsters, is that they generate a lot of additional message traffic. The Angband message UI is not great: messages are displayed at the top of the screen on one line, and you have to press a key to see the next message in the sequence. The alternative is to display auto_more, which means you don't see any messages at all. Auto_more is intended for use in conjunction with displaying the message history in one of the Angband term windows. The disadvantage with that is that you devote a lot of screen real estate to what may be one message, or one hundred. And if its one hundred, you'll only see the last 20 messages or however big the term window you use is.

The Angband variants haven't improved on this much. Sangband allows you to have a larger message line size, which is a slight improvement on both auto_more and the Angband default, but not significantly so. In general, no one seems to have come up with a good solution. Until now.

I've added an easy_more interface, which I'm going to try to make the default for the next release of Unangband. The easy more interface overwrites the whole display (actually preferring to use the top half of the screen for readability), including the playing field with game messages, as in this screen shot.

The big disadvantage with that is you may have important display information obscured by the messages, including e.g. the location of the player. But a quick press of the escape or return key, allows you to dismiss the messages and see what you're doing. And if there's more than a screenful of messages displayed in a round, you can use space bar to scroll through them all. Its important to note here that (except on Windows - see below for why) you'd never have to make more key presses than you would under the existing message implementation.

More importantly, I allow the player to continue without being interrupted at all. At the point you could press space or return, you can also enter an actual command. So if you don't see anything important happening, you can continue to do whatever you want. So easy_more acts like auto_more in that the messages don't (usually) interrupt your play.

So what do I end up doing with the top line of the screen, the one that used to show messages, now that easy_more overwrites the playing field with messages?

Well I have this great mouse implementation in windows, that allows you to move the mouse pointer over anything in the playing field, to see what it is. It's windows only at the moment, because I haven't been able to do platform specific code for any other platform (Linux, I'm looking at you), which is basically just polling the mouse pointer position, and sending a key event with mouse button set to zero, if the mouse moves over a different grid.

But that kills two birds with one stone. And I'm happy with that message...

(I'll be doing the 3rd AI article later today).

No comments:

Post a Comment