Jump to content
  • Advertisement
Sign in to follow this  
Nickie

Packing The Game Resources

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

So I've started coding my last project before 2 weeks. I'm currently close to the finish(at least the basic view of the game) and I started wondering how shoud I pack my files. I was going to use zip archives but I tough everyone can open and touch my game assets. Any suggestions?
If custom format, any adviced on the compression?
I've got such problem for first time so some additional information:
Game assets per level: around 40 mb
Texture format: JPG
Sound format: WMA
Geometry: .X (Its not the best chocie but I dont really need something special)
Lua scripts: .lua ( xD )

Share this post


Link to post
Share on other sites
Advertisement

Texture format: JPG

Use a loss-less compression format like png or save it directly in dds.


Sound format: WMA

ogg-vorbis


Geometry: .X (Its not the best chocie but I dont really need something special)
Lua scripts: .lua ( xD )

Zip is ok as data container, and deflate as compression for such files.

I was going to use zip archives but I tough everyone can open and touch my game assets. Any suggestions?[/quote]
If someone want to get his hands on your asset, there will be really no way to stop him from doing it. So, just use some very basic encryption like xor to feel better. You can extract almost every asset from virtually every AAA game around, still you don't see a lot of abuse, because the best protection of your art is still your copyright. Edited by Ashaman73

Share this post


Link to post
Share on other sites
I am not so sure.

  1. PNG is lossless but do not misunderstand that DDS is lossless. While DDS is just a container format, usually it is associated with S3 compression which is lossy, so anyone telling you to use DDS is asking you to use lossy compression.
  2. No games use .X as a native format, and security is but one of many reasons. Compression is not security. All games use their own proprietary format and you will be able to make your own as well. Instead of security, the reason most game companies use their own model formats is because they can control what data their model files contain. This is particularly important, since it does not make sense to keep data that your engine can not use, while at the same time it makes sense to be able to add data that your engine could use in the future. You need flexibility and thus you need your own format.
  3. Copyright has no meaning to anyone until sent a cease-and-desist order. It is not possible to count the ways in which Super Mario World has been violated, etc. Usually no lawsuits take place, but that does not mean ripping and stealing of assets is not taking place.


L. Spiro Edited by L. Spiro

Share this post


Link to post
Share on other sites

No games use .X as a native format, and security is but one of many reasons. Compression is not security. All games use their own proprietary format and you will be able to make your own as well. Instead of security, the reason most game companies use their own model formats is because they can control what data their model files contain. This is particularly important, since it does not make sense to keep data that your engine can not use, while at the same time it makes sense to be able to add data that your engine could use in the future. You need flexibility and thus you need your own format.


This is pretty much the biggest reason to use your own formats in my opinion. What you should really be caring about is how fast the file can load up and how small it is. For example, XNA uses .xnb which is just a simple binary format designed to be as close to the runtime representation as possible while cutting out as much extraneous information as they can. You probably would want to make some kind of management system that can handle the serialization and loading of this format at runtime (think ContentManager for XNA).

The guy who works one Tesla Engine goes over his binary serialization at his web site, and it is a very good description of how you would typically go about rolling your own content pipeline system.

Share this post


Link to post
Share on other sites
Yeah I agree.
The problem is that the project is really large, at least for one programmer. I also don't have any experience in programming at all. I mean I'll be 10th grade after 2 months. So I can't predict how much time I will need to do something. Also my artists are working hard and I need to catch up. A friend of mine at the engineering school is studing mainly reverse engineering and is cracking games so I already know I can't protect my assets. I jsut didn't expess what was in my mind. My question was about how to compress the files and it was answered. Thanks for the replies.

Share this post


Link to post
Share on other sites

It is not possible to count the ways in which Super Mario World has been violated, etc. Usually no lawsuits take place, but that does not mean ripping and stealing of assets is not taking place.

Yes, but it doesn't matter at all as long as no-one go and make a commercial product based on this art assets. Copyright is not the best protection, but you get the most out of it with the least effort of protecting it.

A simple, valid protection mechanism could help to sue someone ripping and using your art assets from a legal view, but investing too much efforts in some clever protection mechanism is most likely not worth it.

Share this post


Link to post
Share on other sites
PNG is lossless but do not misunderstand that DDS is lossless. While DDS is just a container format, usually it is associated with S3 compression which is lossy, so anyone telling you to use DDS is asking you to use lossy compression.


To expand on why you want to use either lossless formats or lossy S3, but not other lossy formats:
While a jpg file is smaller on disk, when sent to the graphics card it is expanded into a bitmap, so you lose the primary benefits of the compression. You get a worse looking image that takes up the same amount of space in VRAM.
A lossless format is better, because you still get smaller file sizes (but again it is expanded to a regular uncompressed bitmap in VRAM), but no loss in quality.
S3 is special because even though it is a lossy format, it is supported by hardware and doesn't have to be expanded into a bitmap. So you get a huge size reduction compared to lossless compression, and you get to carry these size reductions into VRAM. Textures make up quite a large portion of VRAM budgets, so being able to cut your texure memory usage by as much as 75% with almost imperceptible loss in quality is quite nice. You also get better performance because the texture cache can hold more of a texture, and the memory bus has to work a lot less to transfer textures to the graphics card.

No games use .X as a native format


I was quite surprised a few months ago when I was randomly browsing through a medium-budget game's directory and discovered a bunch of loose .X files. I tried to load them in some of my own code, and sure enough, they were models biggrin.png

I just wish I remembered what game it was... Edited by turch

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!