Sign in to follow this  

Turning gfx and sounds into 'resources'?

This topic is 4691 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey guys. I've downloaded a couple of games now to see how others are handling their textures and sounds for their games and some seem to have no actual texture pics or sound files! I've heard that you can turn those things into 'resources', but I don't know a whole lot about that. Do the textures and sounds get compiled into the game executable? Or do they get consolidated into a dll? Or something else? I know the pros about consolidating sounds and textures (can't accidently NOT install textures and sounds, hard to pirate sounds and textures, makes the installation cleaner, etc.), but are there any cons to turning sounds and textures into resources? Most of all, how do I do it? I'm still pretty new to C++ and DirectX coding, so you'll have to forgive me of my ignorance about 'resources'... But if somebody could teach me how to turn my sounds and textures into resources, that would be very cool! Thanks in advance for the explanation and help, guys!

Share this post


Link to post
Share on other sites
Sounds and textures ARE resources. So are fonts, meshes, data files, and anything else that isn't in the core game mechanics. You don't turn them into "resources". Because of the terminology confusion, I'm not sure what it is you are asking.

You can hide resource files in a variety of ways: You can pack them into a single file and just read off the file at a certain memory address, you can zip them into a compressed file, often with the extension renamed (.zip -> .mob for instance), you can hide them in the executable (messy but doable), you (i think) can tack them onto the end of the executable, and you can also produce them procedurally in some instance (dynamic generation of graphics and such).

Share this post


Link to post
Share on other sites
Thanks for the reply, leiavoia! Yeah, I know enough to be dangerous but I don't quite understand what all the terminology means (I just realized a couple months ago that I was using 'pointers' for over a year and didn't know that's what they were called - sheesh!).

I think the route I'd like to take for my game is the 'zip the files' idea... That's what Quake and a bunch of other games use, so I think that would be pretty cool for me to do too. Are there any tuts out there that teach how to pack stuff into a zip and then get your C++ game to use those files as thy're needed?

Thanks again!

Share this post


Link to post
Share on other sites

This topic is 4691 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this