Today, while chatting up Cris on Messenger, he asked a question that I encounter quite often when reading about UDK stuff.
It's about the package system that the Unreal Engine is based upon, and below is a copy/paste of our conversation where I explain my findings as I've seen them documented around on the web.
If someone has a better answer or a good system of organizing your packages, please feel free to chime in!
Cris Robson says
where should I save the UDK map usually ?
Kenneth Pedersen says
normally under content, you'd create a directory with the name of your project, then in that directory create a folder called maps and save it there
all assets and whatever you use, you save under that Content/ProjectName/ folder
in packages
the whole packages concept is hard for me to get used to... Do you make a package for each asset, with textures, materials, etc - or do you make one package for meshes, one for textures, etc? It's entirely up to you, but I find it somewhat hard to keep it neat and organized
some people make one package for the whole damn project, then divide that package into categories, but that makes the package gigantic
but either way, a map will always be saved as a standalone package, so I believe most people use that map package to also save all assets tied to that map in the same package, and then make packages for the player, for enemies, etc
so when loading a level, it loads the map package plus any shared packages such as the player, weapons, etc so udk only loads the minimum required packages for each level
point is, don't ever save the player assets into a map package, because then you'd be forced to load the map package the player is in regardless whether the player is actually in that level of the game, resulting in maybe having 2 maps loaded into memory at a time
I think personally I'd save the assets specific to only tat particular level in the map package, then create a common package with whatever assets are needed regardlesss of what level you're in
takes a bit of planning ahead though
Cris Robson says
add that to the gamesdev post squire
en masse
Kenneth Pedersen says
most flexible way is to make a package for each and every asset, but that'd give you a crapload of packages
UDK as far as I remember uses a package for each asset
in fact let me check up on that, I'm having doubts all of a sudden
yep they use separate packages, divided into categories
with a shared category
like for example UDKGame/Content/UT3/Characters/CH_LIAM_Cathode.upk
and that package would then contain all assets required for the LIAM character
textures, meshes, etc
so to follow UDK's example you wouldn't save any assets in the map package, instead they have an extra package that contains all the assets for a certain environment - for example if a map is in a desert environment, it would contain assets from the desert environment package
means that level designers have to be a little careful because if you mix environments in a map (which is far from unthinkable - indoor/outdoor) you'd load 2 giant packages into memory, and perhaps only make use of 25% of the assets in each
lots of wasted memory
but I'm guessing Epic knows what they're doing
ah they're keeping the packages small, dividing each environment into smaller packages, such as Desert/Rocks, Desert/Floors, Desert/Flora etc