Board index » delphi » Best picture format to use in demos?

Best picture format to use in demos?

Hello !

I have loaded down lotsa txt files on the subject "source to implement
sprites in demos and games " and none of the files i have loaded down
have helped me.
I just want help with these questions ,

What is the best fastest and easiest  picture format to use in coding
demos or games  , raw,cel,pcx,bmp,dat,spr.gif ?

And i would like some tip on where i could find text files or docs on
how to load the picture format from disk , and then put it on screen ,
just like uses of arrays , or maybe you got the source code to help me
?

Thanks.

Mail    klxf...@algonet.se

//Stefan Bergh.

 

Re:Best picture format to use in demos?


Quote
In article <4u08cb$...@epimetheus.algonet.se> klxf...@algonet.se (Stefan Bergh) writes:
>Hello !
>I have loaded down lotsa txt files on the subject "source to implement
>sprites in demos and games " and none of the files i have loaded down
>have helped me.
>I just want help with these questions ,
>What is the best fastest and easiest  picture format to use in coding
>demos or games  , raw,cel,pcx,bmp,dat,spr.gif ?

Best, fastest, AND easiest?  I somehow doubt you're going to find one that
fits all three.  And if you're storing sprites, you may want to try for a
format that stores multiple images, or write multiple images to one image
and grab from that page.

RAW:  I've seen a RAW format implemented in different ways (palette then
data, data then palette, raw data with no palette).

CEL:  I think that's an AutoDesk format, used for making FLIs.  I think it's
probably fairly simple and fast, but I don't know much about it.

PCX:  Fairly simple and compact, it's pretty commonly used . . . and is
standardized.

BMP:  I've heard it's fairly simple, but it's one of those things I've tried
to avoid (probably because it's most commonly associated with Windoze).

DAT, SPR:  These are generic extentions, and not standardized.  They could
be anything.

GIF:  One word:  Ugh.  Has plenty of features, but uses a complex
compression algorithm.  It's not ideal for sprites.

If all else fails, be creative!  Create a format from scratch that suits
your needs, or adapt one format and change it so that it does what you
want.  Don't think that you need to limit yourself to convention and what's
already out there; IMHO, that's not a healthy attitude to have.

Quote
>And i would like some tip on where i could find text files or docs on
>how to load the picture format from disk , and then put it on screen ,
>just like uses of arrays , or maybe you got the source code to help me
>?

Well, for descriptions of some more common formats, try:

ftp://x2ftp.oulu.fi/pub/msdos/programming/gpe/pcgpe10.zip

There's probably some code bits or pseudo-code in there to give you an idea
of what you'd need to do.

For a code reference that has just about everything, try:

http://www.gdsoft.com/swag/swag.html

Quote
>Thanks.
>Mail    klxf...@algonet.se
>//Stefan Bergh.

--
Scott Earnest          | We now return you to our regularly scheduled |
siny...@{*word*104}space.org | chaos and mayhem. . . .                      |

Re:Best picture format to use in demos?


Quote
In article <4u08cb$...@epimetheus.algonet.se> klxf...@algonet.se (Stefan Bergh) writes:
>From: klxf...@algonet.se (Stefan Bergh)
>Subject: Best picture format to use in demos?
>Date: Sat, 03 Aug 1996 19:14:42 GMT
>Hello !
>I have loaded down lotsa txt files on the subject "source to implement
>sprites in demos and games " and none of the files i have loaded down
>have helped me.
>I just want help with these questions ,
>What is the best fastest and easiest  picture format to use in coding
>demos or games  , raw,cel,pcx,bmp,dat,spr.gif ?

Greetings,
               It all depends on the video mode you will use to disaply your
graphics, i will answer you for Mode-X and Mode 13h (I have no idea on other
vide modes). For sprites, in Mode 13h: CEL is the fastest, and it is quite
simple, simple pixel data with a header, there is also the IFF file format
that I particularly like, more specifically PBM , where you can put any
picture you like, sprite or other.
For sprites in Mode-X:  For speed efficiency since that video mode uses
planes, I suggest using the format in the Anigavga12.zip package. The pixels
are aligned by plane, which makes transfer to the screen faster.
(using Mode-X is a little bit more difficult then using Mode 13h).

For pictures: As Mr. Earnest as mentioned, no GIFs if you want speed, PCX is
fairly OK, as well as the IFF format also.

BTW: Do not reinvent the wheel! If you can take one of the formats already
there, then do it! Creating a new file format when there is already one which
can suit your needs is not a good idea (BTW: This last paragraph is a personal
opinion!).

Carl Eric Codere
http://www-edu.gel.usherb.ca/codc01

Other Threads