Crossfire Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CF: Map Zoom



On Dec 16,  5:52pm, Scott MacFiggen wrote:

> Actually for crossfire there is no real good reason..
> For real games, most 3d hardware requires texture maps to be
> power of 2 in size and mipmaps require it also.
> I was thinking in general, not crossfire specificaly.
> But I think the filtering algorithms like bilinear
> interpolation work better/faster if power of 2 image
> size is a requirement??

 Don't know.  But as you said, probably don't want to apply them onto the
crossfire images anyways.

 I am not sure how that all works out - some things break them down into
smaller amounts, so it could break them down into 3 sets, each 8x8 (or 16x16 in
the case of the image is doubled.)


> It is trival. I just started a couple of days ago. Basically I have a
> program that collects all the xpm images, converts them to PNG
> and writes them out to a file in the order specifed by
> bmaps.paths.. The file is then memory mapped by the server
> and pointers to each image are stored in an array.. That seems
> to work well.

 I would like to try to keep away from doing an mmap for two reasons:

1) It is specifically mentioned someplace that everything in the lib directory
could in theory be replaced.  If that file is compressed, mmap probably wont'
work.
2) mmap just opens up a whole can of worms of it working/not working/working
different on different systems.

 You really might as well just load them into an array like the xpm and the
bitmaps are done.  This makes for a larger memory footprint, but that stuff
should get swapped out anyways if not used.   But it removes all portability
concerns, and the png source file can then be compressed, or nfs mounted, or
whatever else without any concerns.

>
> This is all just a big experiment to see how feasible using PNG
> instead of XPM would be...

 from what I have seen, png should be quite feasible.  The bigger issue is is
it worthwhile - is there enough to be gained using png over xpm that that move
shoudl take place?  OR is there enough to be gained to have png sit aside xpm
and support both formats?

 I have heard png is better supported on non X systems than xpm, so this would
probably make porting to windows or other systems easier (grab a png library,
and not worry about writing an xpm conversion tool).


> I agree. I just said it would be nice if someone would scale up all the
> images and then touch them up. Not that it should be done...

 All could be scaled up, and perhaps a few that need it more badly (scaling did
a real poor job or something) could then be touched up.  But this is really
subjective.


-- 

-- Mark Wedel
mark@pyramid.com
-
[you can put yourself on the announcement list only or unsubscribe altogether
by sending an email stating your wishes to crossfire-request@ifi.uio.no]