angband-webclient icon indicating copy to clipboard operation
angband-webclient copied to clipboard

Angband (version: nightly) custom background color only affects letter backgrounds in angband.live subwindows

Open smbhax opened this issue 4 years ago • 6 comments

Angband (version: nightly) (currently at 4.2.3-129) has a built-in color editor. If you edit the game's background color, your custom background color affects angband.live's optional subwindow displays, but only in areas around or enclosed by letters--the open background areas of the subwindows remain black.

  • On angband.live, start a game session in Angband (nightly version), with "subwindow right cols," "subwindow right split," and "subwindow bottom rows" numbers to create those subwindow areas (I use 40, 30, 8 for them, respectively, with Droid Sans Mono size 20 font on my 1080p display)
  • Once in a dungeon, press = for Options
  • Press w for "Subwindow setup"
  • Set something in your three subwindows (I have Term-1 monster recall, object recall, Term-2 monster list, Term-3 messages)
  • ESC back to the dungeon display and move around/fight until the subwindows are populated with letters
  • Press = for Options
  • Press c for "Edit colours (advanced)"
  • Press c for "Modify colors"
  • Press Shift+r ("R") to change the background color to red --> The background of the main game display is red, but in the subwindows, only the blocks around or enclosed by letters are red--the wider background areas remain black angl_colors

I noticed this after messing with it in angband.live due to it coming up as a player request on the forum: http://angband.oook.cz/forum/showpost.php?p=154693&postcount=12

smbhax avatar Dec 08 '21 19:12 smbhax

Come to think of it, I think this is an Angband issue, not an issue with the angband.live web service. I'm moving the issue to the Angband git: https://github.com/angband/angband/issues/5174

smbhax avatar Dec 09 '21 00:12 smbhax

Re-opening here; Angband dev backwardsEric said of it in https://github.com/angband/angband/issues/5174#issuecomment-989366325 that

I'm not able to reproduce this with the standalone game running the GCU front end: there the background color fills each subwindow, with a one character wide black bar separating the subwindows. Perhaps the change to Angband's GCU front end, https://github.com/angband/angband/commit/f9a714934e988873909f9b892ad3fb5445b9405d#diff-c4c05d8f78104b190eb5a934834b8f836e1ab4e51885217c0ff76cc30dcb9bc5 , wasn't included in the nightly version of Angband on angband.live, or it's something else particular to how angband.live converts the output from the GCU front end to what's displayed through a web browser.

smbhax avatar Dec 09 '21 01:12 smbhax

Basically we just have a premade terminal library which captures inputs and renders outputs. Debugging rendering issues like this is largely beyond the scope of the project.

OwenGHB avatar Dec 13 '21 11:12 OwenGHB

I've quoted your comment in the angband/angband project issue; a later comment there by Nick was "I don't know what the problem is - unless Gwarl's done some special thing"--it sounds like you haven't.

smbhax avatar Dec 13 '21 17:12 smbhax

this is actually related to #51

peterdresslar avatar Dec 13 '21 21:12 peterdresslar

this is actually related to #51

Yeah, regarding the term vs xterm question, on the mirror issue for this present issue in the angband/angband git, backwardsEric just wrote https://github.com/angband/angband/issues/5174#issuecomment-992843505

I tried to look at the term.js dependency for angband.live. The one directly listed by GitHub has a readme saying it's unmaintained, and I couldn't tell from the code how it was implementing the xterm compatibility (though that is likely just me since I don't know anything about Javascript). The project listed as a successor to term.js, https://github.com/xtermjs/xterm.js , has an implementation that's clearer to dig into. There, the color changing in browser/renderer/BaseRenderLayer.ts (https://github.com/xtermjs/xterm.js/blob/master/src/browser/renderer/BaseRenderLayer.ts ), looks suspect: the setColors() method updates the character atlas member but doesn't appear to do anything with the _colors member which is used for the clearing color in _clearAll().

smbhax avatar Dec 14 '21 17:12 smbhax