Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Don't forget to read Tuesday's email newsletter for your chance to win a free copy of Construct 2!


Organizing Assets


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Telios   Members   -  Reputation: 398

Like
0Likes
Like

Posted 06 October 2012 - 06:35 AM

Hiya,

I'm using a package file format to group assets together on disk, and I've been thinking about how to organize the various packages. I've come up with two ways of doing this, and I was hoping someone can suggest one over the other.

The first is to divide assets into actor packages and level packages. The assets for each actor can be compiled into separate packages, as they generally need to be loaded together. Each level (which references the actors it needs) can then also be put into it's own package, along with any 'per-level' assets (skyboxes come to mind). Shader programs are shared widely between actors (and even the GUI) and would probably needs to be bundled in their own package.

Game.exe
Shaders.pkg
/Actors
  Actor1.pkg
  Actor2.pkg
/Levels
  Level1.pkg
  Level2.pkg

The second is to divide assets into packages by type, e.g. Textures.pkg and Shaders.pkg. I could then use the game logs to (automatically) re-order the package contents in the order they will be loaded. A problem here might be that the game doesn't load in this way, by batches according to the asset type.

Game.exe
/Data
  Textures.pkg
  Shaders.pkg
  Materials.pkg

Any thoughts would be greatly appreciated!

Cheers.

Edited by Telios, 06 October 2012 - 06:43 AM.


Sponsor:

#2 Vodahmin   Members   -  Reputation: 233

Like
0Likes
Like

Posted 06 October 2012 - 12:01 PM

I think the more efficient approach would be to create a global package for all common assets (such as UI, background music, common texture/models etc.) and then unique packages for each level (such as cinematics and level-related actors, textures and sounds). The level-related packages could also contain AI scripts and level-related configs.

If you're planning to make your own memory-pool, you'll find this design to be quite straight-forward. After each level, you unload the entire package and load a new one, while still keeping all the common files in the memory.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS