Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old April 30, 2017, 12:19   #1
Gwarl
Swordsman
 
Join Date: Jan 2017
Posts: 405
Gwarl is on a distinguished road
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.
Gwarl is online now   Reply With Quote
Old April 30, 2017, 13:38   #2
fph
Knight
 
Join Date: Apr 2009
Location: Berlin / Italy
Posts: 564
fph is on a distinguished road
I just tried; I confirm the X11 frontend doesn't work, but (in case that helps) the SDL one (angband -msdl) does the job.
__________________
Dive fast, die young, leave a high-CHA corpse.
--
You read a scroll labeled 'lol gtfo' of Teleport Level.
fph is offline   Reply With Quote
Old April 30, 2017, 15:00   #3
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,827
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by fph View Post
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.
__________________
"Physician, heal thyself."
takkaria is offline   Reply With Quote
Old April 30, 2017, 15:13   #4
t4nk
Adept
 
Join Date: May 2016
Posts: 249
t4nk is on a distinguished road
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 is offline   Reply With Quote
Old April 30, 2017, 15:16   #5
t4nk
Adept
 
Join Date: May 2016
Posts: 249
t4nk is on a distinguished road
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
t4nk is offline   Reply With Quote
Old April 30, 2017, 15:41   #6
Gwarl
Swordsman
 
Join Date: Jan 2017
Posts: 405
Gwarl is on a distinguished road
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.
Gwarl is online now   Reply With Quote
Old April 30, 2017, 16:06   #7
t4nk
Adept
 
Join Date: May 2016
Posts: 249
t4nk is on a distinguished road
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;"
t4nk is offline   Reply With Quote
Old April 30, 2017, 16:33   #8
Gwarl
Swordsman
 
Join Date: Jan 2017
Posts: 405
Gwarl is on a distinguished road
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.
Gwarl is online now   Reply With Quote
Old April 30, 2017, 16:53   #9
t4nk
Adept
 
Join Date: May 2016
Posts: 249
t4nk is on a distinguished road
You mean like Dungeon Crawl's webtiles?
t4nk is offline   Reply With Quote
Old April 30, 2017, 17:01   #10
Gwarl
Swordsman
 
Join Date: Jan 2017
Posts: 405
Gwarl is on a distinguished road
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.
Gwarl is online now   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
X11 Tile Support Blue Baron Development 4 June 12, 2013 02:29
Fixing the X11 port? AnonymousHero Development 4 October 7, 2012 12:23
Angband under X11 Magnate Vanilla 3 December 13, 2009 22:56
X11 Specifying Fonts / Geometry chadhogg Vanilla 7 August 31, 2009 20:10
Sound on Linux with X11 is it available. tuppe666 Vanilla 10 September 13, 2007 17:42


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


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.