Re: [Freeciv-Dev] Freeciv web client

2010-01-03 Thread Daniel Markstedt
Awesome. With those latest usage stats posted elsewhere, it seems
you're on to something big here, Andreas. :)

Took the opportunity to post a 'community news' blurb over at the
freeciv.org wiki:

Freeciv Web Client developer Andreas Røsdal reports that over the
last month, an impressive 1254 games have been played on his servers.
The Web Client has been recently updated, so if you're running a
recent version of Firefox, Safari, or Chrome, surf over to
http://www.freeciv.net/ and join in.

Daniel

On Sun, Dec 13, 2009 at 6:35 PM,  andre...@pvv.ntnu.no wrote:
 Hello everyone,

 I've put up server for the Freeciv web client here:
 http://code.google.com/p/freeciv-forever/

 It should work on any modern browser, except Internet Explorer.
 Google Chrome has the best javascript performance, so I recommend
 using that for the best experience.

 Feedback, patches and more developers is welcome.

 Regards,
 Andreas R.


 ___
 Freeciv-dev mailing list
 Freeciv-dev@gna.org
 https://mail.gna.org/listinfo/freeciv-dev


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] Freeciv web client

2009-12-13 Thread andrearo
Hello everyone,

I've put up server for the Freeciv web client here:
http://code.google.com/p/freeciv-forever/

It should work on any modern browser, except Internet Explorer.
Google Chrome has the best javascript performance, so I recommend
using that for the best experience.

Feedback, patches and more developers is welcome.

Regards,
Andreas R.


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Freeciv Web Client

2009-06-15 Thread Andreas Røsdal
Hello Richard,


On Mon, 15 Jun 2009, Richard Lynch wrote:

 Are you actively maintaining the Freeciv Web Client?  Or is anybody?...

No, I'm not maintaining the existing web client. I would still like to
see a web client made, but this is a difficult thing to do.

 I've been trying to make it go, but...

 It seems to fire up the GTK client, which from reading the JSP source, it's 
 supposed to do.

It seems to me that you have compiled the GTK client, not the web client 
from source. You have to compile Freeciv with this parameter:
./autogen.sh --enable-client=web

Here is some old documentation about compiling:
http://freeciv.wikia.com/wiki/FreecivWebClient
(Note that the webclient was rewritten after that documentation
was made, so there are many changes)


 So I presume I should pretend that's happing on the server, invisible to me 
 at the web client.

 But the web client has no map, no overview map, and a lot of 0.5fps 500 
 Server Error

 The GTK client is sending a message about require capability  It goes by 
 too fast to really read it...

 I've added a log output to the civclient startup, and it only says No sound 
 support which I would hope wouldn't kill the whole thing...

 Any idea where I could get more info?

Yes, it seems that you are running the GTK client, not the web client.

 Thanks for any help!

 I'd also consider starting over, with my own client, maybe...  Any 
 suggestions on docs to read?


Unfortunately, you will have to start over, because some major 
architectural changes will be required. What I learned from 
implementing the current web client, is that these isssues will have to be 
resolved:

- Performance of the mapview is very important, and difficult to get right 
when a lot of information is transmitted over the web. Both packet latency 
and bandwidth is critical.

- The HTML5 canvas element doesn't have sufficient performance and support
on Internet Explorer to render isometrix graphics the way Freeciv does.
I used Excanvas for Internet Explorer, but the performance is horrible.
So canvas is not mature enough yet. I would recommend to investigate 
Flash, or wait for HTML5 to be implemented properly by Microsoft. 
http://en.wikipedia.org/wiki/Canvas_(HTML_element)
http://excanvas.sourceforge.net/

- Rather than using AJAX for everything, I think that using
Comet will reduce the network latency a lot for packets going from the 
server to the client. This means that the client doesn't have to
poll the server so frequently. So my advice here is to scrap AJAX,
and go for Comet. 
http://en.wikipedia.org/wiki/Comet_(programming)

- Internet Explorer has a limitation where only one image can be 
downloaded at a time, so downloading the game in IE takes a very long time
for more than a few 100 tiles for Freeciv. Some solution for this should 
be found.

- In the current web client has the mapview rendering logic on the server 
side (in the civclient C process), and transmits which tiles are 
supposed to be drawn to the client using compressed and diffed JSON.
I think that this has to be changed to that the client side Javascript
contains more game logic, and is able to draw the entire mapview based
on game data stored in variables on the client. Initially, I wanted the
client side Javascript to be as think and lightweight as possible,
and simply to operations sent from the server. This has proved to be
too slow, because too much data was transmitted over the network.
To sum up: more game logic and game data needs to be implemented on the 
client side, so that network traffic between the server and Javascript web 
client is more like between the current C civserver and civclient.

Take a look here:  http://code.google.com/p/freeciv-forever/

I might be interested in cooperating in developing an improved web client 
some time...


  - Andreas



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Freeciv Web Client

2009-06-15 Thread Richard Lynch
D'oh!

By the time I worked through everything else, and added the --disable-nls, I 
forgot the --enable-client=web :-(

Sorry!

Now, however, I'm stuck

It would seem that make can't find soap-server.h nanohttp-logging.h and then 
libxml.h

I mucked with symlinks in /usr/include to make it get past all that...  
Probably a Bad Idea...

Now I have this:

gcc  -g -O2 -pthread -Wall -Wpointer-arith -Wcast-align -Wmissing-prototypes 
-Wmissing-declarations-o civclient   audio_sdl.o attribute.o 
citydlg_common.o cityrepdata.o civclient.o chatline_common.o 
connectdlg_common.o climisc.o climap.o clinet.o colors_common.o control.o 
editor.o ggzclient.o goto.o helpdata.o mapctrl_common.o mapview_common.o 
messagewin_common.o overview_common.o packhand.o packhand_gen.o plrdlg_common.o 
options.o repodlgs_common.o reqtree.o servers.o text.o themes_common.o 
tilespec.o audio.o audio_none.o ../utility/libcivutility.a  
../common/libcivcommon.a ../common/aicore/libaicore.a agents/libagents.a 
gui-web/libguiclient.a ../utility/libcivutility.a  ../common/libcivcommon.a 
../common/aicore/libaicore.a agents/libagents.a gui-web/libguiclient.a  -lm 
-lSDL -lpthread -lSDL_mixer   -lbz2 -lz
gui-web/libguiclient.a(gui_main.o): In function `ui_main':
/home/rlynch/www/freeciv/freeciv/client/gui-web/gui_main.c:112: undefined 
reference to `soap_server_init_args'
/home/rlynch/www/freeciv/freeciv/client/gui-web/gui_main.c:115: undefined 
reference to `herror_code'
/home/rlynch/www/freeciv/freeciv/client/gui-web/gui_main.c:115: undefined 
reference to `herror_message'
/home/rlynch/www/freeciv/freeciv/client/gui-web/gui_main.c:115: undefined 
reference to `herror_func'
/home/rlynch/www/freeciv/freeciv/client/gui-web/gui_main.c:117: undefined 
reference to `herror_release'

And about 40 other missing saop_* stuff. :-(

Any ideas?


From: Andreas Røsdal [andre...@pvv.ntnu.no]
Sent: Monday, June 15, 2009 3:06 PM
To: Richard Lynch
Cc: freeciv-dev@gna.org
Subject: Re: Freeciv Web Client

Hello Richard,


On Mon, 15 Jun 2009, Richard Lynch wrote:

 Are you actively maintaining the Freeciv Web Client?  Or is anybody?...

No, I'm not maintaining the existing web client. I would still like to
see a web client made, but this is a difficult thing to do.

 I've been trying to make it go, but...

 It seems to fire up the GTK client, which from reading the JSP source, it's 
 supposed to do.

It seems to me that you have compiled the GTK client, not the web client
from source. You have to compile Freeciv with this parameter:
./autogen.sh --enable-client=web

Here is some old documentation about compiling:
http://freeciv.wikia.com/wiki/FreecivWebClient
(Note that the webclient was rewritten after that documentation
was made, so there are many changes)


 So I presume I should pretend that's happing on the server, invisible to me 
 at the web client.

 But the web client has no map, no overview map, and a lot of 0.5fps 500 
 Server Error

 The GTK client is sending a message about require capability  It goes by 
 too fast to really read it...

 I've added a log output to the civclient startup, and it only says No sound 
 support which I would hope wouldn't kill the whole thing...

 Any idea where I could get more info?

Yes, it seems that you are running the GTK client, not the web client.

 Thanks for any help!

 I'd also consider starting over, with my own client, maybe...  Any 
 suggestions on docs to read?


Unfortunately, you will have to start over, because some major
architectural changes will be required. What I learned from
implementing the current web client, is that these isssues will have to be
resolved:

- Performance of the mapview is very important, and difficult to get right
when a lot of information is transmitted over the web. Both packet latency
and bandwidth is critical.

- The HTML5 canvas element doesn't have sufficient performance and support
on Internet Explorer to render isometrix graphics the way Freeciv does.
I used Excanvas for Internet Explorer, but the performance is horrible.
So canvas is not mature enough yet. I would recommend to investigate
Flash, or wait for HTML5 to be implemented properly by Microsoft.
http://en.wikipedia.org/wiki/Canvas_(HTML_element)
http://excanvas.sourceforge.net/

- Rather than using AJAX for everything, I think that using
Comet will reduce the network latency a lot for packets going from the
server to the client. This means that the client doesn't have to
poll the server so frequently. So my advice here is to scrap AJAX,
and go for Comet.
http://en.wikipedia.org/wiki/Comet_(programming)

- Internet Explorer has a limitation where only one image can be
downloaded at a time, so downloading the game in IE takes a very long time
for more than a few 100 tiles for Freeciv. Some solution for this should
be found.

- In the current web client has the mapview rendering logic on the server
side (in the civclient C process), and transmits which tiles are

[Freeciv-Dev] Freeciv Web Client

2008-09-11 Thread Andreas Røsdal

Hello everyone!

Take a look at the latest Freeciv Web Client:
http://freeciv-forever.com/

The game is now almost to playable in Firefox, but a lot of development
still remains. Give it a try, let me know what you think,
and report any bugs you find!

 - Andreas Røsdal___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Freeciv web client demo

2008-06-26 Thread Andreas Røsdal



On Thu, 26 Jun 2008, Jason Dorje Short wrote:


Andreas Røsdal wrote:

On Wed, 25 Jun 2008, Jason Dorje Short wrote:


Andreas Røsdal wrote:

Hello!

Here is a new demo of the Freeciv web client:
http://freeciv-web.game-host.org:8080/freeciv-web/login.jsp

The game is almost playable, with authentication support and a custom 
pubserver. You can use the normal keyboard shortcuts from the GTK+
version. Only the left mouse button is useful, since browsers don't 
allow

overriding the right mouse button.

It works with Firefox 1.5+, Safari, Opera. It currently works best
with a recent Firefox version. It also works with Internet Explorer 7+ 
if you have Silverlight installed, through excanvas.


Note that my bandwidth is quite limited, which could make loading 
times quite high. Let me know if this works for you. It isn't quite 
the google-maps experience yet :-)


Very nice indeed.

But why doesn't it use ggz!


GGZ would be ideal for this, but it is more complex, and it doesn't have a 
HTTP interface and doesn't support launching civclients...


What's needed is a server-side library that can interface with your code 
(i.e., the http interface).  Speaking of which, where is your code?


-jason



In that case we need a Java library for the J2EE server (Resin) which 
gives the web client access to the GGZ functionality.


I haven't uploaded the code anywhere yet. I could probably get it done 
fairly soon though.


 - Andreas
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Freeciv web client demo

2008-06-26 Thread Daniel Markstedt
On Thu, 26 Jun 2008 17:20:59 +0900, Andreas Røsdal [EMAIL PROTECTED]  
wrote:



 On Thu, 26 Jun 2008, Jason Dorje Short wrote:

 Andreas Røsdal wrote:
 On Wed, 25 Jun 2008, Jason Dorje Short wrote:

 Andreas Røsdal wrote:
 Hello!

 Here is a new demo of the Freeciv web client:
 http://freeciv-web.game-host.org:8080/freeciv-web/login.jsp

 The game is almost playable, with authentication support and a custom
 pubserver. You can use the normal keyboard shortcuts from the GTK+
 version. Only the left mouse button is useful, since browsers don't
 allow
 overriding the right mouse button.

 It works with Firefox 1.5+, Safari, Opera. It currently works best
 with a recent Firefox version. It also works with Internet Explorer  
 7+
 if you have Silverlight installed, through excanvas.

 Note that my bandwidth is quite limited, which could make loading
 times quite high. Let me know if this works for you. It isn't quite
 the google-maps experience yet :-)

 Very nice indeed.

 But why doesn't it use ggz!

 GGZ would be ideal for this, but it is more complex, and it doesn't  
 have a
 HTTP interface and doesn't support launching civclients...

 What's needed is a server-side library that can interface with your code
 (i.e., the http interface).  Speaking of which, where is your code?

 -jason


 In that case we need a Java library for the J2EE server (Resin) which
 gives the web client access to the GGZ functionality.

 I haven't uploaded the code anywhere yet. I could probably get it done
 fairly soon though.

   - Andreas

Don't forget http://svn.gna.org/viewcvs/freeciv/branches/freeciv-web/

  ~Daniel

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] Freeciv web client demo

2008-06-25 Thread Andreas Røsdal
Hello!

Here is a new demo of the Freeciv web client:
http://freeciv-web.game-host.org:8080/freeciv-web/login.jsp

The game is almost playable, with authentication support and a custom 
pubserver. You can use the normal keyboard shortcuts from the GTK+
version. Only the left mouse button is useful, since browsers don't allow
overriding the right mouse button.

It works with Firefox 1.5+, Safari, Opera. It currently works best
with a recent Firefox version. It also works with Internet Explorer 7+ if 
you have Silverlight installed, through excanvas.

Note that my bandwidth is quite limited, which could make loading times 
quite high. Let me know if this works for you. It isn't quite the 
google-maps experience yet :-)

  - Andreas R.

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Freeciv web client demo

2008-06-25 Thread Jason Dorje Short
Andreas Røsdal wrote:
 Hello!
 
 Here is a new demo of the Freeciv web client:
 http://freeciv-web.game-host.org:8080/freeciv-web/login.jsp
 
 The game is almost playable, with authentication support and a custom 
 pubserver. You can use the normal keyboard shortcuts from the GTK+
 version. Only the left mouse button is useful, since browsers don't allow
 overriding the right mouse button.
 
 It works with Firefox 1.5+, Safari, Opera. It currently works best
 with a recent Firefox version. It also works with Internet Explorer 7+ if 
 you have Silverlight installed, through excanvas.
 
 Note that my bandwidth is quite limited, which could make loading times 
 quite high. Let me know if this works for you. It isn't quite the 
 google-maps experience yet :-)

Very nice indeed.

But why doesn't it use ggz!

-jason


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Freeciv web client demo

2008-06-25 Thread Jason Dorje Short
Andreas Røsdal wrote:
 On Wed, 25 Jun 2008, Jason Dorje Short wrote:
 
 Andreas Røsdal wrote:
 Hello!

 Here is a new demo of the Freeciv web client:
 http://freeciv-web.game-host.org:8080/freeciv-web/login.jsp

 The game is almost playable, with authentication support and a custom 
 pubserver. You can use the normal keyboard shortcuts from the GTK+
 version. Only the left mouse button is useful, since browsers don't 
 allow
 overriding the right mouse button.

 It works with Firefox 1.5+, Safari, Opera. It currently works best
 with a recent Firefox version. It also works with Internet Explorer 
 7+ if you have Silverlight installed, through excanvas.

 Note that my bandwidth is quite limited, which could make loading 
 times quite high. Let me know if this works for you. It isn't quite 
 the google-maps experience yet :-)

 Very nice indeed.

 But why doesn't it use ggz!
 
 GGZ would be ideal for this, but it is more complex, and it doesn't have 
 a HTTP interface and doesn't support launching civclients...

What's needed is a server-side library that can interface with your code 
(i.e., the http interface).  Speaking of which, where is your code?

-jason

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Freeciv web client demo

2008-06-25 Thread Andreas Røsdal

On Wed, 25 Jun 2008, Jason Dorje Short wrote:


Andreas Røsdal wrote:

Hello!

Here is a new demo of the Freeciv web client:
http://freeciv-web.game-host.org:8080/freeciv-web/login.jsp

The game is almost playable, with authentication support and a custom 
pubserver. You can use the normal keyboard shortcuts from the GTK+

version. Only the left mouse button is useful, since browsers don't allow
overriding the right mouse button.

It works with Firefox 1.5+, Safari, Opera. It currently works best
with a recent Firefox version. It also works with Internet Explorer 7+ if 
you have Silverlight installed, through excanvas.


Note that my bandwidth is quite limited, which could make loading times 
quite high. Let me know if this works for you. It isn't quite the 
google-maps experience yet :-)


Very nice indeed.

But why doesn't it use ggz!



GGZ would be ideal for this, but it is more complex, and it doesn't have a 
HTTP interface and doesn't support launching civclients...


 - Andreas___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Freeciv web client

2007-09-16 Thread Daniel Markstedt
On 9/15/07, Andreas Røsdal [EMAIL PROTECTED] wrote:


 On Sat, 15 Sep 2007, Daniel Markstedt wrote:

  On 9/11/07, Andreas Røsdal [EMAIL PROTECTED] wrote:
  I think that I should write some documentation about how to setup and run
  the web client, because currently that takes a lot of effort. Each
  web-browser session gets its own civclient process. The civclient
  process is launched from the Java application server (Resin), and at the
  moment the civclient can only be run from the command line for debugging
  purposes if it is invoked with correct parameters. So you really have to
  setup the application server correctly first, before you can get the whole
  thing running.
 
  The data directory was left out because I don't have any more storage
  space on the server. I would be really great if a new branch could be
  created in SVN on gna.org for this experiment. Otherwise it would be
  difficult to share the source code.
 
  Anyway, it's great that you gave it a try, event though there is still
  quite a long way to go.
 
 
- Andreas
 
 
 
  I suggest you apply for membership of the project at gna.org so you
  can add and maintain the branch yourself! (If everyone agrees,
  naturally.)
 
  BTW, have you decided on a widget toolkit to use, or are you writing
  the gui from scratch?

 The GUI widget toolkit is implemented in HTML at the moment. That means
 that the graphics are rendered with the HTML canvas element, while all the
 GUI elements are limited to what one can do with HTML.

 I'm not sure if there are any widget toolkits which could be used in a
 browser. It is possible to create a Java applet or a Flash plugin to
 create a user interface, but I've not looked into that (yet).

  BTW2, I'd like to write a 'news story' for the website. Something in
  particular that you'd like mentioned there?

 Perhaps that it would be great if more testers and developers gave the
 web client a try.

 Even better, if someone would be kind enough to provide server hosting
 for the web client. Such a server needs a lot of bandwidth and CPU/memory.

   - Andreas


News story posted! What's needed now, I think, is a wiki page
outlining how to get it going and how to help out with the effort!

 ~Daniel

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Freeciv web client

2007-09-16 Thread Andreas Røsdal

On Sun, 16 Sep 2007, Daniel Markstedt wrote:

On 9/11/07, Andreas Røsdal [EMAIL PROTECTED] wrote:
I suggest you apply for membership of the project at gna.org so you
can add and maintain the branch yourself! (If everyone agrees,
naturally.)


Great, I have committed the client to a new branch here:
http://svn.gna.org/viewcvs/freeciv?rev=13593view=rev


News story posted! What's needed now, I think, is a wiki page
outlining how to get it going and how to help out with the effort!


Sure, I'll create a new page on the wiki documenting how to run it.

Some of the issues I'm currently working on is performance,
and simply being able to render the mapview correctly for all tiles types.
-the base terrain isn't rendered for some reason.
-there is an arctic special rendered at random places.
-there is a problem with the offset when rendering some tiles (coast etc).
See the screenshot:
http://www.pvv.ntnu.no/~andrearo/freeciv-web-client.png

 - Andreas___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Freeciv web client

2007-09-15 Thread Andreas Røsdal



On Sat, 15 Sep 2007, Daniel Markstedt wrote:


On 9/11/07, Andreas Røsdal [EMAIL PROTECTED] wrote:

I think that I should write some documentation about how to setup and run
the web client, because currently that takes a lot of effort. Each
web-browser session gets its own civclient process. The civclient
process is launched from the Java application server (Resin), and at the
moment the civclient can only be run from the command line for debugging
purposes if it is invoked with correct parameters. So you really have to
setup the application server correctly first, before you can get the whole
thing running.

The data directory was left out because I don't have any more storage
space on the server. I would be really great if a new branch could be
created in SVN on gna.org for this experiment. Otherwise it would be
difficult to share the source code.

Anyway, it's great that you gave it a try, event though there is still
quite a long way to go.


  - Andreas




I suggest you apply for membership of the project at gna.org so you
can add and maintain the branch yourself! (If everyone agrees,
naturally.)

BTW, have you decided on a widget toolkit to use, or are you writing
the gui from scratch?


The GUI widget toolkit is implemented in HTML at the moment. That means 
that the graphics are rendered with the HTML canvas element, while all the 
GUI elements are limited to what one can do with HTML.


I'm not sure if there are any widget toolkits which could be used in a 
browser. It is possible to create a Java applet or a Flash plugin to 
create a user interface, but I've not looked into that (yet).



BTW2, I'd like to write a 'news story' for the website. Something in
particular that you'd like mentioned there?


Perhaps that it would be great if more testers and developers gave the 
web client a try.


Even better, if someone would be kind enough to provide server hosting 
for the web client. Such a server needs a lot of bandwidth and CPU/memory.


 - Andreas
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Freeciv web client

2007-09-11 Thread Christian Prochaska
Unfortunately the data directory is missing from the Freeciv snapshot
in your archive and with a copy from trunk revision {2007-08-18} (date
from api_gen.h) the client prints

2: Client does not support overhead view tilesets.
2: Using default tileset instead.

and then crashes:

(gdb) bt full
#0  0xb7bf267b in strlen () from /lib/libc.so.6
No symbol table info available.
#1  0x08087b8c in real_mystrdup (str=0xf423f Address 0xf423f out of bounds,
called_as=0x80f8631 strdup, line=101, file=0x8110e58 sprite.c)
at mem.c:139
No locals.
#2  0x080f5fe6 in crop_sprite (source=0x81e78c0, x=0, y=240, width=96,
height=48, mask=0x0, mask_offset_x=-1, mask_offset_y=-1) at sprite.c:101
sprite = (struct sprite *) 0x81e88d0
#3  0x08077bfe in load_sprite (t=value optimized out,
tag_name=0xbfe98268 city.size_0) at tilespec.c:1426
sf_w = 99
sf_h = 99
__PRETTY_FUNCTION__ = load_sprite
#4  0x0808145d in tileset_load_tiles (t=0x81ce018) at tilespec.c:1933
dir_name = value optimized out
#5  0x080f58ed in ui_main (argc=1, argv=0xbfe98844) at gui_main.c:82
err = value optimized out
t1 = 4278845440
auto_start_server = value optimized out
i = value optimized out
#6  0x0804ffa4 in main (argc=Cannot access memory at address 0x3
) at civclient.c:357
i = 1
loglevel = 2
ui_options = value optimized out
ui_separator = 233
option = value optimized out
user_tileset = 191
(gdb)

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Freeciv web client

2007-09-11 Thread Andreas Røsdal
I think that I should write some documentation about how to setup and run 
the web client, because currently that takes a lot of effort. Each 
web-browser session gets its own civclient process. The civclient 
process is launched from the Java application server (Resin), and at the 
moment the civclient can only be run from the command line for debugging 
purposes if it is invoked with correct parameters. So you really have to 
setup the application server correctly first, before you can get the whole 
thing running.

The data directory was left out because I don't have any more storage 
space on the server. I would be really great if a new branch could be 
created in SVN on gna.org for this experiment. Otherwise it would be 
difficult to share the source code.

Anyway, it's great that you gave it a try, event though there is still 
quite a long way to go.


  - Andreas



On Tue, 11 Sep 2007, Christian Prochaska wrote:

 Unfortunately the data directory is missing from the Freeciv snapshot
 in your archive and with a copy from trunk revision {2007-08-18} (date
 from api_gen.h) the client prints

 2: Client does not support overhead view tilesets.
 2: Using default tileset instead.

 and then crashes:

 (gdb) bt full
 #0  0xb7bf267b in strlen () from /lib/libc.so.6
 No symbol table info available.
 #1  0x08087b8c in real_mystrdup (str=0xf423f Address 0xf423f out of bounds,
called_as=0x80f8631 strdup, line=101, file=0x8110e58 sprite.c)
at mem.c:139
 No locals.
 #2  0x080f5fe6 in crop_sprite (source=0x81e78c0, x=0, y=240, width=96,
height=48, mask=0x0, mask_offset_x=-1, mask_offset_y=-1) at sprite.c:101
sprite = (struct sprite *) 0x81e88d0
 #3  0x08077bfe in load_sprite (t=value optimized out,
tag_name=0xbfe98268 city.size_0) at tilespec.c:1426
sf_w = 99
sf_h = 99
__PRETTY_FUNCTION__ = load_sprite
 #4  0x0808145d in tileset_load_tiles (t=0x81ce018) at tilespec.c:1933
dir_name = value optimized out
 #5  0x080f58ed in ui_main (argc=1, argv=0xbfe98844) at gui_main.c:82
err = value optimized out
t1 = 4278845440
auto_start_server = value optimized out
i = value optimized out
 #6  0x0804ffa4 in main (argc=Cannot access memory at address 0x3
 ) at civclient.c:357
i = 1
loglevel = 2
ui_options = value optimized out
ui_separator = 233
option = value optimized out
user_tileset = 191
 (gdb)


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Freeciv web client

2007-08-27 Thread Per I. Mathisen

On Sun, 26 Aug 2007, Andreas Røsdal wrote:

I sent a proposal about a web client for Freeciv some time ago.
Now I've implemented a prototype / proof of concept.

It uses a webservice which allows a browser to communicate with a
civclient process on the server. The mapview is renederes using the canvas
element which is drawn upon using Javascript.


That is impressive. When you posted the original proposal, I thought it 
was silly because surely it could never work...


Does this mean the player does not have to download anything to play?

The performance still has a way to go, perhaps someone has some 
suggestions.


How bad is it?

What is needed to set it up?

(Sorry, haven't looked at the code yet.)

  - Per___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Freeciv web client

2007-08-27 Thread Andreas Røsdal

On Mon, 27 Aug 2007, Per I. Mathisen wrote:

On Sun, 26 Aug 2007, Andreas Røsdal wrote:

I sent a proposal about a web client for Freeciv some time ago.
Now I've implemented a prototype / proof of concept.

It uses a webservice which allows a browser to communicate with a
civclient process on the server. The mapview is renederes using the canvas
element which is drawn upon using Javascript.


That is impressive. When you posted the original proposal, I thought it was 
silly because surely it could never work...


Does this mean the player does not have to download anything to play?


Correct, nothing is required in order to play, except for a compliant web 
browser. However, the entire javascript client, tileset and data will have 
to be downloaded by the web browser. Currently 1,2 MB of files are 
downloaded in this way. This is compressed with gzip. In addition there is 
the constant polling of the server from the client to keep it updated. 
Most of this file size is because of the large png files in the tileset, 
with a lot of wasted space.



The performance still has a way to go, perhaps someone has some 
suggestions.


How bad is it?


Initializing the client currently takes about 30 seconds. This includes 
downloading everything, cropping and preparing the tileset, and starting a 
civclient and civserver process.


Rendering the mapview on the canvas element is now at about 7 fps, which 
includes the time it takes to poll the server for coordinates to render, 
and rendering the graphics to the canvas element.  This framerate will 
increase a lot if more clever caching of the map is used in the client, 
and the framerate will probably decrease once more complex maps are 
rendered (with fog etc). Thinking out more clever ways to transfer and 
render the map to the client would be a good idea.


The server side appears to perform pretty well, each civclient requires 
about 5 MB of RAM, and not very much CPU power. So I would imagine that 
quite of lot of clients could use the same server, perhaps over 100 
simultaneous users.



What is needed to set it up?


This can be run using a Java application server, I'm currently using 
Resin (www.caucho.com). You also need Apache Axis and libcsoap, including 
their dependencies. I might write up a description about how to deploy 
this. Or even setup a test-server once I'm satisfied with it.



 - Andreas___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Freeciv web client

2007-08-27 Thread Vasco Alexandre da Silva Costa
On 8/26/07, Andreas Røsdal [EMAIL PROTECTED] wrote:
 Hello,

 I sent a proposal about a web client for Freeciv some time ago.
 Now I've implemented a prototype / proof of concept.

 It uses a webservice which allows a browser to communicate with a
 civclient process on the server. The mapview is renederes using the canvas
 element which is drawn upon using Javascript.

 Screenshot:
 http://www.pvv.ntnu.no/~andrearo/freeciv-web-client.png

 Source code:
 http://www.pvv.org/~andrearo/webclient.tar.bz2
 http://www.pvv.org/~andrearo/architecture.png

 Requirements:
 csoap - http://csoap.sourceforge.net/
 Apache Axis - http://ws.apache.org/axis/


 It would be great with some feedback on the Freeciv C part of the
 webservice. It is found under /client/gui-web. The performance still has a
 way to go, perhaps someone has some suggestions.

 It currently should work with any browser supporting the canvas
 HTML element. This includes Firefox 1.5, Opera, Safari and even Internet
 Explorer (using excanvas from Google).

This looks very nice.

I thought we had to wait for web 3.0 and RIAs for someone to make this work.
I guess I was wrong.
:-)

-- 
Vasco Alexandre da Silva Costa

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] Freeciv web client

2007-08-26 Thread Andreas Røsdal
Hello,

I sent a proposal about a web client for Freeciv some time ago.
Now I've implemented a prototype / proof of concept.

It uses a webservice which allows a browser to communicate with a 
civclient process on the server. The mapview is renederes using the canvas 
element which is drawn upon using Javascript.

Screenshot:
http://www.pvv.ntnu.no/~andrearo/freeciv-web-client.png

Source code:
http://www.pvv.org/~andrearo/webclient.tar.bz2
http://www.pvv.org/~andrearo/architecture.png

Requirements:
csoap - http://csoap.sourceforge.net/
Apache Axis - http://ws.apache.org/axis/


It would be great with some feedback on the Freeciv C part of the 
webservice. It is found under /client/gui-web. The performance still has a 
way to go, perhaps someone has some suggestions.

It currently should work with any browser supporting the canvas 
HTML element. This includes Firefox 1.5, Opera, Safari and even Internet 
Explorer (using excanvas from Google).


  - Andreas

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev