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

Variable tileset size



Hi,

As I often mentioned I draw my tiles in 64x64 pixel size to be able to
allow map zooming without much quality loss. My tileset has not finished
yet but I completed a tool, that calculates tilesets of any size from a
whole bunch of images or imageparts. Short list of features:
 - assemble multiple image parts to the final tile. This allows for eg.
   using the shore tiles with different ground fields.
 - scales all images to the desired size.
 - if source image is provided in different sizes the best fitting
   source image will be used for scaling
 - automatically application of hexagon mask
 - generates automatically *.bmp and *.tsrc files for further
   processing with mktileset.
 - for each size a separate tileset is generated (for now)

1. I would like to put this tool in a contribution area of the source
    tree. How could we do this? May I post the source to the list?

2. Because each size has its own tileset, zooming could be easy realized
    by loading the same tileset with a different size. But to be able to
    do this, CF must become able to load tileset with different sizes.

    I tried to fiddle out what to do in the source but saw that I don't
    know enough for a patch yet. I found the following defines in
    mapview.h that must become properties of the objects tileset and
    unitset. Unfortunately there are two objects that handles tileset
    images. In future this objects should be changed to handle tileset
    images in different sizes to be fast, even this might become very
    memory consuming.

    GFX_WIDTH         32    This should be provided by the *.tiles file 
    GFX_HEIGHT        28    This should be provided by the *.tiles file
    GFX_OVERLAP_X   9     = width / 4 - 1
    GFX_OVERLAP_Y  14    = height / 2 
    GFX_PER_LINE      24    = image width / width

    Furthermore some hotkeys for zoom in and zoom out might be helpful.

    Maybe, Jens, you could prepare CF for different tileset sizes if
    there is no other important task to do and you have some time to
    spend. I would prefer to concentrate myself on tile creation.

   I forgot to say: This is a feature request ;-)

  Best Regards
    Matthias