NCurses

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • aricz
    Rookie
    • Apr 2007
    • 22

    NCurses

    Hello.

    1. Do anyone here play V angband or any of its variants using NCurses?

    If 'YES' then why do I keep getting problems playing roguelikes in console (alt+ctrl+F1-F6)

    The colors are messed up. Take a look at this:

    Color 0: 'BLACK' .. correct color
    Color 1: 'WHITE .. It's white, but not bright white
    Color 2: 'SLATE' .. same as 'Color 1'
    Color 3: 'ORANGE' .. not sure if this color is red or orange
    Color 4: 'RED' .. same as 'Color 3'
    Color 5: 'GREEN' .. correct color
    Color 6: 'BLUE' .. correct color
    Color 7: 'UMBER' .. same as 'Color 3'
    Color 8: 'LIGHT DARK' .. same as 'Color 0'
    Color 9: 'LIGHT SLATE' .. same as 'Color 1'
    Color 10: 'VIOLET' .. correct color
    Color 11: 'YELLOW' .. this color is not yellow, it goes towards red.. ORANGE
    Color 12: 'LIGHT RED' .. same as 'Color 10'
    Color 13: 'LIGHT GREEN' .. same as 'Color 5'
    Color 14: 'LIGHT BLUE' .. same as 'Color 6'
    Color 15: 'LIGHT UMBER' .. same as 'Color 3'

    Ok, maybe not so easy to read this. But:

    Color 0 and color 8 are BLACK
    Color 1, color 2 and color 9 are WHITE
    Color 3, color 4, color 7 and color 15 are RED/ORANGE
    Color 5 and color 13 are GREEN
    Color 6 and color 14 are BLUE
    Color 10 and color 12 are VIOLET
    Color 11 is ORANGE, where it should be YELLOW

    By the way, I can't change the colors within the game with '%'.

    Using Ubuntu 6.10

    Anyone aware of this problem? Or am I the only one trying to play v angband, zangband and tome in console using ncurses? Or.... am I the only one having problems playing in console using ncurses. I'm of course not talking about running in virtual console in X here. Clean and pure textmode console. Hoping for happy answers.
  • CJNyfalt
    Swordsman
    • May 2007
    • 289

    #2
    The colors in ncurses are limited to bright and normal versions of white, black, red, green, blue, yellow, magenta and cyan.

    However from your post it seems that the difference between the bright and normal versions doesn't show. It seems that I also have the same problem in Ubuntu 7.04, with bright colors working in x-term but not in console.

    Comment

    • aricz
      Rookie
      • Apr 2007
      • 22

      #3
      Exactly. So is this something the maintainers aren't aware of? Or they just don't care about it?

      I know there's a hack out there made for V Angband using NCurses (I think they modified the 'main-gcu.c' file. v2.8 something, said to work with earlier and future versions of angband. Well, I did not manage to compile 3.0.6 or the newest version of angband using the "new" hacked 'main-gcu.c'. Have anyone tried this? Anyone know what I'm talking about? Anyone had the same problem?

      And the keyboard. Using the keypad. Shift-running. None of them works. Yep, it works out when 'loadkeys newkeymap' and put new values in pref-gcu.prf. Why isn't this implemented in the linux-distro of angband? And the ESC-key with the 1sec delay. Yep, I know we can use '`' instead, it works like the ESC-key without delay. But uhm, why does it have to be like this?

      Hope it wasn't too much whining. I know the maintainers are doing this for free. *Bows deeply* Just wondering why the linuxversion using NCurses is neglected (Is that the correct word? )

      Thank you. Bom!

      Comment

      • pav
        Administrator
        • Apr 2007
        • 793

        #4
        Escape delay can't be worked around in the game, it's "feature" of the console itself. It allows you to enter special key codes, if for some reason you don't have working special keys. Like, ESC 0 = F10 ...
        See the elves and everything! http://angband.oook.cz

        Comment

        • takkaria
          Veteran
          • Apr 2007
          • 1951

          #5
          Originally posted by aricz
          Exactly. So is this something the maintainers aren't aware of? Or they just don't care about it?

          I know there's a hack out there made for V Angband using NCurses (I think they modified the 'main-gcu.c' file. v2.8 something, said to work with earlier and future versions of angband. Well, I did not manage to compile 3.0.6 or the newest version of angband using the "new" hacked 'main-gcu.c'. Have anyone tried this? Anyone know what I'm talking about? Anyone had the same problem?
          I use the NCurses port all the time; there haven't been any hacks to be able use it for quite a while--you just need to define USE_NCURSES (as you almost certainly do already).

          Testing on my virtual install of Debian Etch, playing in console looks fine. There's nothing I can do about this--it seems Ubuntu-specific, and you want to go find someone in the Ubuntu world to complain at, not me.

          And the keyboard. Using the keypad. Shift-running. None of them works. Yep, it works out when 'loadkeys newkeymap' and put new values in pref-gcu.prf. Why isn't this implemented in the linux-distro of angband? And the ESC-key with the 1sec delay. Yep, I know we can use '`' instead, it works like the ESC-key without delay. But uhm, why does it have to be like this?
          Again, nothing to do with us. Just use the backtick as escape; I've got completely used to it. Other than that, I don't know what you mean by "loadkeys newkeymap", but (I imagine) the reason the curses port isn't supplied with any useful macros is because key values differ between computers, making any made on one computer either useless or erroneous on another.
          takkaria whispers something about options. -more-

          Comment

          • Nick
            Vanilla maintainer
            • Apr 2007
            • 9630

            #6
            Originally posted by takkaria
            Testing on my virtual install of Debian Etch, playing in console looks fine. There's nothing I can do about this--it seems Ubuntu-specific, and you want to go find someone in the Ubuntu world to complain at, not me.
            I'm using Kubuntu Feisty, and the colours are all distinct for me. Some of them do seem slightly unusual (grey is slightly blue, for example).
            One for the Dark Lord on his dark throne
            In the Land of Mordor where the Shadows lie.

            Comment

            • aricz
              Rookie
              • Apr 2007
              • 22

              #7
              Someone told me the way Angband tries to change the colors with NCurses is buggy. I don't remember where I read it, but, since you actually get the correct colors using NCurses in REAL textmode in console (not X), this is getting more and more weird. I talked to someone in #angband yesterday and he told me the same as you, had non problemo with colors using NCurses. All he had to do was to load a new keymap so his keypad and shift-<direction> would work out.

              Guess I have to go with Debian Etch instead..

              Comment

              • GSN
                Rookie
                • Apr 2007
                • 21

                #8
                What is your $TERM value? Looks like your terminal entry only supports 8 colors or bright colors are switched off (this is a known feature with some background programs like dynafont that allow you to get 512 different characters on the screen at the same time at the expense of bright colors).

                Instead of Esc, you can press ` with the same result.

                Comment

                • aricz
                  Rookie
                  • Apr 2007
                  • 22

                  #9
                  Originally posted by GSN
                  What is your $TERM value? Looks like your terminal entry only supports 8 colors or bright colors are switched off (this is a known feature with some background programs like dynafont that allow you to get 512 different characters on the screen at the same time at the expense of bright colors).

                  Instead of Esc, you can press ` with the same result.
                  Hmmmm, perhaps that's the problem. I have:

                  TERM = "linux"

                  I'm a newbie to the world of linux, so help would be appreciated

                  Comment

                  • aricz
                    Rookie
                    • Apr 2007
                    • 22

                    #10
                    Thanks GSN (and to everyone who wasted time on this thread), what you said made me find the solution. 'Consolechars' .. I just loaded a new screenfont and uhm.. tada, everything worked nicely.

                    Sorry for the whining *shame shame*

                    Now, at last! Playing the new version of V Angband in console.. ahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh!!

                    Comment

                    • Kav
                      Scout
                      • Jun 2007
                      • 39

                      #11
                      Originally posted by aricz
                      Thanks GSN (and to everyone who wasted time on this thread), what you said made me find the solution. 'Consolechars' .. I just loaded a new screenfont and uhm.. tada, everything worked nicely.

                      Sorry for the whining *shame shame*

                      Now, at last! Playing the new version of V Angband in console.. ahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh!!
                      So for us noobs what does that mean? Was I the only one that didn't find 'Consolechars' self explanatory? How do I fix it? I wanna play via a ssh session without fracked colors too!

                      Comment

                      • takkaria
                        Veteran
                        • Apr 2007
                        • 1951

                        #12
                        Originally posted by Kav
                        So for us noobs what does that mean? Was I the only one that didn't find 'Consolechars' self explanatory? How do I fix it? I wanna play via a ssh session without fracked colors too!
                        I have no idea, because I don't experience that problem. However, I don't think that playing via SSH would mess up the colours in the same way--are you sure this is the same problem? Could you take a screenshot of your SSH session?
                        takkaria whispers something about options. -more-

                        Comment

                        • CJNyfalt
                          Swordsman
                          • May 2007
                          • 289

                          #13
                          Well, to my understanding it's a font problem, and that the consolechars program can change that font to something else. However, I don't don't know which font to change to, since I haven't taken time to research that.

                          Comment

                          • aricz
                            Rookie
                            • Apr 2007
                            • 22

                            #14
                            Ok. I'm a newbie, so not sure how this will work under other distros. I use Ubuntu 6.10.

                            From virtual console (ctrl+alt+F1-F6)

                            'consolechars -f /usr/share/consolefonts/Lat15-Fixed16.psf'

                            This command should load new fonts. Try others in /usr/share/consolefonts/ to find others which might work better for you.

                            Now as the fonts are fixed (and hopefully most of the colors are pretty much correct) go grab the source from Gumband. Extract gumbandsource, then extract linux_fix.tar.gz.

                            From the extracted linux_fix.tar.gz read the faq.txt and follow instructions. Or just get into the directory where linux-c-nc.terminfo is and type:

                            'sudo tic linux-c-nc.terminfo'
                            'TERM=linux-c-nc'

                            Colors should be correct now (same as in DOS).
                            Last edited by aricz; June 12, 2007, 14:32.

                            Comment

                            • Kav
                              Scout
                              • Jun 2007
                              • 39

                              #15



                              Now are these discolorations due to aricz's ncurses improper color processing fix, or is this just a difference I'm going to see going from x11 to the console no matter what and I should stop complaining?

                              Comment

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