[crossfire] jxclient
Andreas Kirschbaum
kirschbaum at myrealbox.com
Thu Aug 9 13:50:25 CDT 2007
Yann Chachkoff wrote:
> Le dimanche 5 août 2007, Kevin R. Bulgrien a écrit :
> > Using run.sh, I get... disappointingly...
> >
> > Warning ! True full-screen support is not available.
> >
> > The system is a dual core pentium d (3.6 GHz) x86_64 with 3 Gb RAM.
> > The graphics card is a NVIDIA 7600 GT running a true nvidia driver
> > compiled on this machine.
> <snip>
>
> True full-screen support and hardware acceleration should indeed be
> available on a platform similar to yours. The client basically relies
> on the JDK to detect if fullscreen is available or not for the given
> screen resolution.
I have get same problem now: at one time I got full-screen mode, but
currently I cannot get it working anymore. I'm not aware that I did
change anything of my X11 setup. It might be a software bug, but reading
the source I get no idea what might be incorrect.
> Indeed, if the Java2D software renderer is used instead of the
> hardware-accelerated one, the client will be rather slow. This is
> because it has to redraw its whole GUI, which is a costly operation.
> I'm not sure this can really be improved.
I think the client is slow without hardware acceleration because it uses
transparent images for most GUI elements: if I make the client pretend
that all images are opaque, the client runs very fast.
That said, my plans to improve the speed are
a) to minimize the number and sizes of transparent images in the GUI,
and
b) to redraw only the screen parts that actually have changed. I have an
idea how to make it work with double buffering.
> > So far I have not had it crash. I've played a bit with it, though at
> > 1280x1024 it is only using about 1024x800 or so for the display, so
> > I need a magnifying glass to see in game text and inventory and the
> > little buttons. It's odd because the map graphics are in your face
> > big compared to how I run the GTK clients. Unfortunately I only have
> > 17" monitors on this machine.
>
> Yep - This is because the skin supplied for JXClient was made for
> 1024x768 resolution. If that screen mode is not available, Java will
> emulate it by using the next closest one, but it means you'll get (1)
> a tiny GUI and (2) some glitches outside the 1024x768 area.
Hmmm... I did increase the font size to make it readable but not wasting
too much screen space for text output.
> Good news is that, to some extend, jxclient is skinnable, so a lot of
> elements can be displayed in a different, and hopefully better, way.
> Gauges are indeed skinnable - the resistance ones and the
> HP/SP/Food/Mana ones are all using the same code, So making them
> clearer to see would probably be mostly a matter of changing the
> pictures used. Note that I believe that this interface would require
> more work than just changing a couple pictures, though.
The screen layout now is defined by text files. To create a new skin
copy the directory default.theme to (say) testskin. Modify the testskin
directory contents to your taste: each *.skin file defines one screen;
the files in fonts/ and pictures/ are the fonts/pictures referenced from
the commands in the *.skin files. Then start the client with
jxclient -jar jxclient.jar -S /path/to/testskin
or
jxclient -jar -jxclient.jar -S /path/to/testskin --server localhost
The latter example skips the metaserver screen. To return to the default
layout, start jxclient with "-S default".
(Currently no documentation exists yet. Also, the available commands
probably will change a bit from time to time.)
> > Wish list: Scroll wheel support.
>
> Indeed :) Not very hard to add for sure :).
Noted.
More information about the crossfire
mailing list