Jump to content

  • Log In with Google      Sign In   
  • Create Account

Packing The Game Resources


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
7 replies to this topic

#1 Nickie   Members   -  Reputation: 322

Like
0Likes
Like

Posted 10 July 2012 - 02:43 AM

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 )

Sponsor:

#2 Ashaman73   Crossbones+   -  Reputation: 7555

Like
2Likes
Like

Posted 10 July 2012 - 03:54 AM

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?

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, 10 July 2012 - 03:55 AM.


#3 Nickie   Members   -  Reputation: 322

Like
0Likes
Like

Posted 10 July 2012 - 03:57 AM

Thank you for the answer.
It Helped me a lot :)

#4 L. Spiro   Crossbones+   -  Reputation: 13617

Like
2Likes
Like

Posted 10 July 2012 - 10:06 AM

I am not so sure.
  • 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.
  • 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.
  • 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, 10 July 2012 - 10:06 AM.

It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

#5 M6dEEp   Members   -  Reputation: 892

Like
1Likes
Like

Posted 10 July 2012 - 10:43 AM

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.

#6 Nickie   Members   -  Reputation: 322

Like
0Likes
Like

Posted 11 July 2012 - 02:49 AM

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.

#7 Ashaman73   Crossbones+   -  Reputation: 7555

Like
1Likes
Like

Posted 11 July 2012 - 03:16 AM

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.

#8 turch   Members   -  Reputation: 590

Like
1Likes
Like

Posted 11 July 2012 - 08:12 AM

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 Posted Image

I just wish I remembered what game it was...

Edited by turch, 11 July 2012 - 08:16 AM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS