Windows clients

Technical and coding related questions.

Moderator: Board moderators

Rednaxela
Senior member
Posts: 434
Joined: Wed Jan 26, 2005 5:13 am

Post by Rednaxela »

You could make an install package if you want, some people might find it useful. I would personally recommend something like just making a zip file of the build in case others wanted to use it, and a patch file of the code changes to make it work in mingw.

One other thing, not sure how well things like opengl/cygwin work together, also the opengl mode takes tons of cpu if you don't have a 3d accel card or it isn't working with opengl right.
Another note, on my system, the cpu usage specs are somewhat like:
gtk1:
  • no SDL: 1%
  • SDL: Having some weird issues with a crash, which appears to happening in internally in SDL code according to the backtrace, so can't test right now
gtk2:
  • pixmap: 2%
  • opengl: 12%
  • SDL: 15%
Of course, note that the pixmap mode does simpler effects, (darkness doesn't use real alpha effects, etc.) so one might it expect it to be a little faster. Also, I think my opengl mode might be slower due to my lacking enough video memory on my really really crappy card, so it might be swapping tiles in and out of video memory.
Also, I think the opengl and SDL code for the gtk2 client always refresh the whole viewable area, whereas pixmap is currently optimized to only update tiles that need to be redrawn.
Apparently though, some other developers have found opengl notably faster than pixmap. It depends alot on the system it seems.
Reven
Luser
Posts: 25
Joined: Mon Sep 11, 2006 1:04 am

Post by Reven »

The good news is that the MingW build of the gtk-v2 client works. The bad news is that native Win32 GTK seems to be completely unaccelerated or something, because it's slow as hell. It works just fine in Cygwin under X on a windows machine, so there is something fundamentally slower about GTK with native Win32.

Rednaxela suggested OpenGL or SDL. I looked at the code for OpenGL and the init code at least makes a whole lot of X assumptions. SDL's X hack was a one liner, so it was easier to port.

So, the status is that pixmap works, but slow as hell. SDL works and seems to perform well. OpenGL doesn't work, and unless SDL turns out to be fundamentally broken in some way I can't see, it's not a priority for me. At least not until I get sound ported over and the build process cleaned up so it works with the auto-config.

Whom do I submit patches to for all this?
Reven
Luser
Posts: 25
Joined: Mon Sep 11, 2006 1:04 am

Post by Reven »

Thought people might like a screenshot.
Rednaxela
Senior member
Posts: 434
Joined: Wed Jan 26, 2005 5:13 am

Post by Rednaxela »

Nice work. I suggest you submit the patch on the sf.net tracker.

One note, some have been thinking of removing the SDL mode from the gtk2 client, because it simplifies the code, and most people have found either pixmap or opengl more usable than it depending on the system. Personally I don't agree with removing SDL support, however I though I'd note that there is a reasonable possibility it may be removed in the future in favor of the pixmap and opengl renderers.

One note on the opengl code, yes most of the init code would probably be x11 specific, however other than the init code it shouldn't need changing, and to my understanding it should just be a matter of coding some gtk/opengl/win32 init code which there should be examples of around the net, and putting that in an ifdef block.
Reven
Luser
Posts: 25
Joined: Mon Sep 11, 2006 1:04 am

Post by Reven »

I went ahead and did that,and it works - sort of. There is a bug somewhere that causes the view to shift up by 25-MAPHEIGHT tiles. I've "corrected" for this by setting the viewport differently in Windows than in X, but I don't like this.

If there is anyone who worked on the opengl code around, I could use a hand tracking down what is actually causing the bug.

I also could use some people to test to see if my binary works for them.
Leaf
Forum Aficionado
Posts: 1994
Joined: Tue Apr 29, 2003 5:55 pm
Location: Minnesota, USA
Contact:

Post by Leaf »

Reven wrote: I also could use some people to test to see if my binary works for them.
A little earlier today on the metalforge server..

findragon chats: if u see Reven again, tell him that I come soon : I quit and enter back
"Put another, more succinct way: don't complain, contribute. It's more satisfying in the long run, and it's more constructive."
Eric Meyer
Rednaxela
Senior member
Posts: 434
Joined: Wed Jan 26, 2005 5:13 am

Post by Rednaxela »

Reven wrote:I went ahead and did that,and it works - sort of. There is a bug somewhere that causes the view to shift up by 25-MAPHEIGHT tiles. I've "corrected" for this by setting the viewport differently in Windows than in X, but I don't like this.

If there is anyone who worked on the opengl code around, I could use a hand tracking down what is actually causing the bug.
Hmm, I haven't worked on the opengl client code before, but I could take a look at it anyways as I do know a little bit of opengl stuff. In any case you should probably post the patch w/ opengl on the tracker now so some other people could take a look at it.
Reven wrote:I also could use some people to test to see if my binary works for them.
I could always test it in wine (of course, if it doesn't work in wine, could be wine that's broken and not it, but if it does work, that's a good sign). I also have a win32 box around I might be able to test it on at some point.
Reven
Luser
Posts: 25
Joined: Mon Sep 11, 2006 1:04 am

Post by Reven »

I was going to make an installer for this, but I haven't had the time today, so I made a simple zip file. To test it out you need to:
  1. Download the [url=ftp://ftp.excelcia.org/pub/misc/CFGTKv2Client.zip]zipped client[/url].
  2. If you do not have GTK installed, then download and install it.
  3. Unzip the client - you will have a directory with the client and two DLLs. You can run the client from that directory.
Specifically what I'm looking for is confirmation that the vertical positioning of the game viewport is correct in OpenGL mode. Please test it at different map heights.
findufin
Newbie
Posts: 7
Joined: Fri Sep 22, 2006 11:26 pm
Location: France, Paris

Post by findufin »

Hello,

Well I just tried that client (on metalforge server).

First, the default display mode was not opengl : so it was very slow : well, after I have found the right option it was ok : and really faster than gtk client !!!

It looks to works well with differents sizes.

Default configuration file probably miss some other parameters : "Unable to find match for faceset (null) on the server" (that message was removed once I selected a faceset).

well, in the point of view of display, I found a strange behaviour of the squares that are hidden but u have already seen : on normal client they are darker and still with colors. here, they are in gray levels, is it normal ? (here is a snapshot : Image and another : Image : is it normal ???)


Well, now crashs : the configure menu looks a little buggy : I have 3 crash dump when I was clicking on "configure menu" -
I have not ur symbols but it can perhaps help with thoses stacks :

- http://huet.o.free.fr/cftest/crash1.txt
- http://huet.o.free.fr/cftest/crash2.txt
- http://huet.o.free.fr/cftest/crash3.txt

(I have keeped full dump so if u want to regenerate with more symbols, it can)


And last, I actually use normal gtk client so I found strange stuff on that client :

- this client apparently didnt use per account/server settings of keybinding ? (so my keybindings were not keeped and cant be different for different account...)

- containers are opened in the same window as the container window : they are almost unusable like this : the gtk client open container in another window bottom (or up if its on ground object). And regarding to container, when u open an active container and click again on it, they normaly come back to "active" : here no...

- and probably some other differences that I didnt see (some probably very good too :-) )


Well, to conclude, it looks really great : as I said, its slightly more fast than gtk client : with gtk client and a ~3 year old laptop (P4 2.7Ghz, video card ATI RADEON MOBILITY 9000), I can almost only put 13*13 client it its sometimes slow. Here, 25*25 display looks very fast !

Olivier. (findufin & findragon on mf)
Rednaxela
Senior member
Posts: 434
Joined: Wed Jan 26, 2005 5:13 am

Post by Rednaxela »

findufin wrote:well, in the point of view of display, I found a strange behaviour of the squares that are hidden but u have already seen : on normal client they are darker and still with colors. here, they are in gray levels, is it normal ?
Not specific to the win32 porting of it: Well, the intended behavior for the opengl renderer for the gtk2 client is to make the hidden squares, show up in greyscale, however bright they were when you last saw them, not sure that is great behavior though.
Also, the following bug that effects all clients makes the visual affect of that worse: http://sourceforge.net/tracker/index.ph ... tid=113833
findufin wrote:- this client apparently didnt use per account/server settings of keybinding ? (so my keybindings were not keeped and cant be different for different account...)
Really? Reading the code it should be doing seperate per account on the gtk2 client too.
findufin wrote:- containers are opened in the same window as the container window : they are almost unusable like this : the gtk client open container in another window bottom (or up if its on ground object). And regarding to container, when u open an active container and click again on it, they normaly come back to "active" : here no...
Two things, there's a currently a recently introduced bug with this on all platforms, and also, is there a triangle left of applied containers? If so, click that to close it, if not, it's probably a bug and would be nice to have a screenshot of.
Post Reply