Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old August 16, 2009, 05:28   #1
d_m
Angband Devteam member
 
d_m's Avatar
 
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 39
Posts: 1,516
d_m is on a distinguished road
improved GCU code in HEAD

I just checked in some changes that I hope will make playing Angband in GCU (ncurses) even better than it already is! I mostly play Angband this way, although I'm not sure how many other people do anymore.

Here are the changes. If anyone either notices problems linked to them, or has other issues, please let me know.

1. On some terminals (gnome-terminal for instance) recent builds end up drawing the background not as black but as a dark-grey, which is disconcertingly bright. In the process of fixing this, I had Angband start using the default-bg provided by ncurses. This will make things like transparency or non-ANSI colored terminals work, rather than drawing black (or dark grey, or whatever).

2. I fixed an obscure autoconf error which meant that terminals with color-changing capabilities would never actually get to do their thing. Probably no one will notice this.

3. I made it so that on terminals supporting 256 colors (e.g. xterm-256color) you get the same range of colors as in the other ports. I have found this to be really nice.

Anyway, I'm interested in feedback on this. Arguably #1 is sub-optimal, since people can choose dumb terminal background colors; I am (perhaps wrongly) assuming that getting things working properly in gnome-terminal, etc. is more important than supporting this.
__________________
linux->xterm->screen->pmacs
d_m is offline   Reply With Quote
Old August 16, 2009, 05:49   #2
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 55
Posts: 8,338
Donated: $60
Nick will become famous soon enough
Nice - this has gone straight into FA.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old August 16, 2009, 15:46   #3
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,057
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by d_m View Post
I just checked in some changes that I hope will make playing Angband in GCU (ncurses) even better than it already is! I mostly play Angband this way, although I'm not sure how many other people do anymore.
...
Anyway, I'm interested in feedback on this.
I use -mgcu a lot, primarily over ssh (because I haven't yet learned how to set up x11 forwarding!). Many thanks for your work on this - your #1 I had noticed before, and I think I had also noticed the colours thing.

But my biggest two issues with -mgcu are both difficult to reproduce:

1. The numpad keys get messed up sometimes (I think this is specifically related to PuTTY - ticket #796)

2. The solid wall characters sometimes revert to #s and %s. I think this is locale-related, but I'm not sure. Sometimes I go to "interact with visuals" and find there are no ascii graphic characters at all, only numbers and letters and the basic punctuation symbols.

If you have any knowledge about either of these I'd be grateful for advice.
Magnate is offline   Reply With Quote
Old August 16, 2009, 16:06   #4
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 5,737
Donated: $40
Pete Mack is on a distinguished road
Quote:
Originally Posted by Magnate View Post
I use -mgcu a lot, primarily over ssh (because I haven't yet learned how to set up x11 forwarding!).
ssh -Y doesn't work?
Pete Mack is offline   Reply With Quote
Old August 16, 2009, 16:19   #5
d_m
Angband Devteam member
 
d_m's Avatar
 
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 39
Posts: 1,516
d_m is on a distinguished road
Quote:
Originally Posted by Magnate View Post
1. The numpad keys get messed up sometimes (I think this is specifically related to PuTTY - ticket #796)
I'm going to investigate this... I bet it has to do with calling (or failing to call) the keypad() function, or something else strange. Unfortunately I don't have a Windows machine to test with. I'll see if I can reproduce this with PuTTY on Linux; if not I may be sending some patches your way.

Quote:
Originally Posted by Magnate View Post
2. The solid wall characters sometimes revert to #s and %s. I think this is locale-related, but I'm not sure. Sometimes I go to "interact with visuals" and find there are no ascii graphic characters at all, only numbers and letters and the basic punctuation symbols.
I'm not really familiar with the "interact with visuals" so you'll have to be more specific about what you're doing. That said, my guess is that this issue has to do with what the value of $TERM is (and by extension, the values in the termino/termcap database on the host you're playing Angband on). I think the graphics come from the ACS (alternate-character set) which xterm and many other terminals define.

I'm attaching a pretty useful C program to inspect what curses believes about your terminal. You can compile it with "gcc -lncurses -o tty-colors tty-colors.c"
Attached Files
File Type: txt tty-colors.c.txt (10.5 KB, 343 views)
__________________
linux->xterm->screen->pmacs
d_m is offline   Reply With Quote
Old August 16, 2009, 20:39   #6
david3x3x3
Scout
 
Join Date: Jun 2009
Posts: 28
david3x3x3 is on a distinguished road
I just tried out this version. This has the same problem for me that all of the 3.1.1 versions have had. It could be a problem with my PC configuration. I run the xterm-242-3.fc11.i586 package on Fedora 11. Every time I run Angband within an Xterm window, all of the wall characters are invisible. I prefer playing Angband with # signs for the wall characters rather than solid blocks. I haven't figured out the -mx11 flag to get # signs, either.
david3x3x3 is offline   Reply With Quote
Old August 16, 2009, 21:12   #7
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 5,737
Donated: $40
Pete Mack is on a distinguished road
You can always override the default (borked) prefs with your own.
In the "features" knowledge menu, "interact with visuals", and set the value to what you want. Then save your prefs.
But that's a lot of work, for so many features.

Alternatively, edit font-x11.prf, and delete all the overrides for granite and permanent walls.
Pete Mack is offline   Reply With Quote
Old August 17, 2009, 03:33   #8
d_m
Angband Devteam member
 
d_m's Avatar
 
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 39
Posts: 1,516
d_m is on a distinguished road
Quote:
Originally Posted by david3x3x3 View Post
I just tried out this version. This has the same problem for me that all of the 3.1.1 versions have had. It could be a problem with my PC configuration. I run the xterm-242-3.fc11.i586 package on Fedora 11. Every time I run Angband within an Xterm window, all of the wall characters are invisible. I prefer playing Angband with # signs for the wall characters rather than solid blocks. I haven't figured out the -mx11 flag to get # signs, either.
Please give me the output of:

Code:
infocmp
Are you running from within screen? Over SSH? If I were you, I'd try different TERM types (vt100, xterm, xterm-256color, vt220, etc) to see the different effects. E.g. "TERM=xterm angband -mgcu"

At this point, I think making some subopts to control GCU graphics (e.g. whether or not to use the ACS) would be good. I have definitely seen issues with the ACS in certain UTF-8 terminals, as well as in misconfigured environments.
__________________
linux->xterm->screen->pmacs
d_m is offline   Reply With Quote
Old August 17, 2009, 04:29   #9
d_m
Angband Devteam member
 
d_m's Avatar
 
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 39
Posts: 1,516
d_m is on a distinguished road
Quote:
Originally Posted by d_m View Post
At this point, I think making some subopts to control GCU graphics (e.g. whether or not to use the ACS) would be good. I have definitely seen issues with the ACS in certain UTF-8 terminals, as well as in misconfigured environments.
Well, I've already taken my own advice.

If you play SVN HEAD, as of r1628 you should see two new subopts. -a(scii) does not use the fancy ACS graphic characters, so it will give you old-style # walls. -g(raphics) is the default behavior currently, which mostly means the solid walls using the ACS_CKBOARD character.

While there is an argument (I guess) that manually editing the tiles supersedes this, many terminals don't correctly advertise their capabilities--in those cases, being able to say "this terminal doesn't actually have ACS graphics so don't use them" is nicer than expecting the user to create a custom termcap file, or custom Angband graphics.
__________________
linux->xterm->screen->pmacs
d_m is offline   Reply With Quote
Old August 17, 2009, 05:14   #10
david3x3x3
Scout
 
Join Date: Jun 2009
Posts: 28
david3x3x3 is on a distinguished road
Quote:
Originally Posted by d_m View Post
Please give me the output of:

Code:
infocmp
Code:
#       Reconstructed via infocmp from file: /usr/share/terminfo/x/xterm
xterm|xterm terminal emulator (X Window System),
        am, bce, km, mc5i, mir, msgr, npc, xenl,
        colors#8, cols#80, it#8, lines#24, pairs#64,
        acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
        clear=\E[H\E[2J, cnorm=\E[?12l\E[?25h, cr=^M,
        csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
        cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
        cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
        cvvis=\E[?12;25h, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM,
        dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K,
        flash=\E[?5h$<100/>\E[?5l, home=\E[H, hpa=\E[%i%p1%dG,
        ht=^I, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L,
        ind=^J, indn=\E[%p1%dS, invis=\E[8m,
        is2=\E[!p\E[?3;4l\E[4l\E>, kDC=\E[3;2~, kEND=\E[1;2F,
        kHOM=\E[1;2H, kIC=\E[2;2~, kLFT=\E[1;2D, kNXT=\E[6;2~,
        kPRV=\E[5;2~, kRIT=\E[1;2C, kb2=\EOE, kbs=\177, kcbt=\E[Z,
        kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
        kdch1=\E[3~, kend=\EOF, kent=\EOM, kf1=\EOP, kf10=\E[21~,
        kf11=\E[23~, kf12=\E[24~, kf13=\E[1;2P, kf14=\E[1;2Q,
        kf15=\E[1;2R, kf16=\E[1;2S, kf17=\E[15;2~, kf18=\E[17;2~,
        kf19=\E[18;2~, kf2=\EOQ, kf20=\E[19;2~, kf21=\E[20;2~,
        kf22=\E[21;2~, kf23=\E[23;2~, kf24=\E[24;2~,
        kf25=\E[1;5P, kf26=\E[1;5Q, kf27=\E[1;5R, kf28=\E[1;5S,
        kf29=\E[15;5~, kf3=\EOR, kf30=\E[17;5~, kf31=\E[18;5~,
        kf32=\E[19;5~, kf33=\E[20;5~, kf34=\E[21;5~,
        kf35=\E[23;5~, kf36=\E[24;5~, kf37=\E[1;6P, kf38=\E[1;6Q,
        kf39=\E[1;6R, kf4=\EOS, kf40=\E[1;6S, kf41=\E[15;6~,
        kf42=\E[17;6~, kf43=\E[18;6~, kf44=\E[19;6~,
        kf45=\E[20;6~, kf46=\E[21;6~, kf47=\E[23;6~,
        kf48=\E[24;6~, kf49=\E[1;3P, kf5=\E[15~, kf50=\E[1;3Q,
        kf51=\E[1;3R, kf52=\E[1;3S, kf53=\E[15;3~, kf54=\E[17;3~,
        kf55=\E[18;3~, kf56=\E[19;3~, kf57=\E[20;3~,
        kf58=\E[21;3~, kf59=\E[23;3~, kf6=\E[17~, kf60=\E[24;3~,
        kf61=\E[1;4P, kf62=\E[1;4Q, kf63=\E[1;4R, kf7=\E[18~,
        kf8=\E[19~, kf9=\E[20~, khome=\EOH, kich1=\E[2~,
        kind=\E[1;2B, kmous=\E[M, knp=\E[6~, kpp=\E[5~,
        kri=\E[1;2A, mc0=\E[i, mc4=\E[4i, mc5=\E[5i, meml=\El,
        memu=\Em, op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM,
        rin=\E[%p1%dT, rmacs=\E(B, rmam=\E[?7l, rmcup=\E[?1049l,
        rmir=\E[4l, rmkx=\E[?1l\E>, rmm=\E[?1034l, rmso=\E[27m,
        rmul=\E[24m, rs1=\Ec, rs2=\E[!p\E[?3;4l\E[4l\E>, sc=\E7,
        setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
        setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
        setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
        sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m,
        sgr0=\E(B\E[m, smacs=\E(0, smam=\E[?7h, smcup=\E[?1049h,
        smir=\E[4h, smkx=\E[?1h\E=, smm=\E[?1034h, smso=\E[7m,
        smul=\E[4m, tbc=\E[3g, u6=\E[%i%d;%dR, u7=\E[6n,
        u8=\E[?1;2c, u9=\E[c, vpa=\E[%i%p1%dd,
Quote:
Are you running from within screen? Over SSH?
No.

I'll try out the new option that you added.
david3x3x3 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
targeting differences between 3.0.9b and HEAD d_m Vanilla 4 December 21, 2008 22:22
DaJAngband -I'm in over my head will_asher Idle chatter 15 February 27, 2008 09:04
Looking through the code K.I.L.E.R Vanilla 5 July 11, 2007 08:01
The safe_setuid code CJNyfalt Vanilla 11 June 26, 2007 03:25
[ALL variants] Getting main-gcu to handle resizes. CJNyfalt Vanilla 5 May 27, 2007 13:47


All times are GMT +1. The time now is 03:31.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.