DanielT/NitroHack — Issue #1: Various UI issues
Author: tung
Created: 2012-01-19 10:33:33+00:00
State: open

I'm having some problems with the curses UI. These all happen on master (d5d4c7e2986996010e456226a546a56af45c65fd) on Linux, and also on the Windows 4.0.0 installer on nitrohack.org.

Feel free to split these into separate issues; I just didn't want to spam the issue tracker.

## 'g' often, but not always, fails in corridors.

To reproduce:

1. Walk into any corridor, lit or not.
2. Press 'g', then the direction to go along the corridor.

The player should walk until the tunnel forks or ends, or an enemy appears. Instead, they'll usually only move 1 space.

Oddly, sometimes this bug doesn't happen. It never happens in open rooms, and sometimes moving like this works in corridors anyway. If it works in a corridor, it always works in that corridor.

## '<' and '>' don't target the stairs in travel mode like they should.

To reproduce:

1. Move off the up stairs a few spaces if needed.
2. Press '_' to enter travel mode.
3. Press '<'.

This should put the cursor over the up stairs. Instead, it moves the cursor to the left.

Pressing '>' instead does nothing. However, features like '_' are targeted as expected.

## Space waits by default (yuck).

May not be a bug, but I've hit it a few times by accident. It'd be a much bigger deal if Nitrohack used the TTY interface, where it's often used to dismiss dialogs.

## Enter moves the player south (like ^J, yuck).

To reproduce:

1. Press Enter.

Nothing should happen, except a note about the key not being bound. Instead it has the same effect as Ctrl+J, which moves the player south.

Since Enter dismisses dialogs, this is a big problem.

## Pressing an unbound key brings up a dialog needing another key press to dismiss vs. TTY.

To reproduce:

1. Press apostrophe, or any other unbound key.

In the TTY interface in vanilla NetHack, this prints a note in the message line saying: Unknown command '''. No further key presses are needed.

In the curses interface of NitroHack, this brings up a dialog over the game saying: Bad command. A key must be pressed to dismiss this dialog. This extra key press makes typos much more clunky to recover from versus the TTY approach.

## Mnemonic type keys don't work when #loot'ing or multi-dropping.

To reproduce:

1. Press 'D'.
2. Press ')'.

In UnNetHack and the NetHack on NAO (telnet nethack.alt.org), this selects weapons. In NitroHack, nothing happens.

This isn't a bug, but I find it's much faster to just press the key matching the item glyph instead of having to scan the dialog, find the matching letters and press those letters.

## Shift+hjklyubn don't move as far as possible near edges in far-look mode.

To reproduce:

1. Press ';' to enter far-look mode.
2. Move the cursor near, but not right against the edges.
3. Press Shift+hjklyubn towards the edge.

Instead of moving the cursor as far as possible as in TTY, the cursor doesn't move. This makes Shift+hjklyubn 'stick' near the edges of the map, making it harder to move the cursor.

## Superfluous "--More--" prompts

In general, "--More--" prompts should only appear if the game prints messages with more lines than can appear at once. Vanilla NetHack works this way.

In NitroHack, the curses interface triggers the "--More--" prompt even if you just e.g. enter and use far-look, far more often than needed. This gets really annoying after a while.

## Message log opens with earliest, not latest, messages.

To reproduce:

1. Press '^P' to open the message log.

This opens the message log, starting at the earliest messages. To get the latest, you have to press end or '>' a few times. This gets annoying after a while, since the latest messages tend to be the most useful, so the log should start scrolled at the bottom, not the top.

I'm not a fan of the alternative solution of inverting the log, since this reverses the reading order.

## Interface doesn't fill a large terminal vertically.

To reproduce:

1. Resize the terminal taller than 36 rows.

The interface should resize to accomodate the extra vertical space, like the screenshots on nitrohack.org. Instead, the interface leaves blank rows at the bottom of the terminal.

## Floor/item display under player causes inventory to "bounce" when walking.

To reproduce:

1. Resize the interface to show the inventory to the right.
2. Move on and off a door, item or dungeon feature.
3. Watch the inventory.

The floor/item display pushes the inventory down when it's there, making the inventory bounce jarringly when walking or travelling. It's a minor annoyance, but moving the display to a better place, e.g. under the inventory would stop this effect.