Domanda

So now i'm working in ogre, trying to make a game. But my question is quite simple.

When Ogre loads a file, it then puts it in an so called Entity objects. I had an idea where i would load all my resources in Ogre, and then serialise them, and store it all in one file, so i could later just load them as binary code in the actual game.

My question is if this method would be faster than always loading the actual files. I do mention that i work in scenes, so that not ALL of the resources are loaded in at once ofcourse. Thanks for your help.

È stato utile?

Soluzione

Games often have own resource system. Instead of loading individual files (jpg textures, png images, mp3 files, ogg files, meshes) they pack all of those data into some "smart" file. It is a middle layer.

1. orginal files (models, textures, entities) -> pack into "game_resource_file"
2. load "game_resource_file" in game

Answer to the question: yes it should make loading faster.

But there are some flaws: as you see you need at least two steps to have a resource in your game. When you change one texture (out of 100) it can take long time before you can see it on the screen. You have to take that texture, rebuild your resource file and then load in the game. Without that you simply load a changed texture in the game directly.

This resource pipeline problem is very important and can save (or add) large amount of development time.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top