![]() |
#1 |
Veteran
Join Date: Jun 2007
Posts: 1,391
![]() |
Fixing the X11 port?
Hi all,
It seems that the X11 support in Angband is unbearably slow these days, especially at large window sizes -- it's not "flicker", you can literally watch it redraw the dungeon screen when it's maximized. Rather than any specific thing I think this may simply be a case of the port doing everything synchronously and painting every little thing using individual calls to Xlib rather than just generating a bitmap in-memory and blitting it using a single to XRenderImage (or whatever it's called). So, why don't I just use the SDL port? The blocker for me is that it doesn't support multiple windows(*). It also has some behavior which seems odd to me UI-wise, but that's minor compared to the lack of multi-window support. It's been annoying me so much that I was seriously considering an attempt at fixing it(**). I see two options: 1) Using something like Cairo in the X11 module and using that to render everything to an in-memory surface and blitting it in a single Xlib/Xrender/whatever call, or 2) Adding a port to a different game library than SDL. I was looking around for SDL alternatives and happened upon the Allegro game library. Does anyone have any experience with that? I implemented a little demo and the API seems pretty sensible and easy to use, and crucially, it does support multiple OS-level windows. I guess this my question to the current developer cabal: Which of these options do you think would be a) most likely to actually make it into Vanilla, and b) the easiest in terms of code? (*) I realize that multi-window support has been promised for the in-development SDL 1.3 (which has later been renamed SDL 2.x) for ages. However none of the Linux distros which I'm aware of ship anything later than 1.2.x, and I have absolutely no idea how close 2.x is to release. Given the length of time we've been waiting already, I'm not holding my breath. (**) If this happens, it's at least a few months out -- too busy and worn-out to do any serious hacking at the moment. Last edited by AnonymousHero; October 6, 2012 at 11:37. |
![]() |
![]() |
![]() |
#2 |
Vanilla maintainer
Join Date: Apr 2007
Location: Canberra, Australia
Age: 57
Posts: 9,481
Donated: $60
![]() ![]() |
There is one big reason to keep the x11 port - running the borg in xscreensaver.
That said, I'm sure if there were a functional Allegro port, it would be happily adopted. Ease of coding? I know nothing.
__________________
One for the Dark Lord on his dark throne In the Land of Mordor where the Shadows lie. |
![]() |
![]() |
![]() |
#3 | |
Angband Devteam member
|
Quote:
a) is easy: anything submitted as a pull request on github that actually works will be included in 3.5 - improved X11, or Allegro, or both. b) is harder: the X11 port is ancient but also relatively simple: it might not be too hard to 'fix' it. But writing a frontend from scratch is also not supposed to be hard in Angband, as there are many to learn from. (Disclaimer: I don't do UI stuff.) SDL 1.3 is the Duke Nukem Forever of libraries. When it finally arrives it will be ludicrously out of date.
__________________
"3.4 is much better than 3.1, 3.2 or 3.3. It still is easier than 3.0.9, but it is more convenient to play without being ridiculously easy, so it is my new favorite of the versions." - Timo Pietila |
|
![]() |
![]() |
![]() |
#4 |
Veteran
Join Date: Apr 2009
Location: Pisa / DL0
Posts: 1,023
![]() |
If that's the only reason, wouldn't it be easier to adapt the screensaver borg to use SDL, rather than maintaining an additional port just for it?
__________________
Dive fast, die young, leave a high-CHA corpse. -- You read a scroll labeled 'lol gtfo' of Teleport Level. |
![]() |
![]() |
![]() |
#5 |
Angband Devteam member
|
The other good reason is that almost every unix installation in the world has the X libs and should be able to run the X11 port out of the box. Not all will have libs for SDL, Allegro, GTK or even ncursesw.
__________________
"3.4 is much better than 3.1, 3.2 or 3.3. It still is easier than 3.0.9, but it is more convenient to play without being ridiculously easy, so it is my new favorite of the versions." - Timo Pietila |
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Fixing dir, shift-dir and ctrl-dir keys part 1: Win client | PowerWyrm | Development | 14 | June 4, 2012 15:30 |
Fixing dir, shift-dir and ctrl-dir keys part 2: GCU client | PowerWyrm | Development | 1 | June 1, 2012 19:34 |
Need advice... X11 vs. SDL | Therem Harth | Development | 25 | October 25, 2011 03:35 |
Angband under X11 | Magnate | Vanilla | 3 | December 13, 2009 21:56 |
Why no tile support in x11 port? | bdo | Vanilla | 2 | February 2, 2009 22:42 |