Jump to content
  • Advertisement
Sign in to follow this  
uncle_rico

How do game developers normally load bitmaps?

This topic is 4829 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

Is it from a file or from a resource? And if it's from a file, do they make their own binary file format or do they use standard .bmp, .jpg, etc.? And if they use their own binary formats, do they typically put ALL of their images (textures, sprite templates, etc.) into one huge binary or what? The reason I ask is that it seems to make the most sense to just use resources. However, during my Google/MSDN study of DirectX, it didn't seem possible to load an image from a resource without invoking GDI through the Direct X interface. Maybe that's how it is normally done, I dunno. Maybe there are a plethora of ways that developers do it. It seems that, if I just loaded a .bmp or a .jpg or any other format that could be easily edited by a graphics program, then any idiot with access to MS Paint could really mess the game up for themselves (though it would be cool to have a game where the user could edit the textures, that would be a novelty that I would rather not have in most of my games). So anyway, this option seems like the least-desireable one.

Share this post


Link to post
Share on other sites
Advertisement
Well you seem to actually understand the situation pretty well. You, as the developer, get to decide what you want to do. If you don't care at all if the user edits the original game material then go ahead. You may also learn something kin to the pak format used by id software or even design your own file format. Or you could encrypt the data and when you read it decrypt it in the code. Different games use different ways to store information and whichever way the developers feel is best goes.

Just remember that anything you try to prevent people from accessing your files is ultimately futile to a dedicated person so don't put too much effort into hiding stuff.

Hope that helps.

Share this post


Link to post
Share on other sites
Thanks for the advice. I guess I never looked at the files that comprise the games I play. I don't suppose there is any way to make a file read-only in a way that the OS will strictly enforce, is there?

Share this post


Link to post
Share on other sites
Quote:

I don't suppose there is any way to make a file read-only in a way that the OS will strictly enforce, is there?

I don't think so, least not in Windows. However, I heard about secure OS's that have this feature, but I don't know too much about this.

Share this post


Link to post
Share on other sites
There isn't anyway to do that. You might want to consider why you are concerned with people editing (or even stealing) your art. If your making solo projects for fun anyway.. it's flattery IMO that someone actually enjoys your game enough to mod it... even if you don't agree with the mod. (Stealing is a different story but generally such thieves are programers looking for mockup art and very few would release a final game with unauthoritized artwork ripped from other games.

In the end there are very few reasons for you to stop people from editing/viewing art in an open format.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!