delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/03/20/10:00:32

Message-ID: <DB85AFBE7C0DD311BF260004ACB80BFC0E3FF4@nex_server.nextransport.com>
From: George Kinney <GKinney AT nextransport DOT com>
To: djgpp AT delorie DOT com
Subject: Re: Data File Construction
Date: Tue, 20 Mar 2001 09:45:24 -0500
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Reply-To: djgpp AT delorie DOT com

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C0B14C.658669F4
Content-Type: text/plain;
	charset="iso-8859-1"

>At the moment, the way I import graphics in a program is by opening a
>.bmp, or and .pcx file. However, in the real world, programs do not
>import graphics via these formats, but with data files eg. graphics.dat

In the "real world" programmers choose many different formats for graphics,
based on such concerns as, file sizes, color depth, lossiness, security,
etc. In other words, whatever fits their needs for the goal they are after.

"dat", "art", "wad", "pak" and other files you might have seen are just
collections of files (often in the usual formats, pcx, jpg, etc), sometimes
compressed and/or encrypted, sometimes not. They make it more convenient at
load time since all the files you need are in one location, and in the case
of encrypted formats, they can help keep losers from stealing your sound and
graphics.

>How is it that graphics can be pulled from these .dat files? Is there a
>program that converts graphic file formats to .dat files? or .cfg? etc

There is typically a "grabber" utility, usually specific to the archive
format being used.

Allegro comes with a utility (actually called grabber) and a set of routines
for creating, manipulating, and using such archive files. Its well
documented and free to use. (and was likely responsible for the files you
saw)

>Similarily with audio files, I use either .wav or .mid but again in the
>real world they are obtained with .voc or .dat files.

Again, in the "real world" programmers use what fits their needs. voc is
just another file format, there are many utilities available to convert to
whatever format you want. Likely you can root around in any commercial game
release and find out that all those .zx3 files you saw are regular, run of
the mill bmp's or some other common as dirt format.

I don't know how you got the idea that the file formats you use determine
the worth of your software, but relax, no one actually cares what formats
you use,
they will care about the quality of the the game or whatever it is you are
working on. (With the sole exception that some formats are easier to pass
around due to
pre-existing libraries and such)

Good luck, and relax, it'll all be good.

------_=_NextPart_001_01C0B14C.658669F4
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2448.0">
<TITLE>Re: Data File Construction</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>&gt;At the moment, the way I import graphics in a =
program is by opening a</FONT>
<BR><FONT SIZE=3D2>&gt;.bmp, or and .pcx file. However, in the real =
world, programs do not</FONT>
<BR><FONT SIZE=3D2>&gt;import graphics via these formats, but with data =
files eg. graphics.dat</FONT>
</P>

<P><FONT SIZE=3D2>In the &quot;real world&quot; programmers choose many =
different formats for graphics, based on such concerns as, file sizes, =
color depth, lossiness, security, etc. In other words, whatever fits =
their needs for the goal they are after.</FONT></P>

<P><FONT SIZE=3D2>&quot;dat&quot;, &quot;art&quot;, &quot;wad&quot;, =
&quot;pak&quot; and other files you might have seen are just =
collections of files (often in the usual formats, pcx, jpg, etc), =
sometimes compressed and/or encrypted, sometimes not. They make it more =
convenient at load time since all the files you need are in one =
location, and in the case of encrypted formats, they can help keep =
losers from stealing your sound and graphics.</FONT></P>

<P><FONT SIZE=3D2>&gt;How is it that graphics can be pulled from these =
.dat files? Is there a</FONT>
<BR><FONT SIZE=3D2>&gt;program that converts graphic file formats to =
.dat files? or .cfg? etc</FONT>
</P>

<P><FONT SIZE=3D2>There is typically a &quot;grabber&quot; utility, =
usually specific to the archive format being used.</FONT>
</P>

<P><FONT SIZE=3D2>Allegro comes with a utility (actually called =
grabber) and a set of routines for creating, manipulating, and using =
such archive files. Its well documented and free to use. (and was =
likely responsible for the files you saw)</FONT></P>

<P><FONT SIZE=3D2>&gt;Similarily with audio files, I use either .wav or =
.mid but again in the</FONT>
<BR><FONT SIZE=3D2>&gt;real world they are obtained with .voc or .dat =
files.</FONT>
</P>

<P><FONT SIZE=3D2>Again, in the &quot;real world&quot; programmers use =
what fits their needs. voc is just another file format, there are many =
utilities available to convert to whatever format you want. Likely you =
can root around in any commercial game release and find out that all =
those .zx3 files you saw are regular, run of the mill bmp's or some =
other common as dirt format.</FONT></P>

<P><FONT SIZE=3D2>I don't know how you got the idea that the file =
formats you use determine the worth of your software, but relax, no one =
actually cares what formats you use,</FONT></P>

<P><FONT SIZE=3D2>they will care about the quality of the the game or =
whatever it is you are working on. (With the sole exception that some =
formats are easier to pass around due to</FONT></P>

<P><FONT SIZE=3D2>pre-existing libraries and such)</FONT>
</P>

<P><FONT SIZE=3D2>Good luck, and relax, it'll all be good.</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C0B14C.658669F4--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019