Angband Forums

Angband Forums (http://angband.oook.cz/forum/index.php)
-   Development (http://angband.oook.cz/forum/forumdisplay.php?f=10)
-   -   X11 forwarding (http://angband.oook.cz/forum/showthread.php?t=8368)

Gwarl April 30, 2017 12:19

X11 forwarding
 
One interesting possibility for network play is the fact that X11 is a network protocol. I've been experimenting with this, I managed to run xclock on my server from a window on my desktop, and as a further proof of concept installed the debian slashem-x11 package and managed to play that (it even spawned child windows). After compiling from source with the gcu and X11 frontends enabled, launching angband over ssh defaults to the X11 frontend - however nothing happens, just a black space in my terminal which I can exit with ctrl+C (i.e. not a crash). Running with -mgcu gets me the gcu frontend running normally.

Since I could access the slashem X11 frontend without a problem I suspect this is something to do with angband rather than my setup. I noticed I needed client-side x11 libraries to compile - perhaps angband is only targetting a local display? I'm not very knowledgable here. If so, could piping the output or specifying a display be the required fix?

I'm going to be recreating the server with a browser-based launcher/login system rather than the in-terminal solution dgamelaunch provides and there are x11 libraries available for node.js so if I can get the x11 frontend running over ssh I should be able to get it running in a browser, and we'll have graphical supprt.

I don't want to touch any of the angband code just yet but if anyone can tell me what isn't working I'll keep it in mind.

fph April 30, 2017 13:38

I just tried; I confirm the X11 frontend doesn't work, but (in case that helps) the SDL one (angband -msdl) does the job.

takkaria April 30, 2017 15:00

Quote:

Originally Posted by fph (Post 120442)
I just tried; I confirm the X11 frontend doesn't work, but (in case that helps) the SDL one (angband -msdl) does the job.

IIRC Angband doesn't support graphics with X11 so you're better off with SDL anyway.

t4nk April 30, 2017 15:13

Hmmm. The command to start angband probably should be something like
Code:

angband -mx11 "-d$DISPLAY"
if I understand main-x11.c correctly (I also forgot how ssh X forwarding works, I guess it should set up DISPLAY automatically?)

t4nk April 30, 2017 15:16

Hmmm. The command to start angband probably should be something like
Code:

angband -mx11 "-d$DISPLAY"
if I understand main-x11.c correctly (I also forgot how ssh X forwarding works, I guess it should set up DISPLAY automatically?)

Quote:

IIRC Angband doesn't support graphics with X11 so you're better off with SDL anyway.
And yes, this :)

Gwarl April 30, 2017 15:41

Once I'd gotten the correct libraries the sdl frontend worked, mouse inputs and graphics included. It's cool but it's incredibly slow.

Once I'd figured out how to specify the -m subopt without getting it confused with the -d opts (it's angband "-mx11 -d$DISPLAY") I got the familar
Code:

./angband: Unable to prepare any 'display module'!
the -x<file> subopt looks interesting.

t4nk April 30, 2017 16:06

Ah, right, it should be "angband -mx11 -- -d$DISPLAY", and it should be the DISPLAY on your server... and anyway, I don't think X client (such as it is) is better than ncurses?

edit: come to think of it, both should work... You know what, just replace line 2554 in main-x11.c with "const char *dpy_name = NULL;" :)

Gwarl April 30, 2017 16:33

Yeah, I'm going to go ahead and set things up with the gcu port for now but I thought the possibilities for x11 might be interesting.

Ideally I'd probably want to slice things up to have a server component just sending data and then have that rendered on the client (I might even be able to compile an existing main-xxx file to run in a browser), but I don't know how that all fits together.

t4nk April 30, 2017 16:53

You mean like Dungeon Crawl's webtiles?

Gwarl April 30, 2017 17:01

Okay I changed that line and recompiled and keep getting the same thing.

The same error happens when I try to start with "-mcgu -n2" so I think it's something to do with spawning new windows. I'm going to stop worrying about it though.


All times are GMT +1. The time now is 23:35.

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