Packaging (under Linux and Windows)

This is a discussion on Packaging (under Linux and Windows) within the Game Programming forums, part of the General Programming Boards category; What is the best way to pack binary data (textures, polygons, sound, all of it) and executable code? The packing ...

  1. #1
    Registered User
    Join Date
    Jan 2004
    Posts
    3

    Question Packaging (under Linux and Windows)

    What is the best way to pack binary data (textures, polygons, sound, all of it) and executable code?
    The packing itself is not the problem, but loading the code,....

    I can only think of generating "fake" c++ code containing all the data and than load it up as a normal dynamic library.

    Or not packing them and putting all the code in a library and the rest in a normal data archive.

    Also, I'm not realy interested in windows dll's but in Linux dynamic libraries (.so)

    Can anyone tell me how much dynamic linking slows a program down? What are the factor's involved in it? And how slow/fast can packed files be read and what's involved in that. The same about compression.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,832
    Why not do the same as DOOM?

    You have doom.exe containing all the code
    You have doom.wad containing all the data
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Jan 2004
    Posts
    3
    I could do that, but I mean to make a highly customisable system out of dynamic components. I don't know about doom, but I don't think it had a lot of object specific rendering.


    But still it is not a bad idea. Generating pairs

    thanks

    (more ideas welkom)

  4. #4
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,598
    DLLs are just like exe's except that they differ by one important byte.

    You could make a DLL loader or any type of loader for that fact as long as you have a place in memory to load it into. You could dynamically load code, graphics, sounds, etc. However, I recommend loading all graphics, sounds, textures, polies, etc. in the loading section of your game. At least load everything pertinent to the current level. The framerate demands of consumers today warrant that you must have everything pre-loaded or write a very clever way to load on the fly w/o taking framerate hits. The latter is very complex so I recommend the former.

    Load it all since memory is not a big concern today. Allocate the memory from your OS, stuff it with your data, and retrieve it later.

  5. #5
    Grammar Police HybridM's Avatar
    Join Date
    Jan 2003
    Posts
    355
    Slightly off-topic, but although the game was rather crap in terms of plot, Dungeon Siege loaded everything on the fly except an initial load which wasn't too long of a wait.

    I found that quite impressive and wonder how they did it.
    Thor's self help tip:
    Maybe a neighbor is tossing leaf clippings on your lawn, looking at your woman, or harboring desires regarding your longboat. You enslave his children, set his house on fire. He shall not bother you again.

    OS: Windows XP
    Compiler: MSVC

  6. #6
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,738
    just whatever you do...make your file format nice and simple....string parsing is a pain....
    My Website

    "Circular logic is good because it is."

  7. #7
    Registered User
    Join Date
    Jan 2004
    Posts
    3
    I want to try loading most of the stuff on the fly. It is possible, so why not? Frame rate demands are high, detail levels too, but CPU's and GPU's are growing rather huge. If the GPU does the rendering and the CPU can in the mean time start loading resources? If the process starts a long way before you reach the level border, the system should have time to load all data (into system mem and into the graphic card's mem and slowly compile the graphics, so the process doesn't (visualy) kill the frame rate).

    It should be possible to get it finetuned?

    And if not, too bad, than I'll just have to load level by level.

    (and about file formats: I don't even think about string parsing: an ordered binary library, so a recource block can be buffered and read easy and at once and than just pumped into the right objects. All resources uncompressed ofcourse, on the fly decompression is a bit to mad, even for me)

  8. #8
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,598
    Loading on the fly is a mistake. Period.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Port app from Windows to Linux
    By BobS0327 in forum Linux Programming
    Replies: 12
    Last Post: 02-12-2006, 02:35 AM
  2. linux and windows lookup host processes
    By Lynux-Penguin in forum Tech Board
    Replies: 0
    Last Post: 09-01-2003, 12:54 AM
  3. Linux for Windows!
    By Strut in forum Linux Programming
    Replies: 2
    Last Post: 12-25-2002, 11:36 AM
  4. Linux? Windows Xp?
    By VooDoo in forum Linux Programming
    Replies: 15
    Last Post: 07-31-2002, 09:18 AM
  5. Linux Under Windows
    By Strut in forum Linux Programming
    Replies: 3
    Last Post: 05-27-2002, 09:09 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21