[CF-Devel] New project

Scott Barnes reeve at ductape.net
Wed May 30 09:52:47 CDT 2001


On Tue, 29 May 2001 16:46:12 Mark Wedel wrote:
>
     
       If it works, the ideal solution would be to just put the needed source
     
     >
     
      files into the current client directory and modify the makefile to
     
     >
     
      build that client of appropriate libraries are available.
     
     >
     
     
     >
     
       The big advantage of this is that you keep more of the common code, so
     
     >
     
      as no protocol commands are added, your client would not to get modified
     
     >
     
      in addition to the other clients (now if that new protocol command means
     
     >
     
      new data to be displayed, that will of course require modificiation).
     
     >
     
     
     >
     
       Just for curiousity, can you give some examples of what your client does
     
     >
     
      beyond the gtk client that we already have?  My impression is that gnome
     
     >
     
      apps generally use gtk as their toolkit.
     
     
Yes, GTK is the toolkit used by Gnome, but that's not why I did it, sure,
the GTK client looks good in Gnome but it doesn't take advantage of Gnome's
features.  As for examples, here goes:

* Uses gnome_sound functions for sound effects, resulting in the ability to
use sound under Gnome much better than before

* Uses GnomeCanvas for the map, thus allowing scaling of the map to fit
small displays or be more visible on large displays

* Uses GnomeApp for the main window, allowing the menus to be more easily
modified, have pixmaps, and follow the users global Gnome UI settings

* Use of GnomeApp also allows the seperate parts of the window to be made
into GnomeDockItems, thus allowing the user to change their positions, tear
them off the window, etc. (thus also obsoleting the "split windows" option)

* Use of gdk_imlib for image proccessing, thus allowing the images to be
reused and resized more efficiently (for instance, the Inv and Look lists
now use smaller images than the actual map so that they don't eat up so
much screen space)

* Uses GnomeEntry instead of GtkEntry for the "command line" so that
history is saved between sessions and conforms to the UI design of other
Gnome apps better

* Uses gnome_config functions to store the configuration thus making the
config load/save code cleaner

* Uses Gnome's soundlist system for defining the sound effects so the user
can change the sfx to their liking in the Gnome Control Center

* Many more things coming but that's all I've finished for now (but hey,
that's a LOT considering I started this three days ago :))

There is one downside though, the map drawing is slightly slower than the
GTK client's because of the fact that the GTK client just used a quick blit
to a GtkDrawable while the Gnome one uses separate drawables for each tile
to better allow scaling.  However, the difference isn't all that noticable
unless you're on a slower machine (like about a 75Mhz)

Basically, it's just better for Gnome users than the plain GTK client, but
it does have some other advantages over the GTK client just because of some
of the things Gnome libs offers than GTK doesn't.

Also, about the "put it in the current client" idea, that may not work,
since the sound code and a few lines in client.c, player.c, and commands.c
had to be modified/rewritten in order to allow for some of the
enhancements.  However, the protocol code is essentially the same so maybe
with some work it could be integrated into the current client.  However,
for now I'm going to submit it to SourceForge and just keep all the
duplicate code up to date with the CVS version of the regular client.  But
I would like to see it added to the current client one day.

Anyway, this mail is getting a bit lengthy so I'll just stop now :)

-- 
-- --
Reeve the cat
----BEGIN FORTUNE----
It's later than you think.
----END FORTUNE----
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS d? s: a? C++++ UL++++ P+ L++++ E- W++ N o K- w--- 
O M-- V-- PS+++ PE Y PGP t+++ 5 X+ R+++ tv+ b+++ DI++ D+ 
G e* h-- r+++ y** 
------END GEEK CODE BLOCK------


    
    


More information about the crossfire mailing list