More colors in linux

G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Hi,

I just started using Mepis Linux (a version of Debian), and I've
noticed that I don't get as many colors as I did when I used to run
Nethack in XP. Doors, jackals and boxes are all exactly the same
color. Does anyone know how to get the full color set (I guess it
would be 256)?

Thanks,

--C

PS - Nethack is the best game ever.
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack,misc.misc (More info?)

Dylan O'Donnell wrote:

> Tiles can be up to 256 colours, though the default
> provided are sixteen-colour.

The situation is more complex than that.

Tiles that fit in the NetHack build script scheme of
"being ASCII encoded" <=> "being an image file" are
limited to the range of characters used by NetHack
in the ASCII encoded form to represent colors, which
IIRC is 16.

Tiles in general (at least in the MS-Windows
version, and Microsoft's "bitmap" format) can use
the full gamut of 24 bit color, as does the Absurd
Tile Set I use currently, they just won't work in
the encoding ring that NetHack provides forth and
back between images and ASCII representations. Thus,
more colorful tiles have to be created directly with
image drawing software, rather than built up as
ASCII and then compiled into images.

Of course, the datum that I'm using 3 byte deep
pixels might also explain why my antique WinOS98SE
won't support tiles at 64x64, but only at 56x56;
that 24 bit deep tile set consumes triple the
storage requirement of 256 color tiles.

If some ambitious person is looking for a
software project, putting into NetHack the
ability to convert tiles between 24 bit color
and Jef Pokanzer's long enduring text
representation modes for graphics (whose acronym
escapes me at the moment), might be a useful
addition, since the text forms of the tiles
could then be "compiled" to and from the various
image formats used by the different NetHack
environments, making stuff like the Absurd Tile
Set available on more platforms for NetHack.

Notice that this isn't a "do from scratch"
proposed project, such conversion software is
widely available, it is more of an "integrate
into" project.

Not that more colorful tile sets can't be
converted readily enough from format to format
by image manipulation software, but still, Jef's
pass through text encodings seems to have the
widest range of source and target image formats
available, and using it would make the
conversion process something doable in batch
mode under control of a makefile.

FYI

xanthian.
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

"coldsalmon" <dudefaceguy@hotmail.com> writes:
> I just started using Mepis Linux (a version of Debian), and I've
> noticed that I don't get as many colors as I did when I used to run
> Nethack in XP. Doors, jackals and boxes are all exactly the same
> color. Does anyone know how to get the full color set (I guess it
> would be 256)?

I don't know what interface you were using on XP, but doors, jackals,
and boxes _are_ all the same colour in the tty interface:

{'-', "open door", C(CLR_BROWN)}, /* vodoor */
{'|', "open door", C(CLR_BROWN)}, /* hodoor */
{'+', "closed door", C(CLR_BROWN)}, /* vcdoor */
{'+', "closed door", C(CLR_BROWN)}, /* hcdoor */

MON("jackal", S_DOG,
LVL(0, 12, 7, 0, 0), (G_GENO|G_SGROUP|3),
A(ATTK(AT_BITE, AD_PHYS, 1, 2),
NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK),
SIZ(300, 250, 0, MS_BARK, MZ_SMALL), 0, 0,
M1_ANIMAL|M1_NOHANDS|M1_CARNIVORE, M2_HOSTILE, M3_INFRAVISIBLE,
CLR_BROWN),

CONTAINER("large box", (char *)0, 1, 0, 0, 40,350, 8, WOOD, HI_WOOD),
CONTAINER("chest", (char *)0, 1, 0, 0, 35,600, 16, WOOD, HI_WOOD),

#define HI_WOOD CLR_BROWN

tty NH only uses sixteen colours, as does the non-tiled X interface.
Tiles can be up to 256 colours, though the default provided are
sixteen-colour.

--
: Dylan O'Donnell http://www.spod-central.org/~psmith/ :
: "Nothing matters very much, and few things matter at all." :
: -- A.J. Balfour :
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

coldsalmon wrote:
> I just started using Mepis Linux (a version of Debian),
Moved in from Windows? Great!

> I've noticed that I don't get as many colors as I did when I used to
> run Nethack in XP. Doors, jackals and boxes are all exactly the same
> color. Does anyone know how to get the full color set (I guess it
> would be 256)?
Not really, Windows console doesn't support more than 16 colours. The
API doesn't even have a way to set them:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/char_info_str.asp

I checked this on an XP machine, and:
* door: #808000
* kobold: #808000
* kobold zombie:#808000
* jackal: #808000
Using the nethackw.exe binary:
* door: #a52a2a
* kobold zombie:#a52a2a
* bow: #a52a2a
* food ration: #a52a2a

In other words, the brown colour is always the same.



However, in some way, you _are_ right. You are missing a colour, dark
gray to be exact. It's the colour of orcish daggers, Stormbringer,
uruk-hai, etc. It is disabled due to a limitation of some rare
terminals that will render it as black-on-black.

Several people tried working around this limitation. Being the lazy
bastard I am, I didn't bother searching for their work and just hacked
the problem around. You may get my patch
(http://nethack.angband.pl/colorblack.patch), it will hard-code the fix.
Unless you're going to play from a RedHat text console or from the
xterm shipped with a very, very old version of PLD, you'll be ok --
these are the only terminals I know that don't support the colour in
question.

To compile NetHack with patches on a Debian system:
# apt-get build-dep nethack
$ apt-get source nethack
$ wget http://nethack.angband.pl/colorblack.patch
$ cd nethack-3.4.3
$ patch -p1 <../colorblack.patch
$ debian/rules build

The compilation will take ages unless you edit out all the 5689458348
tiled versions from the targets defined in debian/rules.
After the above, you'll end up with NetHack compiled in your own dir,
but not properly installed. To do this:

$ dch -i
(to mark the version. For best effects, it's a good idea to mark it as
a private build, like: 3.4.3-6kb1. In the "changes" field, it's good to
list the patches you have applied -- just as a note if you happen to
forget this in the future)
$ fakeroot debian/rules binary
(the "official" way to invoke "debian/rules build" and "fakeroot
debian/rules binary" is through dpkg-buildpackage -- this will save you
over 20 keystrokes)
# dpkg -i nethack-{console,common}_3.4.3-6kb1_i386.deb
(or whatever the packages you have just built are named)

The result: you now have nice, shiny, distribuable .debs and you've made
dpkg's database happy.


> PS - Nethack is the best game ever.
Hell yeah!

1KB
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

coldsalmon wrote:
> I just started using Mepis Linux (a version of Debian), and I've
> noticed that I don't get as many colors as I did when I used to run
> Nethack in XP. Doors, jackals and boxes are all exactly the same
> color. Does anyone know how to get the full color set (I guess it
> would be 256)?

Is it possible they are the same color in XP but only look different b/c
of the different shapes? Either that or you're using tiles and it gets
even more confusing :-D

--LWM
 

Chuck

Distinguished
Nov 19, 2001
1,479
0
19,280
Archived from groups: rec.games.roguelike.nethack (More info?)

"coldsalmon" <dudefaceguy@hotmail.com> wrote in
news:1111555051.044980.124170@o13g2000cwo.googlegroups.com:

> Hi,
>
> I just started using Mepis Linux (a version of Debian), and I've
> noticed that I don't get as many colors as I did when I used to run
> Nethack in XP. Doors, jackals and boxes are all exactly the same
> color. Does anyone know how to get the full color set (I guess it
> would be 256)?
>
> Thanks,
>
> --C
>
> PS - Nethack is the best game ever.
>
>
I assume you are talking about the "ansi" nethack. If so, there are only 16
available to be used. if You're talking gnome nethack I would check your
xf86config file to make sure you aren't using 16 colours instead of 256 or
higher


--
lisp LIVES!!!
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

My mistake!! The colors are just different, brown is much lighter in
XP, so I thought I was losing some color. Sorry about that, but thanks
for being so supportive! BTW, have you guys ever used DeeT's Linux
Nethack fonts?

http://dt.prohosting.com/hacks/nethack.html

If so, what do you guys think?

--C