Author Topic: Advice on how to keep the Game File size small  (Read 2599 times)

Tamatou

  • Wannabe
  • Posts: 43
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Chrome 46.0.2490.71 Chrome 46.0.2490.71
    • View Profile
  • Playstyle: Gamepad
Advice on how to keep the Game File size small
« on: October 15, 2015, 08:33:29 PM »
Hello my dear Fellows!

The amount of reactions to my Fangame really got me motivated and got me to start working on the sequel.

But I don't wanna make the same mistakes twice.
As you might know my first fangame's file size was insanly big. About 250 Mega Byte if I remember correctly.
Near the end of development the game constantly got me "Out of Memory" Error Messages and it was just a pain carry on finishing the game.

So what are the things I have to watch out for keeping the file size minimal?
I'm using Nikaple Engine this time (wich is really really awesome)

Don't be afraid to go into detail  :atkHappy:
Stuff I've been told to do + questions
-Loading Sprites and Music externally (does this aply to every single sprite I put in the game or only the really big ones?)
-Is it recommendable to use MP3 insted of WAV and something other than Bitmap for sprites?
-When using really big sprites that cover the whole screen, should I scale these sprites by code and have the actual sprite smaller?

Thank you in advance  :atkLove:
From Austria with Love <3

kilgour22

  • Cherry Eater
  • Posts: 82
  • OS:
  • Windows 10 Windows 10
  • Browser:
  • Chrome 45.0.2454.101 Chrome 45.0.2454.101
    • View Profile
  • Playstyle: Keyboard
Re: Advice on how to keep the Game File size small
« Reply #1 on: October 15, 2015, 08:57:22 PM »
Use an engine that loads music externally.
Don't let a spike ruin your day.

Arclooper

  • Wannabe
  • Posts: 26
  • The plot chickens
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 41.0 Firefox 41.0
    • View Profile
  • Playstyle: Gamepad
Re: Advice on how to keep the Game File size small
« Reply #2 on: October 15, 2015, 09:11:57 PM »
In general, anything you can use code for instead of resources, do it with code.

Afaik without extensions gamemaker had issues with playing multiple mp3s and oggs at the same time, but never use .wav for your bgm. If you want real optimization for sound, look up zanto's method in IDWBA2, that game is really well optimized in that regard, although for your usual fangame that's not really needed, just choosing the type of sound file carefully should suffice :o

Try to learn a lot about the draw functions though, they can save you quite a bit in sprites if you know how to use them well, like not having to do different sprites for an HP bar that changes color or basic examples like that (I'm not good with gml so I can't give you fancy examples :p but you get the idea)

Derf

  • Guest
Re: Advice on how to keep the Game File size small
« Reply #3 on: October 15, 2015, 09:22:21 PM »
You don't really need to bother externally loading sprites unless they're multiple megabytes in size & you should only externally loads songs not sound effects.

No need to use WAV, just use mp3 or ogg. You need extensions to play ogg files in GM8/8.1 though, but you don't for mp3. You can only play one mp3 at a time so all sound effects should be WAVs and all songs mp3s.

If it's like a blackout then yeah. But you really should just use the draw functions for things like that. If it's a sprite you can't use the draw function for and it doesn't look horrible if it's scaled then yeah just scale it.

Tamatou

  • Wannabe
  • Posts: 43
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Chrome 46.0.2490.71 Chrome 46.0.2490.71
    • View Profile
  • Playstyle: Gamepad
Re: Advice on how to keep the Game File size small
« Reply #4 on: October 16, 2015, 07:13:22 PM »
Thank you for your Advice so far.

I've never used the Draw Function so far. But it seems this function is pretty imprortant. I haven't really looked into it on how to use it and what to use it for. But I'll will try my best to get the hang of it.  :atkHappy:

The second game will feature ALOT more Dialoge and Cutscenes. These might be a problem memory wise.
Overall the second game will be about 5 times bigger than the first
From Austria with Love <3

Tamatou

  • Wannabe
  • Posts: 43
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Chrome 46.0.2490.71 Chrome 46.0.2490.71
    • View Profile
  • Playstyle: Gamepad
Re: Advice on how to keep the Game File size small
« Reply #5 on: October 18, 2015, 07:26:14 PM »
So it turns out more than 75% of my first game was only the music. There were only like 5 songs but they were in WAV.

But even without the music the first game was 50 Megabyte wich is just too much.

2 Questions regarding sprites:
-Does unsing a Tile Set help? Or should I just create a new sprite for every block like I did in the first game?
-When importing Sprites, is PNG a better choice then Bitmap?

Thank youu <3  :atkLove:

Edit:
Also doesn't unsing a Sound Engine make the whole music problem obsolet?
Or does it still matter not using big WAV Files even with externally loading them with a Sound Engine?
« Last Edit: October 18, 2015, 07:30:01 PM by Tamatou »
From Austria with Love <3

Arclooper

  • Wannabe
  • Posts: 26
  • The plot chickens
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 41.0 Firefox 41.0
    • View Profile
  • Playstyle: Gamepad
Re: Advice on how to keep the Game File size small
« Reply #6 on: October 18, 2015, 07:51:24 PM »
For tilesets, it does help in working with static things like the blocks you stand on, but I'm not sure if it makes any relevant difference in size, and afaik PNG is better. You want to use separate sprites for things you want to use as objects though :o

And the thing with externally loading is that it makes your exe lighter, but you still need the actual sound file to go with it, so the file size in the rar would still be affected by using wav instead of a compressed format, so stick with using mp3 or other formats like that for the bgm.