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

Re: Variable tileset size



On 27.02.2005 19:08, Matthias Grimm wrote:
> 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?

As Dave mentioned that depends on the size. Large files (upwards of
about 200k I'd say) I prefer not to have posted to the list (though not
so much for myself as I usually have to grab them anyway).

We can put the package somewhere on the web server (a new contrib/ dir
maybe) and then add a page in the wiki for it, or for fiddling with
tiles/units in general. Dave already volunteered to do the upload
which suits me just fine. ;-)

> 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.

Hm, I'm not sure I understand what you are trying to say here. Which
objects are you talking about? TerrainSet and UnitSet? Is there a
performance problem somewhere, or are you just speculating?

>     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

Looks more like width / 4 + 1... :-P

>     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 ;-)

Oh! Well. Actually, I don't think this should take very long. I'm not
yet sure about a rather fundamental issue, though. We have to make sure
that terrain and units fit together size-wise. How do we do that? Do we
only allow zooming to levels which both sets support? What if there are
no shared sizes (e.g. terrain is 64x56 only and units 32x28 only)? Do
we scale? Up? Down? Do we just bail out with an error? Or do we lump
terrain and units together in a single file? This matching business is
much more difficult to get right than adding support for different sizes.

Jens