OwenGHB / angband-webclient

Browser client and webserver for playing Angband and variants
http://angband.live
GNU General Public License v2.0
18 stars 7 forks source link

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

Open smbhax opened 2 years ago

smbhax commented 2 years ago

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.

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 commented 2 years ago

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 commented 2 years ago

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.

OwenGHB commented 2 years ago

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.

smbhax commented 2 years ago

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.

peterdresslar commented 2 years ago

this is actually related to #51

smbhax commented 2 years ago

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().