How do i compress my project size?

Get help using Construct 2

Post » Wed Apr 25, 2012 6:05 pm

@joeykid6 - did you know you can click on a frame and change its frame time in the property grid? E.g. a frame time of 2 means it's displayed twice as long as normal.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Wed Apr 25, 2012 8:54 pm

Thanks Ashley! That should go a long way toward solving the problem.
B
12
S
5
G
5
Posts: 26
Reputation: 4,001

Post » Thu Jul 26, 2012 7:53 am

On page 6 of the tutorial I posted that the .capx file is huge at 9.79 MB at this point and it is not even a working game.

Is this normal for C2? Should I be concerned of this file size when deploying to iOS and Android when this feature is added in r100?
B
28
S
4
G
3
Posts: 70
Reputation: 4,874

Post » Thu Jul 26, 2012 4:11 pm

the main problem you guys are seeing with the file size is from images and sound like Ashley mentioned. The only way around that is to either not save it as a single file (capx) or load the images from url at runtime

The rest is just text and text storage and size is pretty much completely trivial these days

Take for example my main project... Its 467 kb in capx right now but it can load and display an endless number of different maps each using upwards of 100 different full images not counting the frames of those images

Its that small because:
1 - it has no sound (yet lol)
2 - the map data uses only 1 layout thats cleared off and filled back up when needed. The map data is sent by php (almost "full" map is around 80kb)
3 - all the images needed by the loaded map are loaded from url. It knows what it needs to load from php
4 - only images needed for the entire game are saved in the capx. Stuff like UI and buttons... and some specific game sprites like the player

It works great so far but there are issues with it like making sure the images are loaded completely before using them. And thats somethin I still havent figured out Im gonna have to make a new thread about it...aridale2012-07-26 16:20:35
B
13
S
5
G
2
Posts: 306
Reputation: 3,262

Post » Thu Jul 26, 2012 4:17 pm

@jwjb: Image compression with C2.

As long as it is under the form of a capx, the projected size is not the final size of the exported project (just an approximation).
You can only really judge the size of a project on export, having made sure that the images in your project would be correctly set/compressed at export time.

Loading images from an url won't reduce the size of your project (because if you make it download 2Mo images, the size/download time is still the same).
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

Post » Fri Jul 27, 2012 1:40 pm

@Kyatric: This is good to know and will look to employ these compression techniques in a working game.

@aridale: Good to see this working for you and I do remember reading Ashley's post 'Optimisation: don't waste your time' with a lot of great pointers too.
B
28
S
4
G
3
Posts: 70
Reputation: 4,874

Post » Sun Jul 29, 2012 12:15 pm

@jwjb - the tutorial involves importing 144 tile images. These are all saved in PNG-32 format by default, and happens to be about 9mb worth of image data. You can delete the unused tiles to reduce the file size, but to keep the tutorial simple it doesn't discuss that. If you make your own game and only import images that are actually used, it will likely be a lot smaller.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Sun Jul 29, 2012 2:24 pm

@Ashley, thanks Ashley, that is a good point and I will definitely "clean up" the file before exporting to HTML5 for testing learning purposes for this 'How to make a Platform game' tutorial.

The other thing are all the other assets utilized from the free asset-bundle in the animations for the Player (Idle (10 images), IdleToRun (6), JumpFromRun (17), JumpFromStand (20), and Run (20)); SnailEnemy (16 images); etc.

For my games, I will have to delve more into how to design characters as simply as possible to keep their animation states as minimal as possible.

I did like the "Mirrored" technique employed in the 'How to make a Platform game' tutorial since you just have to mirror what you did on the right for the left which cuts the animation states down for all the states except for the Idle state I believe.
B
28
S
4
G
3
Posts: 70
Reputation: 4,874

Previous

Return to How do I....?

Who is online

Users browsing this forum: Artpunk, Braus, Kagubro, Mirlas, zeneizel and 20 guests