How to Make Your Games Smaller
Author: | RapidFlash
|
Submitted: | 20th June, 2003
|
Views: | 5347
| Rated: |
|
|
Here are some tips to cut down on the filesize of your game (if you really want to).
They are:
#1: Crop (or shrink) your images
I cannot stress this enough. This technique literally is the best way to cut down on
app size. It has reduced megabytes off some games, and even if it doesn't do that it
will almost surely take off 100kb off your game, if not more.
A tip while cropping: Be sure to finish all your sprites on that object before
you crop it. After you crop the object ( all of it ), set the hotspots and action
points. Do this before you code special placement events on your object.
NOTE: In MMF it's called cropping, in TGF it's called Shrink ( button with a
box with four arrows pointing at each side of it ).
#2: Reduce your sound quality
This also helps chop off some kilobytes. Keep in mind: the lower the quality, the less
space it takes up. I'm not saying to turn a 44.100kHz 16-bit Stereo sound into an
8.000kHz 8-bit mono, but you could turn that into an 44.100kHz 8-bit stereo ( which
saves 86kb a second in .wav format [not including MMF's compression] ) You can
also reduce the amount of time your sample runs by cutting off spaces that have no sound
in them or sound that's very faint.
If sound is critical in your game then I do not recommend doing this ( much ).
#3: Get rid of useless objects and lines of code in your level
This one could possibly get rid of a lot of space. It does seem obvious, but then, a
lot of people don't really do this too much. Remember: Every object takes up space and
processing power. So do useless lines of code.
For useless objects, see if they are ever used in the level. If not, delete them ( this
probelm occurs a lot with level re-use ).
Useless lines of code are a hassle, but if you really need to cut space, then this is a
good idea. Many levels have the possibility of having repeat statements ( especially
Always or Start of Frame statements ), and it's best to put the actions in that line
to another repeat line and then to delete the previous part of code.
#4: Shorten the name of your objects
This is if you really need every last bit of space. Every letter is 1 byte, and an
object with the name of Abcdefghijklmnopqrstuvwxyz has 26 bytes for the name, compared
to an object named abc, which has 3 bytes associated to the name. If you use that
object a lot eventually those bytes will pile up ( depending on how many levels ). This
is really just a solution that will shave a maximum of a few kilobytes of your game.
Well, there you have it: how to crop down your application's size!
|
|
RapidFlashSavior of the Universe Registered 14/05/2002
Points 2712
|