Wow ... 10mb publish to GameSalad.com limit
micah
Member Posts: 85
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...
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
hopefully it will get included in the next update...
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!
Is there an easy way to fix the extra usage?
I hope it fixes this issue among the others (most especially the slow-downs/memory leaks - that just kills my productivity!).
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.