How best to manage video game resources.

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
User avatar
unholysavagery
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 73
Joined: Tue Oct 28, 2008 4:27 am

How best to manage video game resources.

Post by unholysavagery »

Well I have been using my own format that contains all of the data needed for a 3D model but I don't like the feel to this method. I have to create a flat panel for 2D objects and texture them. I want to have a separate interface for images so I would need to make separate files but I don't just want files that any random guy can view with photoshop.

My idea is to create a resource file which can hold all the data and you reference the stuff inside by name much like a C++ resource. I just want to know what you guys think is the best way to handle resources? If you were to use a game engine, how would you want it to handle them?
This is the internet, men are men, women are men and children are the FBI.
User avatar
avansc
Respected Programmer
Respected Programmer
Posts: 1708
Joined: Sun Nov 02, 2008 6:29 pm

Re: How best to manage video game resources.

Post by avansc »

i would keep it open, so people could edit it.
but have you ever thought of writing it to a binary file.

like if you make a class/structure that has the model data texture, animations whatever. you can make C/C++ write the entire class to a binary file.

then when you load the model, you dont load each individual file. you load the entire structure from your binary file.
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
User avatar
unholysavagery
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 73
Joined: Tue Oct 28, 2008 4:27 am

Re: How best to manage video game resources.

Post by unholysavagery »

avansc wrote:i would keep it open, so people could edit it.
but have you ever thought of writing it to a binary file.

like if you make a class/structure that has the model data texture, animations whatever. you can make C/C++ write the entire class to a binary file.

then when you load the model, you dont load each individual file. you load the entire structure from your binary file.
Already doing that, I want a standard format that I can put textures in, meshes with textures and shaders, audio files etc. I actually don't want to leave it open because if someone makes a game with my engine then the content they create is out there for anyone to take. I also have my own set of modeling, animation, drawing, scripting and mapping tools that are created in the engine.
This is the internet, men are men, women are men and children are the FBI.
User avatar
avansc
Respected Programmer
Respected Programmer
Posts: 1708
Joined: Sun Nov 02, 2008 6:29 pm

Re: How best to manage video game resources.

Post by avansc »

unholysavagery wrote:
avansc wrote:i would keep it open, so people could edit it.
but have you ever thought of writing it to a binary file.

like if you make a class/structure that has the model data texture, animations whatever. you can make C/C++ write the entire class to a binary file.

then when you load the model, you dont load each individual file. you load the entire structure from your binary file.
Already doing that, I want a standard format that I can put textures in, meshes with textures and shaders, audio files etc. I actually don't want to leave it open because if someone makes a game with my engine then the content they create is out there for anyone to take. I also have my own set of modeling, animation, drawing, scripting and mapping tools that are created in the engine.
im not sure what you mean when you say doing that already.

lets say you have a structure with modle, animation[1-10], texture[1-5], sounds[1-10].. bla bla bla.
you can write content creation tools,(basically just a program that loads all the files into an class/struction), then you write that class/structure to a binary file.
then once you have that binary file you can use it in your program.

i once made a space ship game in pascal way back. and i hade a seperate program called modelmaker, the model maker could load normal jpg files and could make verticies for the plane and i could move the textures around. then once i made the model id "export" ot to my secret format, which was just a binary representation of my ship structure.

then back in my main game i didnt need any of the jpg files i just had my spaceship.cft (i named it *.cft file for craft) files and when i loaded them all my texture were in them and all that.
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
Post Reply