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

TK Gui for nethack?

0 views
Skip to first unread message

Michael Schlenker

unread,
Mar 5, 2003, 6:28:39 PM3/5/03
to
Hi all,

i would like to know if anyone made a (Tcl)Tk GUI for nethack yet? I
don't like switching from the QT port on linux to the other port on
windows, and I'm much too lame to play the tty version, so tiles is a
must have for me.

I took some looks at the GUI development comments in the source distro
and it seems quite doable and not too hard (if i can keep the Tk event
loop happy and running).

Is there any interest in a cross platform TK gui for nethack or does one
already exist?

Michael Schlenker

J. Ali Harlow

unread,
Mar 5, 2003, 7:35:39 PM3/5/03
to
Michael Schlenker <sch...@uni-oldenburg.de> wrote:

> i would like to know if anyone made a (Tcl)Tk GUI for nethack yet? I
> don't like switching from the QT port on linux to the other port on
> windows, and I'm much too lame to play the tty version, so tiles is a
> must have for me.

I'm pretty sure no such port exists, but if you just want a port that
runs under both UNIX and MS-Windows then both Qt and Gtk ports are
certainly possibilities (vanilla has Qt under both and Slash'EM has
Gtk under both). I've never looked at it, but it may not be too much
work to get Slash'EM's GL port to run under MS-Windows either.

--
J. Ali Harlow Email: J.A.H...@city.ac.uk
"When I consider your heavens, the work of your fingers, the moon and
the stars, which you have set in place, what is man that you are mindful
of him, the son of man that you care for him?" Psalm 8 v 3-4, NIV.

Istvan Marko

unread,
Mar 6, 2003, 12:24:47 AM3/6/03
to
Michael Schlenker <sch...@uni-oldenburg.de> writes:

> Is there any interest in a cross platform TK gui for nethack or does
> one already exist?

Michael,

If you or anyone else wants to work on a Tk GUI you might be
interested in nethack-el by Ryan Yeske and Shawn Betts:

http://www.nongnu.org/nethack-el/
http://savannah.nongnu.org/projects/nethack-el

Nethack-el is an Emacs frontend for Nethack. What makes it
interesting (other than that it's a great way to play Nethack) is
that the Emacs frontend and Nethack run in separate processes and
communicate using a pipe. The same protocol could be implemented by
a Tk frontend which could be written in pure Tcl/Tk.

Here is a sample of the protocol from the beginning of a game:

(nhapi-init-nhwindows "/usr/games/lib/nethackdir/nethack" "4" )
(nhapi-create-message-window )
(nhapi-create-status-window )
(nhapi-create-map-window )
(nhapi-create-inventory-window 3 )
(nhapi-restore-window-configuration )
(nhapi-yn-function "Shall I pick a character for you? [ynq] " "ynq" 121 )
;;; 121
(nhapi-clear-map )
(nhapi-update-inventory )
[...]
(nhapi-display-file "news" nil )
(nhapi-clear-map )
(nhapi-print-glyph 69 1 7 2347 832 45 )
(nhapi-print-glyph 70 1 7 2346 831 45 )
(nhapi-print-glyph 71 1 7 2346 831 45 )
[...]
(nhapi-print-glyph 74 6 7 2350 835 45 )
(nhapi-curs 73 3 )
(nhapi-update-status '(("name" "mahlee" ) ("rank" "Candidate" ) ("monster" nil ) ("St" 19 ) ("Dx" 13 ) ("Co" 12 ) ("In" 10 ) ("Wi" 11 ) ("Ch" 10 ) ("Align" "Neutral" ) ("Dungeon" "The Dungeons of Doom" ) ("Dlvl" 1 ) ("$" 0 ) ("HP" 14 ) ("HPmax" 14 ) ("PW" 4 ) ("PWmax" 4 ) ("AC" 4 ) ("HD" nil ) ("Level" 1 ) ("XP" 0 ) ("T" 1 ) ("confusion" nil ) ("hunger" nil ) ("sick" nil ) ("blind" nil ) ("stunned" nil ) ("hallucination" nil ) ("slimed" nil ) ("encumbrance" nil ) ))
(nhapi-create-menu-window 4 )
(nhapi-menu-putstr 4 'atr-none "It is written in the Book of Chih Sung-tzu:" )
(nhapi-menu-putstr 4 'atr-none "" )
(nhapi-menu-putstr 4 'atr-none " After the Creation, the cruel god Moloch rebelled" )
[...]
(nhapi-menu-putstr 4 'atr-none "attempt. Your hour of destiny has come. For the sake" )
(nhapi-menu-putstr 4 'atr-none "of us all: Go bravely with Chih Sung-tzu!" )
(nhapi-display-menu 4 )
;;; ()
(nhapi-destroy-menu 4 )
(nhapi-curs 73 3 )
(nhapi-message 'atr-none "Hello mahlee, welcome to NetHack! You are a neutral male human Monk." )
(nhapi-curs 73 3 )
(nhapi-message 'atr-none "Be careful! New moon tonight." )
(nhapi-curs 73 3 )
;;; gonorthwest 1
(nhapi-clear-message )
(nhapi-curs 72 2 )
(nhapi-message 'atr-none "You displaced flaffogo." )
(nhapi-update-status '(("name" "mahlee" ) ("rank" "Candidate" ) ("monster" nil ) ("St" 19 ) ("Dx" 13 ) ("Co" 12 ) ("In" 10 ) ("Wi" 11 ) ("Ch" 10 ) ("Align" "Neutral" ) ("Dungeon" "The Dungeons of Doom" ) ("Dlvl" 1 ) ("$" 0 ) ("HP" 14 ) ("HPmax" 14 ) ("PW" 4 ) ("PWmax" 4 ) ("AC" 4 ) ("HD" nil ) ("Level" 1 ) ("XP" 0 ) ("T" 2 ) ("confusion" nil ) ("hunger" nil ) ("sick" nil ) ("blind" nil ) ("stunned" nil ) ("hallucination" nil ) ("slimed" nil ) ("encumbrance" nil ) ))
(nhapi-print-glyph 72 2 15 334 341 64 )
(nhapi-print-glyph 73 3 15 398 16 100 )
(nhapi-curs 72 2 )
;;; gosouthwest 1
(nhapi-clear-message )
(nhapi-curs 72 2 )
(nhapi-message 'atr-none "You miss the jackal." )
(nhapi-print-glyph 70 2 7 2363 848 46 )
(nhapi-print-glyph 71 2 3 12 12 100 )
(nhapi-print-glyph 73 3 7 2366 851 60 )
(nhapi-print-glyph 73 4 15 398 16 100 )
(nhapi-curs 72 2 )
(nhapi-update-status '(("name" "mahlee" ) ("rank" "Candidate" ) ("monster" nil ) ("St" 19 ) ("Dx" 13 ) ("Co" 12 ) ("In" 10 ) ("Wi" 11 ) ("Ch" 10 ) ("Align" "Neutral" ) ("Dungeon" "The Dungeons of Doom" ) ("Dlvl" 1 ) ("$" 0 ) ("HP" 14 ) ("HPmax" 14 ) ("PW" 4 ) ("PWmax" 4 ) ("AC" 4 ) ("HD" nil ) ("Level" 1 ) ("XP" 0 ) ("T" 2 ) ("confusion" nil ) ("hunger" nil ) ("sick" nil ) ("blind" nil ) ("stunned" nil ) ("hallucination" nil ) ("slimed" nil ) ("encumbrance" nil ) ))
(nhapi-message 'atr-none "The jackal bites!" )
(nhapi-update-status '(("name" "mahlee" ) ("rank" "Candidate" ) ("monster" nil ) ("St" 19 ) ("Dx" 13 ) ("Co" 12 ) ("In" 10 ) ("Wi" 11 ) ("Ch" 10 ) ("Align" "Neutral" ) ("Dungeon" "The Dungeons of Doom" ) ("Dlvl" 1 ) ("$" 0 ) ("HP" 12 ) ("HPmax" 14 ) ("PW" 4 ) ("PWmax" 4 ) ("AC" 4 ) ("HD" nil ) ("Level" 1 ) ("XP" 0 ) ("T" 2 ) ("confusion" nil ) ("hunger" nil ) ("sick" nil ) ("blind" nil ) ("stunned" nil ) ("hallucination" nil ) ("slimed" nil ) ("encumbrance" nil ) ))
(nhapi-update-status '(("name" "mahlee" ) ("rank" "Candidate" ) ("monster" nil ) ("St" 19 ) ("Dx" 13 ) ("Co" 12 ) ("In" 10 ) ("Wi" 11 ) ("Ch" 10 ) ("Align" "Neutral" ) ("Dungeon" "The Dungeons of Doom" ) ("Dlvl" 1 ) ("$" 0 ) ("HP" 12 ) ("HPmax" 14 ) ("PW" 4 ) ("PWmax" 4 ) ("AC" 4 ) ("HD" nil ) ("Level" 1 ) ("XP" 0 ) ("T" 3 ) ("confusion" nil ) ("hunger" nil ) ("sick" nil ) ("blind" nil ) ("stunned" nil ) ("hallucination" nil ) ("slimed" nil ) ("encumbrance" nil ) ))
(nhapi-curs 72 2 )


--
Istvan

Michael Schlenker

unread,
Mar 6, 2003, 7:54:14 AM3/6/03
to
Istvan Marko wrote:
> Michael Schlenker <sch...@uni-oldenburg.de> writes:
>
>
>>Is there any interest in a cross platform TK gui for nethack or does
>>one already exist?
>
>
> Michael,
>
> If you or anyone else wants to work on a Tk GUI you might be
> interested in nethack-el by Ryan Yeske and Shawn Betts:
>
> http://www.nongnu.org/nethack-el/
> http://savannah.nongnu.org/projects/nethack-el
>
> Nethack-el is an Emacs frontend for Nethack. What makes it
> interesting (other than that it's a great way to play Nethack) is
> that the Emacs frontend and Nethack run in separate processes and
> communicate using a pipe. The same protocol could be implemented by
> a Tk frontend which could be written in pure Tcl/Tk.

Thanks for the pointer. Using two processes and a pipe would make it
really easy. Maybe i'll try to do it in april.

Michael Schlenker

0 new messages