Angband Forums

Angband Forums (
-   Development (
-   -   Experimental webserver (

Gwarl June 12, 2017 12:52

I've been looking at colours and I need some help.

I can set the colours on the terminal emulator by passing in an array of hex strings when initialising it. There are two default colour sets, calling themselves tangoColors and xtermColors. The problem is, what angband thinks is light red, the ordering of colours in the terminal emulator clearly intends to be magenta.

To be specific, the colour R in angband terms is seen as colour 13 in the colors array (counting from black=0). If R -> 13 is meaningful to angband in any way and I could determine the mapping of letters to ints I could explicitly set all 28 colours. If not I'll have to look into it more deeply.

Gwarl June 12, 2017 13:25

Okay, z-color.h was what I was looking for. I'll get to work.

Edit: I think the odd colours may actually be angband's fault. I found this in main-gcu.c line 982:


                colortable[COLOUR_L_RED]    = (COLOR_PAIR(PAIR_MAGENTA) | A_BRIGHT);
Okay yeah angband thinks we have 8 colors available so it's trying to work with them. If I can tell the terminal emulator to pretend it's a 256 color terminal not an 8 color terminal we should be okay.

Triple edit: No I'm hopelessly confused now. We're defining 8 color pairs, and mapping each of our 28 colours to a colour paired with black. Why?

Final edit: I think we should have decent color support now :)

Encore edit: Bear with me

Okay I think colors are fixed. shift-running in PCB is still impossible for now but I'm looking into it.

MITZE June 12, 2017 21:54

Webserver works!
Just had a nice afternoon playing PosCheng while chatting with Gwarl--the webserver works!

debo June 13, 2017 03:02

Did the server move away from, or is nodejs just dead or something? I'm getting 502s from nginx.

Gwarl June 13, 2017 11:19


Originally Posted by debo (Post 121697)
Did the server move away from, or is nodejs just dead or something? I'm getting 502s from nginx.

nodejs server died. Sorry. Back now.

wobbly June 13, 2017 16:08

Played poschengband a little & had a few issues. The chat window is covering my hps in the display. When I go to change pickup/destroy settings (_), down arrow registers as 2, and Ctrl-W (save & quit) closes my browser window (in firefox).

Gwarl June 13, 2017 16:27

Okay, I can fix things to adapt based on screen resolution. (Guessing the problem there is having fewer pixels across than me).

The numpad/directional key stuff is not easy but I'm working on it. Ultimately I might have to patch PCB with bits lifted from V.

I'm not sure if I can suppress all of the browser shortcuts, but isn't it ctrl+X to save&quit?

wobbly June 13, 2017 16:31

Ctrl-X saves the game (and works perfectly fine). Ctrl-W saves & quits the mognomitor or whatever the pickup/squelch thing is called(The thing you get to pressing _). I've found a work around for now but it's quite awkward.

To clarify I can use the arrows in-game by turning on numlock. However I can't do that in the mog-what-ever you call it.

Gwarl June 13, 2017 16:37

Okay if the mogaminator is the issue there I think I can get as far as letting people edit their .prf files in the browser seperately before very long. Control/escape sequence handling will take longer.

MITZE June 13, 2017 18:01

Server's borked again!
Title says it all.

All times are GMT +1. The time now is 08:54.

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