Wow ... 10mb publish to GameSalad.com limit

micahmicah Member Posts: 85
edited November -1 in Working with GS (Mac)
I just updated Aeropack on GameSalad.com, but it took me a while to figure out how to cut the file size down from 12.6mb to under 10mb. When I did a web preview, viewed the source, and found where the actual game file was, my game was only 4.5mb. All my sound/music combined was 1mb, all my graphics combined was 3.1mb. The rest of it was just the game logic, the actors and scenes, which I can't really compress. Yet my project size was 12.6mb.

So after looking around in my project file a bunch, I found that by far the biggest file was a file called micah.guser, and it was 7.4mb alone. That's sort of ridiculously big when all my game assets combined are less than that. So I opened it in a text editor and saw it's a huuuuge incoherent XML file. Almost all of the lines were heavily indented too. So I tried removing all the tabs from the file to reduce the size, but that crashed my text editor. So I wrote a php script to do it for me:

<?php
$contents = file_get_contents("micah.gsuser");
$contents = str_replace("\t", "", $contents);

$handle = fopen("micah2.gsuser", "w");
fwrite($handle, $contents);
fclose($handle);
?>

After removing the tabs, the 7.4mb file was compressed down to 4.6mb (yes, that's 2.8 megabytes of tab characters, or about 2,936,012 tab characters. Maybe in the next GameSalad update when you save your project, it can remove all the whitespace from that file to save space?

After removing the tab files, my total project size was 9.8mb, and it let me publish to the web, without changing any of the game assets. Just thought I'd share...

Comments

  • StormyStudioStormyStudio United KingdomMember Posts: 3,989
    nice....very handy to know...

    hopefully it will get included in the next update...
  • TobyToby Member Posts: 478
    I've had that happen before, yes just edited the offending xml file and removed the gibberish. it was pretty big too. It's in the forums a while back.
  • BeyondtheTechBeyondtheTech Member Posts: 809
    Wow, I didn't even bother to check that before releasing my game. With all the heavy graphics and Actors set up, Spellcaster clocked in at 9.8MB, just under the 10MB mark to make it for immediate download from the App Store.

    I'll be sure to check it out, too. If I can shave off an extra MB or two, that would really go towards more graphics or music. Thanks!
  • butterbeanbutterbean Member Posts: 4,315
    yikes! Didn't know this was an issue, but I did notice that in Gamesalad, in the project page, the total amount of mb's used is never accurate!

    Is there an easy way to fix the extra usage?
  • BeyondtheTechBeyondtheTech Member Posts: 809
    If memory serves me, they've been pushing out an update about once a month at the end of each month... If that's the case, we should be "due" for one very soon.

    I hope it fixes this issue among the others (most especially the slow-downs/memory leaks - that just kills my productivity!).
  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,159
    @micah Thanks for your work, it seems that you have discovered a bug... the .gsuser file should not be counted or shipped with the final app, it just stores state for the editor. Feel free to move it out of the way before submitting.

    We'll be working on a way to compress all XML in the future, not sure if it will make our next release though. We'll have to double check, but I'm pretty sure this file is properly removed for iPhone projects.
  • JCFordJCFord Member Posts: 785
    Just also worth mentioning that I deleted sounds & images out of the app, but on opening the images and sound folder in the project there was old files still in there?
Sign In or Register to comment.