Display glitch with GCU client?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PowerWyrm
    Prophet
    • Apr 2008
    • 2987

    Display glitch with GCU client?

    In order to play with Necklace of the Eye with my variant, I've compiled a GCU client using PDCURSES 3.4 (I'm on Win7)... but I face some weird display glitches.

    Below is an example of what's happening. When the character moves from the left side of the room to the right side, the walls are incorrectly redrawn until I press ctrl-R to redraw the screen. It seems that every single character that is drawn is one pixel too large.

    I'm wondering... Since the client only displays ASCII symbols using Term_text_gcu(), this problem shouldn't happen unless there's some obscure bug in the curses library. Can anyone tell me if there's the same problem with V?
    Attached Files
    Last edited by PowerWyrm; May 11, 2012, 10:16.
    PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
  • d_m
    Angband Devteam member
    • Aug 2008
    • 1517

    #2
    Originally posted by PowerWyrm
    I'm wondering... Since the client only displays ASCII symbols using Term_text_gcu(), this problem shouldn't happen unless there's some obscure bug in the curses library. Can anyone tell me if there's the same problem with V?
    It may be a problem with wide text (unicode) on Windows, which is UCS-2/UTF-16. That would be a bit ugly to diagnose.

    It may also be a problem with using reverse video'd spaces for walls (e.g. using A_REVERSE). You could test this by changing granite walls from:

    Code:
    F:56:all:0x81:0x20
    into:

    Code:
    F:56:all:0x01:0x23
    Other than those two things, I'm not sure what it could be besides a bug in the curses library.
    linux->xterm->screen->pmacs

    Comment

    • PowerWyrm
      Prophet
      • Apr 2008
      • 2987

      #3
      Not a problem with Unicode, I've tried using the non-Unicode functions to display the characters and I still have the problem.

      Not a problem with walls, it's still happening when using the basic # character to display walls.

      Then it's a bug in the curses library... dammit.
      PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

      Comment

      • d_m
        Angband Devteam member
        • Aug 2008
        • 1517

        #4
        Originally posted by PowerWyrm
        Then it's a bug in the curses library... dammit.
        Ouch

        Well, I know that a windows console mode used to work, so I think there must be some library out there that can do it. May require some serious #ifdef stuff though...

        Anyway, good luck!
        linux->xterm->screen->pmacs

        Comment

        • PowerWyrm
          Prophet
          • Apr 2008
          • 2987

          #5
          The problem arises when using colors. Printing everything in white using wattrset(window, 0) doesn't produce the glitch. But as soon as you use wattrset(window, somecolor), the glitch happens.

          I'll try to figure out if something in the current main-gcu code produces the problem, or if it comes from pdcurses. If it's a bug with pdcurses, the only other option is to download ncurses 5.9 and try the new Windows Console port that can be compiled with MinGW.
          PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

          Comment

          • d_m
            Angband Devteam member
            • Aug 2008
            • 1517

            #6
            Originally posted by PowerWyrm
            The problem arises when using colors. Printing everything in white using wattrset(window, 0) doesn't produce the glitch. But as soon as you use wattrset(window, somecolor), the glitch happens.

            I'll try to figure out if something in the current main-gcu code produces the problem, or if it comes from pdcurses. If it's a bug with pdcurses, the only other option is to download ncurses 5.9 and try the new Windows Console port that can be compiled with MinGW.
            The other thing I could imagine is that maybe pdcurses is trying to support 88 or 256 colors and failing? Or that it purports to be able to reset colors? In those cases, hard-disabling those features might also help.
            linux->xterm->screen->pmacs

            Comment

            • PowerWyrm
              Prophet
              • Apr 2008
              • 2987

              #7
              This is clearly a bug with PDCurses, as someone else reported the same problem on pdcurses's sourceforge bug tracker.

              Today I've tried something really challenging... recompiling the GCU client using NCURSES... under Windows! With the latest 5.9 version, there is a Windows build that can be compiled using minGW. Unfortunately I don't have my source code configured for minGW, so I had to configure ncurses using minGW to get the headers and defines, plug the resulting ncurses source code into my BCC project, fix the few compile errors due to not having minGW headers (sys/time.h and such) and then adapt main-gcu. But it works!

              The only problem here, as stated in the ncurses readme file, is that ncurses 5.9 has no widechar support when compiled under Windows. This means no fancy walls...
              PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

              Comment

              • Nick
                Vanilla maintainer
                • Apr 2007
                • 9647

                #8
                Cool. Now we can play in terminals on every platform and ditch all that funky platform specific code
                One for the Dark Lord on his dark throne
                In the Land of Mordor where the Shadows lie.

                Comment

                • d_m
                  Angband Devteam member
                  • Aug 2008
                  • 1517

                  #9
                  Originally posted by Nick
                  Cool. Now we can play in terminals on every platform and ditch all that funky platform specific code
                  You said it!
                  linux->xterm->screen->pmacs

                  Comment

                  • PowerWyrm
                    Prophet
                    • Apr 2008
                    • 2987

                    #10
                    Originally posted by PowerWyrm
                    The only problem here, as stated in the ncurses readme file, is that ncurses 5.9 has no widechar support when compiled under Windows. This means no fancy walls...
                    Alright... I've regenerated the minGW configuration using --enable-widec to add w_char support (mvwaddnwstr and co.). Now it's time to see if I can plug the fancy walls back...
                    PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

                    Comment

                    • PowerWyrm
                      Prophet
                      • Apr 2008
                      • 2987

                      #11
                      Good news: it compiles with widechar support
                      Bad news:
                      Attached Files
                      PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

                      Comment

                      • Magnate
                        Angband Devteam member
                        • May 2007
                        • 5110

                        #12
                        Well, they're certainly wide characters. Result!
                        "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                        Comment

                        • PowerWyrm
                          Prophet
                          • Apr 2008
                          • 2987

                          #13
                          Update on using NCurses/minGW for the GCU port under Windows: as of latest release (ftp://invisible-island.net/ncurses/c...9-20121013.tgz), not only it compiles, but this time it actually displays something!
                          Attached Files
                          PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

                          Comment

                          • Nick
                            Vanilla maintainer
                            • Apr 2007
                            • 9647

                            #14
                            Originally posted by PowerWyrm
                            Update on using NCurses/minGW for the GCU port under Windows: as of latest release (ftp://invisible-island.net/ncurses/c...9-20121013.tgz), not only it compiles, but this time it actually displays something!
                            Niiiiiiice!
                            One for the Dark Lord on his dark throne
                            In the Land of Mordor where the Shadows lie.

                            Comment

                            Working...
                            😀
                            😂
                            🥰
                            😘
                            🤢
                            😎
                            😞
                            😡
                            👍
                            👎