Support PVR textures (or at least JPG)

bigleaphr

  • Posts: 188
2MB Image (1 BG and 1 Actor) creates 12MB SWF and 14MB APK - Barely 2 building blocks and no physics.

APK can be gotten away with. However the SWF should ideally be around 5MB. Not sure what the extra file size is for. Could it be different resolution images?

Another thing of note, when we created games in Adobe Flash Pro - resizing the browser auto resized the game. This does not happen in Stencyl SWF Files.

« Last Edit: March 04, 2014, 12:38:57 pm by Jon »

Jon

  • *
  • Posts: 17533
That's surprising - NME's generally been file efficient.

What are the dimensions of the image? Is it something crazy like 2048 x 2048.

bigleaphr

  • Posts: 188
The BG is a JPEG 1920x1280px = 2MB

The actor is a PNG 96x503px = 65KB

bigleaphr

  • Posts: 188
Tested this a little more. Created a new game

806x538px

Only 1 BG with no code: 315kb

Final SWF Size: 2.56MB

rob1221

  • *
  • Posts: 9474
Never, ever, use JPEG for Flash; use PNG instead.  I don't know about the other platforms though.

Jon

  • *
  • Posts: 17533
This is irrelevant to the original problem, but a 1920 x 1280 image isn't going to load on a fair number of devices (over the device's texture size limit of 1024 x 1024)

bigleaphr

  • Posts: 188
Your work around works perfectly though. I split a 1920x1280 image into 4 parts and it works. I tested on 3 android devices with resolutions of 480x320 and 800x480

However file size is a killer.

I tried with both JPEG and PNG for 1920x1280 game px (not image) build size is 12MB+

For 800x600 (both image and game px) build size is 2MB

So i am thinking it is because when i am creating the game at that resolution and not the image itself that is causing the bigger build sizes.

Any recommendations?

bigleaphr

  • Posts: 188
Any chance the file size issue will be fixed? I cannot have one level games at 12MB+ for flash. Else i will just build my games in a smaller resolution.

Thx.

coleislazy

  • *
  • Posts: 2607
I'm not really seeing what you're seeing. I have a game with most of the art assets in place (no sounds, yet), and the SWF is only 2.2mb total. In contrast, the .stencyl project file is 2.6mb.

bigleaphr

  • Posts: 188
I'm not really seeing what you're seeing. I have a game with most of the art assets in place (no sounds, yet), and the SWF is only 2.2mb total. In contrast, the .stencyl project file is 2.6mb.

What resolution is your game in? I think the big resolution is causing the large file size for me. Thx.

Jon

  • *
  • Posts: 17533
It'd probably help if one of us got hold of the asset in question. If it's a private thing, feel free to e-mail to either of us.

bigleaphr

  • Posts: 188
Here is the link to download the Stencyl Project File: bigleapstudios.com/beta/test.stencyl

Thx.

bigleaphr

  • Posts: 188
Think i found the bug by unzippin the HTML5 folder:

My original game was built 1x at 1920x1280

Then there is another set of assets at 2x for 3840x2560

Those should have been scaled down i assume?

Vik.

bigleaphr

  • Posts: 188
Hope that info helped. I hv deleted the files from my server now.