graphics question

Started by
4 comments, last by Sr_Guapo 18 years, 8 months ago
how do programmers tie in images and 3d models into the actual game code? is it through a dll or something? im asking this b/c when i download old game source code(doom, quake)there are no images or models included, yet you can actually build the project and play the game. how does this work?
Advertisement
Doom uses WAD files, which are essentially zip files - lots of individual files contained within one big file.
"Absorb what is useful, reject what is useless, and add what is specifically your own." - Lee Jun Fan
Data is not often tied into code. It is not a good practice to tie in data
with code. Most applications focus to be data driven and as such seperate data
definitions from code definitions. What happens is that code is inbuilt to parse
and load data from files and translate them into data that is usable by the game
itself. There are routines that will scan for files on the system or open
specific files that contain the contents. The routines to do this are located
within the source code. This is the reason you can build an executable and
dump it into a directory with the required data without requiring it in the
first place to perform a compilation. I hope this helps
Most current games will mash most of the data into larger files (.pak, .WAD, .dat, etc.) and unpack them while the games runs. This has multiple benefits for dvelopers: Fewer files to deal with, everything is in the same place, users cannot steal/edit the graphics as easily.
Sean Henley [C++ Tutor]Rensselaer Polytechnic Institute
so if i were to look in a game directory on my computer would see these pak, wad, or bsp files(depending on the game)?
Quote:Original post by rayce
so if i were to look in a game directory on my computer would see these pak, wad, or bsp files(depending on the game)?


yup...
Sean Henley [C++ Tutor]Rensselaer Polytechnic Institute

This topic is closed to new replies.

Advertisement