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

Re: graphics of crossfire.



>From: Kjetil Torgrim Homme <kjetilho@ifi.uio.no>
>
>Here's a little less ambitious idea (it's not new):
>
>Have a mask for each bitmap. Then we can have truly two-colour pixmaps
>(that is two colours plus background) and draw stacks of objects. I
>believe this alone will look pretty good.  However, it will be
>intolerably slow on e.g. our Sun-3/50's which run as X-terminals.
>(Pixmap-mode is slow on these terminals.)

Yeah, gotta red eyes :) .

And other benefit for masking is, the floor over the monster stays
visible.

But making mask takes some overhead also. There have to be either
made loadable mask font for every image, which doubles the disk
need for images. Or mask have to made dynamically, maybe in loading
phase ( doubles the amount of memory ).

Here is also some stuff about pixmaps:

Space:

If there is 24x24 16-colored image, 4 bits/pixel, 2 pixel/byte
( 24 * 24 / 2 ) = 288 bytes/image. And for
 2000 images = 576 000 bytes,
10000 images = 2 880 000 bytes,
50000 images = 14 400 000 bytes 
,that is when used in one file. And storing and developing in xpm-
files, 1051 bytes.
 2000 images = 2 102 000 bytes,
10000 images = 10 510 100 bytes,
50000 images = 52 550 000 bytes 

Tools:

- xpm-library, file://ftp.x.org/contrib/pixmap
	* library includes reading, writing, masking xmp-format
	  to files to pixmaps in server.
	* includes pnm-converter also	
- pixmap,      file://ftp.x.org/contrib/pixmap
	* editor,bitmap-versions for xpm-format
- xpaint,      file://ftp.x.org/contrib/pixmap
	* editor,common color editor, limited cabality to bit editing.
- fwf-widget,  file://ftp.x.org/contrib/...
	* editor-widget
- pbmplus,	file://ftp.x.org/contrib/...
	* converting packet, with this you can convert any color image
	  to xpm.

>Petri (well, at least one of the Finns) has done some work on putting
>the bitmaps in a special file to speed up pixmaps-reading, but I
>haven't looked at it, so I'll let him comment on that. (That code is
>in crossedit-0.6).

Jarkko (Jarkko.Sonninen@lut.fi) made the file code, indeed. But what
I think, the idea is mainly speed up the loading of images; when
they are around file system, you have: 1 open, 1 read and 1 close for
each file, so to 2000 images, 6000 operations. But when cached to file
you open & close once, so you have ~2000 operations. Second lesser idea
was the expansions to pixmaps.

btw. but before any image extensioning or other, gotta the 0.90.0 out,
I think.

////////////////////////////////////////////////////////////////////////
//   Petri Heinila   //   email: Petri.Heinila@lut.fi                 //
//                   //   mail:  Ainonkatu 2A                         //
//                   //          53100 Lappeenranta                   //
//                   //          Finland, Europe                      //
////////////////////////////////////////////////////////////////////////