Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Nethack for the Blind

106 views
Skip to first unread message

BlackFurredBeast

unread,
Jul 29, 2004, 5:29:06 AM7/29/04
to
Hi there!

My blind Girlfriend just aquired a taste for roguelike games. She
started with ADOM, but she is a little annoyed that she can't put down
markers for places she has just visited. So I suggested NetHack to
her, because of the ability to write things into the dust/floor etc.

Now the problem:
My girlfriend uses a screen reader with speech output exclusively.
ADOM worked pretty well with it, since it has feedback when the
character bounces into a wall (a note on the "event line". But there
seems to be no similar feature in NH. No feedback whatsoever when the
character hits a wall. Is there an option buried deep within I don't
know of? Otherwise NH would be a good alternative to ADOM...

A little help would be very welcome.
Cheers

Dylan O'Donnell

unread,
Jul 29, 2004, 6:23:25 AM7/29/04
to
chri...@web.de (BlackFurredBeast) writes:
> My girlfriend uses a screen reader with speech output exclusively.
> ADOM worked pretty well with it, since it has feedback when the
> character bounces into a wall (a note on the "event line". But there
> seems to be no similar feature in NH. No feedback whatsoever when the
> character hits a wall. Is there an option buried deep within I don't
> know of? Otherwise NH would be a good alternative to ADOM...

There's no option to give message output when you walk into a wall,
no. Adding messages is a relatively straightforward patch; adding a
togglable option would be somewhat trickier (read: I'm too lazy to do
it right now).

(Note that if you're polymorphed into something that _can_ walk
through walls, such as a xorn, this patch doesn't give you a message for
doing so; you don't notice any difference.)


--- nethack-3.4.3/src/hack.c Sun Dec 7 23:39:13 2003
+++ nethack-3.4.3bis/src/hack.c Thu Jul 29 11:19:00 2004
@@ -561,8 +561,12 @@
if (Passes_walls && may_passwall(x,y)) {
; /* do nothing */
} else if (tmpr->typ == IRONBARS) {
- if (!(Passes_walls || passes_bars(youmonst.data)))
+ if (!(Passes_walls || passes_bars(youmonst.data))) {
+ if (mode == DO_MOVE) You_cant("%s through these iron bars.",
+ Levitation ? "float" :
+ locomotion(youmonst.data, "walk"));
return FALSE;
+ }
} else if (tunnels(youmonst.data) && !needspick(youmonst.data)) {
/* Eat the rock. */
if (mode == DO_MOVE && still_chewing(x,y)) return FALSE;
@@ -576,8 +580,12 @@
if (mode == DO_MOVE) {
if (Is_stronghold(&u.uz) && is_db_wall(x,y))
pline_The("drawbridge is up!");
- if (Passes_walls && !may_passwall(x,y) && In_sokoban(&u.uz))
+ else if (Passes_walls && !may_passwall(x,y) &&
+ In_sokoban(&u.uz))
pline_The("Sokoban walls resist your ability.");
+ else You_cant("%s through this wall.",
+ Levitation ? "float" :
+ locomotion(youmonst.data, "walk"));
}
return FALSE;
}
@@ -621,8 +629,12 @@
#endif
|| block_door(x,y))) {
/* Diagonal moves into a door are not allowed. */
- if (Blind && mode == DO_MOVE)
- feel_location(x,y);
+ if (mode == DO_MOVE) {
+ if (Blind) feel_location(x,y);
+ You_cant("%s diagonally through this doorway.",
+ Levitation ? "float" :
+ locomotion(youmonst.data, "walk"));
+ }
return FALSE;
}
}
@@ -670,6 +682,9 @@
|| block_entry(x, y))
)) {
/* Can't move at a diagonal out of a doorway with door. */
+ if (mode == DO_MOVE) You_cant("%s diagonally out of this doorway.",
+ Levitation ? "float" :
+ locomotion(youmonst.data, "walk"));
return FALSE;
}

--
: Dylan O'Donnell http://www.spod-central.org/~psmith/ :
: "'Loddle-deeked, is it? It's been many camlings since the gitches :
: in the delcot of tondam have been loddle-deeked. That'll be the :
: gheliper's doing.'" -- Carl Muckenhoupt, "The Gostak" :

BlackFurredBeast

unread,
Jul 29, 2004, 12:29:26 PM7/29/04
to
--- snip ---

Thanks for this awesome effort. Now there are just two problems.

The first one (and the bigger one) is the fact that NetHack and the
speech software my girlfriend uses are not compatible at all (FYI,
it's Jaws For Windows 4.51, by Freedom Scientific). The speech reads
the character creation screen in the Windows tty version, but from
there it goes downhill. She gets some bits and pieces of the ascii
map, but whatever happens in the two info lines (the one near the top
of the screen) are never read. We tried setting frames (a function
JAWS offers) that should have read any change in the "framed in" area,
but that didn't do any good as well. The native windows version did
work a little better, as far as the ascii map was concerned, but the
status lines got never read as well.

Problem #2 would be that I have absolutely NO clue where to stick the
code segment you just wrote.

My girlfriend sticks with ADOM so far, which is absolutely playable
with JAWS, except the fact that you can't put down markers in areas
you already visited.

Too bad it didn't work out...

David Damerell

unread,
Jul 29, 2004, 1:29:44 PM7/29/04
to
BlackFurredBeast <chri...@web.de> wrote:
>The first one (and the bigger one) is the fact that NetHack and the
>speech software my girlfriend uses are not compatible at all (FYI,
>it's Jaws For Windows 4.51, by Freedom Scientific).

Perhaps it might work with a PuTTY connected to a real computer running NH
- which would also make recompilation easier.

If you do get some success there, consider the listmons patch.
--
David Damerell <dame...@chiark.greenend.org.uk> Distortion Field!

Jesse Meyer

unread,
Jul 29, 2004, 2:23:46 PM7/29/04
to

Did you check out this:
http://www.nethack.org/v340/Guidebook.html#_TOCentry_43

Don't think it has what you need, but it can't hurt to read it.

--
Want to listen to new music?
Why don't you look at iRATE? icq: 34583382
http://irate.sourceforge.net/ msn: das...@hotmail.guess
jabber: das...@theoretic.com

Kent Paul Dolan

unread,
Jul 29, 2004, 5:24:25 PM7/29/04
to
"BlackFurredBeast" <chri...@web.de> wrote:

> Thanks for this awesome effort. Now there are just
> two problems.

> The first one (and the bigger one) is the fact
> that NetHack and the speech software my girlfriend
> uses are not compatible at all (FYI, it's Jaws For
> Windows 4.51, by Freedom Scientific). The speech
> reads the character creation screen in the Windows
> tty version, but from there it goes downhill. She
> gets some bits and pieces of the ascii map, but
> whatever happens in the two info lines (the one
> near the top of the screen) are never read. We
> tried setting frames (a function JAWS offers) that
> should have read any change in the "framed in"
> area, but that didn't do any good as well. The
> native windows version did work a little better,
> as far as the ascii map was concerned, but the
> status lines got never read as well.

I'm guessing of course, my own vision is merely
going, not yet gone, but shouldn't her software have
a "point to it and the screen-to-voice software
reads it to you" capability? If so, she'd be no
worse off than the rest of us if she forgot to check
her messages and status line for useful information
after every move: her Player Characters would just
die a lot, unnecessarily. Happens to mine hourly.

Really, having the software read every message and
status line change aloud _as it happened_ would make
being blind a _huge_ playing advantage in NetHack.

> Problem #2 would be that I have absolutely NO clue
> where to stick the code segment you just wrote.

From which we diagnose instantly that you don't
program "C" on the Unix family of operating systems
on a regular basis.

Quick tutorial. What Dylan posted wasn't "source
code", exactly. It was a wrapped version of source
code containing its own installation instructions,
in a somewhat cryptic form.

It is possible to do the installation by hand, but
the usual way is to run a program called "patch()"
that does the job for you. Versions of patch(), which
is freeware, are easily found for pretty much any
computer platform going. It is one of the first
products of Larry Wall, author of the Perl
scripting language that now runs big parts of the
Web.

What you saw had at the top the name of the file
to be patched. If there had been several files
to be patched, a section very much like this one
would start right after this one, for the next
target file.
The "name" is given as the name of an unmodified
version, and the name of a modified version; usually
the file names are the same but the directory
locations in which they sit are different.

The format of this "wrapper" is that it shows the
difference between the old file and the new file.
To help the patch() program figure out where to put
the code modifications, even if you have perhaps
already modified the same file other ways yourself,
more than just the code changes are shown, to give
context, in what is called a "context diff" format.

In general, lines of code are wrapped with four
possible prefixes: a <space><space> prefix says
that what is shown is _context_; it is already in
the unpatched code, it is just included as part of
the wrapper to help patch() locate the place to do
the changes. Usually, there are three lines
of context around each line or group of lines that
is a change bit.

The change bits are prefixed <plus><space> for lines
that are material to be added, <minus><space> for
existing lines that are to be deleted, and
<exclamation_mark><space> for existing lines which
have been changed in minor ways. You can use these
guides to help you do the needed replacements by
hand.

> My girlfriend sticks with ADOM so far, which is
> absolutely playable with JAWS, except the fact
> that you can't put down markers in areas you
> already visited.

> Too bad it didn't work out...

Don't give up yet, though from the sound of things,
with the limited experience your comments (perhaps
incorrectly interpreted by me) seem to indicate, you
aren't going to be wonderfully happily surprised at
what a mess it is to build code, NetHack code for
example, in an MS-Windows environment, if that is
what you are using. Somewhere there is an online
guide showing exactly how to cookbook your way
through the task, to which URLs are frequently
published in rgrn, and it can all be done with
software development tools, probably MingW,
or Cygwin + gcc, free for the downloading. So, we're
down to the sticking point: just how much do you
love this girlfriend of yours? <grin> Enough to
undergo extreme intellectual pain and frustration
to rescue her from ADOM?

xanthian.


--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG

Topi Linkala

unread,
Jul 29, 2004, 5:25:25 PM7/29/04
to
BlackFurredBeast wrote:

> Problem #2 would be that I have absolutely NO clue where to stick the
> code segment you just wrote.

Use patch to the official source. That automatically makes the changes
to the correct places (or complains but that shouldn't happend). Then
compile nethack.

I made copy of the official source distribution that I already had
configured for win32-compilation. Stored Dylans patch as blind.diff on
the root of that source tree.

Used these commands:

patch -lp 1 -i blind.diff
cd src
nmake install

And I had patched binary. (I have GNU patch and Visual Studio 6.0 C++
compiling environment.) The switches -lp 1 are usually enough but
needed. The directory where the source trees are stored are usually
different from installation to installation and so is the handling of
whitespace of the editors from installation to installation. The -l
tells not to care about whitespace and -p 1 tells to strip the first
part of the file path (which is the name of the root of the source
installation).

Of course you need the tools to do that but you should have them. If you
have windows as os then GNU tools should help. If you have Linux then
you have all the tools necessary allready.

If you have further questions feel free to ask.

Topi
--
"The whole problem with the world is that fools and fanatics are
always so certain of themselves, but wiser people so full of doubts."
- Bertrand Russell
"How come he didn't put 'I think' at the end of it?" - Anonymous

Kent Paul Dolan

unread,
Jul 29, 2004, 5:45:55 PM7/29/04
to
While the subject is open, and as I'm purely guessing here,
feedback from a blind NetHack player is solicited, but I think
the <slash> command could be usefully patched to be _much_
more useful to a blind player, as follows.

1) Every description is preceded by a location relative to the
Player Character (PC): "Six cells left and three cells down from
you is".

2) The command stays modal, but <escape> is the only way to
exit that mode, so that additional "stuff" can be added.

3) Instead of "marching the cursor to an object at a known
location, then typing <period>", the patched software would
do a full announcement for _every_ cell crossed, "painting a
picture" of the board in the blind player's mind.

4) Instead of asking after each descripton, "more info?", the
player would have to actively type a <question_mark> to get
more information than the simple description of the cell's
contents; this is to cut down the usual operation workload
for the player to typing one cursor keystroke per cell move.

I'm fairly sure, since all this is based on functionality
already in place, it would be a fairly simple "mere matter
of programming", if the target audience agrees this would
be a good patch, and some patch-writer-person is feeling
ambitious.

This would, in response to the original inquiry, allow for
a <slash><movement_command><escape><movement command> play
style for the blind player to use in looking ahead one cell
before moving there. My guess is that a game like NetHack
is very typing-intensive already for a blind player, so this
might be an acceptable amount of overhead.

A similarly-intended patch, which someone else can think
through to make an interface design, would read back to
the player in some fixed order the results of a "search",
to tell what is on the surrounding eight cells _and_ the
current cell, with one typed command. This one could
"easily" be a replacement for the current "s" command, and
would lie about secret doors being walls just as at present.

The only fiddly point would be the <number>"s" command,
which probably should only report the results of the
_last_ search executed, to prevent driving the user to
madness.

xanthian, purported onetime human interface guru.

Paul E Collins

unread,
Jul 30, 2004, 11:47:54 AM7/30/04
to
"Kent Paul Dolan" <xant...@well.com> wrote:

> [...]


> 4) Instead of asking after each descripton, "more info?", the
> player would have to actively type a <question_mark> to get
> more information than the simple description of the cell's
> contents; this is to cut down the usual operation workload
> for the player to typing one cursor keystroke per cell move.

The "more info?" prompt has always irritated me. The user is forced to
hit 'n' for every cell he wants a swift glance at. I'd favour a system
where '/' showed the short info and immediately freed the cursor
again, but pressing '/' a second time on the same cell
('double-clicking') would give the long info page.

Any chance of this at all?

P.


Sebastian Hungerecker

unread,
Jul 30, 2004, 12:03:30 PM7/30/04
to
"Paul E Collins" <find_my_re...@CL4.org> wrote:
> The user is forced to
> hit 'n' for every cell he wants a swift glance at.

Why doesn't the user just use ';' if he only wants a swift glance?

--
NP: nothing
If geiger counter does not click,
the coffee, she is just not thick

Dylan O'Donnell

unread,
Jul 30, 2004, 12:08:31 PM7/30/04
to
"Paul E Collins" <find_my_re...@CL4.org> writes:
> "Kent Paul Dolan" <xant...@well.com> wrote:
>
> > [...]
> > 4) Instead of asking after each descripton, "more info?", the
> > player would have to actively type a <question_mark> to get
> > more information than the simple description of the cell's
> > contents; this is to cut down the usual operation workload
> > for the player to typing one cursor keystroke per cell move.
>
> The "more info?" prompt has always irritated me. The user is forced to
> hit 'n' for every cell he wants a swift glance at.

Or to turn the 'help' option off. (The database would still be queryable
by name.)

> I'd favour a system
> where '/' showed the short info and immediately freed the cursor
> again, but pressing '/' a second time on the same cell
> ('double-clicking') would give the long info page.
>
> Any chance of this at all?

You mean pressing one of .,;: again on the same square, surely? You'd
only want to keep this within the same instance of the / command. Doable,
but slightly complicated.

Paul E Collins

unread,
Jul 30, 2004, 2:41:18 PM7/30/04
to
"Sebastian Hungerecker" <sep...@web.de> wrote:

> Why doesn't the user just use ';' if he only wants a
> swift glance?

Ha, I just learned something new and useful :)

P.


0 new messages