Sign in to follow this  
The_White_Shadow

Questions about programming in XNA and asset sizes

Recommended Posts

Me and some friends are trying to make a game in XNA. I'm the background artist, so I want to mention ahead of time that I'm not the programmer nor do I know much about programming. We have only one guy doing our programming and I've got some concerns over whether he's doing things right or not.

The reason why I'm concerned is because we first decided to make all of the assets (i.e.: all of the artwork, music and sfx), and get it all ready for the programmer to put together. All of the artwork was made into PNG files and all of the music and sfx were made into MP3s. When we were done with everything, altogether they came out to about 30MB. Our goal is to keep the game under 50MB in size when done.

My concern is that we gave all of this to our programmer and he's been putting it together. He's not finished yet as he still has to incorporate things like the weapons and attacks. Yet for some reason the size of the game is now around 340MB. I'm trying to wrap my head around how 30MB of assets turned into a 340MB not yet complete game. After speaking with the programmer he told me that he had to convert the PNG files into XNB files and the MP3 files into WMA files. According to our programmer, this is mainly what caused the hike in size. I'm trying to find out if all of that is really necessary or is he doing something wrong.

Share this post


Link to post
Share on other sites
It sounds like he's on the right path, but there are a few things to keep in mind regarding size:

1) For textures, you can get a HUGE win by making sprite sheets that are powers-of-two in size (512x512, 1024x1024, etc) and using DXT compression. In XNA Game Studio, you can simply change a parameter on the processor for a texture to enable this. That should give you quite a nice bit of size saving.

2) In debug builds, XNB files are not compressed. If he builds in release mode, you should see a decent reduction in size from XNB compression.

3) If your 50MB target is for Xbox LIVE Indie Games, know that the 50MB restriction is on the CCGAME you submit. He can generate one of those by right clicking the project and choosing the "package as ccgame" option. The CCGAME has compression as well so you can usually fit a good amount in there.

Share this post


Link to post
Share on other sites
Hello.

A cool tool for audio that might help you is XACT (Cross-platform Audio Creation Tool). It comes with visual studio, it's really easy to learn how to use (google xact tutorials) and has different options for audio compression, which might help cut down on the size.

I just learned how to use it, and I'm liking it a lot.

Hope that helps!

Share this post


Link to post
Share on other sites
For audio it is best to keep your sound files as uncompressed .WAV files not .MP3 and use the compression in XACT to reduce the size of the sounds (generally I only compress music and leave sound effects uncompressed). I've used this on released an Xbox Indie game, also agree that the CCGAME is what to do your judgment on, the debug XNB textures aren't compressed and thus huge.

Share this post


Link to post
Share on other sites

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