• Display issue when playing remotely on a public server

    From Janis Papanagnou@21:1/5 to All on Sat Aug 17 16:24:24 2024
    I just noticed an undesired display effect when playing and viewing
    games on the Hardfought server (that I access through command line
    with ssh)...

    I played as usual a game of 'notnotdNethack', usual tty display, and
    everything was fine. Then I saved and viewed someone else's 'nndnh'
    game; it was played with a game configuration that used some other
    display setting (organized with separate sub-windows for inventory,
    map, messages, etc.). When I left that view-session to continue my
    own game the cursor was gone, and also when leaving the ssh session
    the cursor was still gone (and I had to reset my terminal).

    I assume that the display functions of the program ('nndnh') were
    not properly reset in that runtime environment. I'm not quite sure
    whether that would have to be fixed in the executable of the nndnh
    program[*] or (as a safety measure) in the Hardfought script that
    controls the viewing and playing of games. Or maybe in both tools,
    just to be sure and suppor a reliable interface. It's certainly to
    be considered a bug.

    Janis

    [*] In my own programs where I control the display output with ANSI
    codes I certainly do an ANSI-reset before exiting my programs, also
    in cases where the program gets interrupted roughly by signals such
    a cleanup is mandatory.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron Nazarov@21:1/5 to Janis Papanagnou on Sat Sep 14 21:18:54 2024
    Janis Papanagnou <[email protected]> writes:

    I just noticed an undesired display effect when playing and viewing
    games on the Hardfought server (that I access through command line
    with ssh)...

    I played as usual a game of 'notnotdNethack', usual tty display, and everything was fine. Then I saved and viewed someone else's 'nndnh'
    game; it was played with a game configuration that used some other
    display setting (organized with separate sub-windows for inventory,
    map, messages, etc.). When I left that view-session to continue my
    own game the cursor was gone, and also when leaving the ssh session
    the cursor was still gone (and I had to reset my terminal).

    I assume that the display functions of the program ('nndnh') were
    not properly reset in that runtime environment. I'm not quite sure
    whether that would have to be fixed in the executable of the nndnh
    program[*] or (as a safety measure) in the Hardfought script that
    controls the viewing and playing of games. Or maybe in both tools,
    just to be sure and suppor a reliable interface. It's certainly to
    be considered a bug.

    This cannot be fixed in nndnh as it has no way to know that you are
    watching. You are simply watching the ttyrec live and seeing exactly
    the same output that's being shown to the player.

    Some variants (NetHack 4, FIQHack, NetHack Fourk) support enhanced
    watchmode, where the watcher does actually run an instance of the game
    and can interact with it in a limited way (for example viewing the
    player's inventory). This works by opening the save file in read-only
    mode, which can be done since NH4 and its variants since they save
    constantly (and the save file is a log of the game that is replayed when
    the save is loaded). NH3 (and its variants) have declarative saves and
    do not save constantly, so this cannot be implemented.

    It would have to be fixed in dgamelaunch.


    Janis

    [*] In my own programs where I control the display output with ANSI
    codes I certainly do an ANSI-reset before exiting my programs, also
    in cases where the program gets interrupted roughly by signals such
    a cleanup is mandatory.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Janis Papanagnou@21:1/5 to Ron Nazarov on Sun Sep 15 15:17:56 2024
    On 14.09.2024 22:18, Ron Nazarov wrote:
    Janis Papanagnou <[email protected]> writes:

    I just noticed an undesired display effect when playing and viewing
    games on the Hardfought server (that I access through command line
    with ssh)...

    [ effects of ANSI control characters sent to the client ]

    This cannot be fixed in nndnh as it has no way to know that you are
    watching. [...]

    Yes, that's what also came to my mind after a second thought...

    [...]
    It would have to be fixed in dgamelaunch.

    ...so I came to the same conclusion.

    Thanks.

    Janis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)