Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - sebastian

Pages: [1]
1
Support / platform sprites still loading into ram
« on: August 22, 2014, 01:56:29 am »
Thanks for all of your help Unikron.  Unfortunately have another question for you...

I've been trying to implement platforms on tk2d but my app still crashes cuz of memory pressure at startup on my nemesis, the iphone4s.

My platform setup and @2x and @1x textures work fine in the Unity3d editor. Textures switch great.

However, since the iphone4s is still crashing on me cuz of memory pressure when building in Xcode, I am fairly certain that somehow my larger textures must be getting loaded into RAM at startup-- despite the platform setting.

I suspect this is case because:

A) before implementing platforms, as a test I manually changed all of my tk2d atlas compression to 16bit from 32 and it loaded fine on the iphone4s

B)  i then implemented platforms which by my calculations should be much much smaller than simply changing from 32 to 16 (in fact my 2x and 1x textures are ALSO set to 16bits as well as being physically smaller)

C)  I'm certain I'm switching the tk2d platform before a single sprite loads.  I even went so far as to add a blank scene to the very start of my app that ONLY has: tk2dSystem.CurrentPlatform = "1x";
My debug verifies that I am indeed using the 1x platform at the very start of loading.

However I'm still getting memory crashes on startup.

Could this be because I *started* my sprites with a default size of 4x?

So maybe the default 4x has to load initially before then switching down to 1x?

I'd clarify that while some of my tk2d sprites are being loaded as prefabs, some are just sitting in my scene #2 hierarchy.  So I'm assuming maybe those 4x textures load and hit ram somehow before getting a chance to switch to 1x?

Thanks very much for your great support and ongoing help!!

Sebastian

2
Support / platform specific compression swap
« on: August 20, 2014, 08:47:25 pm »
Hi Unikron--

Thanks agin for your awesome toolset.  Apologies for my latest string of questions-- I'm implementing platforms and want to make sure I get it right.

I've had success implementing @2x and @1x platform sprites starting with a @4x default.  However I have some sprite sets where the quality is just too poor to use smaller sprites.  I had a thought that maybe I could use the same sized artwork for my @2x and @1x platform sets, but then change the compression setting of the atlas texture afterwards to still get some platform specific mb savings.

When I tried this, the @2x and @1x sprites were out of alignment in gameplay.  It seems that tk2d is automatically resizing/reposition platform sprites even if the artwork is actually the same size?

If this is the case, is there a way to accomplish what I'm trying to do-- have an identically sized atlas for a different platform that is just set to a different compression setting?

The goal would be to load the platform specific compressed atlas at startup to save on mb for those older devices.

Thanks for any thoughts!
Sebastian

3
Support / too many textures for atlas size when adding platforms
« on: August 20, 2014, 04:52:56 am »
Hi-- had a follow up question on adding platforms.

I had everything working perfectly with large resolution textures in tk2d.

Now I realize I need some lower rez platform specific sprites and am implementing @2x and @1x textures.

However, when trying to commit some of these tk2d collections I'm suddenly getting "Unable to fit textures in requested atlas area.  There are too many textures in this collection for the requested atlas size."

Can you explain to me why this would be?  Odd given that the large platform sprite sheets built and worked fine.

I've found that if I add dicing to my sprites I can work around this error.  However, I'd like to avoid dicing if possible-- plus everything was all set up and working nicely at @4x.

Is there a reason that adding smaller resolution platforms with smaller textures requires dicing to fit, while the large textures fit fine without the smaller platforms?

Thank you for your help!
Sebastian

4
Hey there--

So late in the game I've decided I needed to implement tk2d platforms.  What an AMAZING feature-- thank you-- it's really gonna save my butt for getting my app to run on older devices.

However, in early tests I've found that adding platforms to my sprite collections then gives me a "An invalid sprite collection has been found in the selected clip. Please correct this in the inspector" error when I load tk2d SpriteAnimations that reference the original clips.

I'm not seeing how to 'correct this in the inspector'.  I've tried dragging the new sprite collection prefabs into the animation window-- restarting unity-- rebuilding the tk2d index... 

Is there a workflow for this error?  I have a ton of spriteAnimations already built so I'm really hoping I don't need to recreate them all with the new platform specific sprites...

Thanks for your help!
Sebastian

Pages: [1]