Re: [gtk-list] Re: Large pixmap strategy needed

After having read Damien's very useful explanation of the various formats, I
have come up with what might be a partial solution to my problem, and would
appreciate some comments on how bloaty and slow it is going to be ;). But
first a quick recap:

I have an image that is quite large (1500x500), which is a map of the
world. During the course of the game countries will be taken over by players
with a colour each, and that colour will fill the country.

The partial solution (I still haven't thought of a good way of displaying the
map at double size or more w/o using huge amounts of memory) is that the map
is made the background pixmap of the window (by loading and converting it with
imlib), or is placed in a drawable.

Each country has a file associated with it, which is simply a square bitmap
containing the country and anything outside it's borders. It should then be
fairly simple (haha) to load it with imlib, extract a mask, fill the country
and create a pixmap which can then be placed on top of the background pixmap.
If I understand things correctly I can in the case of the country changing
colour simply delete the pixmap and reload the country bitmap (something which
should be speedy using imlibs cacheing) and restart the process.

Another thing which is of importance is that this game is turn-based, and
therefore speed is not essential. However, with six players I don't want to be
responsible for clogging up the bandwidth every time a turn is processed :)

Anyway, as usual any comments and ideas warmly welcomed.


            Dave Swegen           | Debian 2.0 on Linux i386 2.1.125
   <> | 
         <>         | Linux: The Choice of a Gnu Generation

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]