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 - 39thstreet

Pages: [1]

Hello.  Having a bit of a problem with how best to handle our project which is going to be making significant use of asset bundles.

I have a 2dtoolkit project where significant portion of the game will be downloaded via scene assetbundles and separate object asset bundles.  I need to support 2x and 4x assets.

My original plan was to sacrifice size for convenience and include both in the asset bundles and let the sprite collections automatically take care of the 2x/4x decision.     But I do realize this is inefficient and more importantly based on tests and other threads here, platform sprite collections just don't work with asset bundles. 

So instead I made a separate sprite collection for each size, MyCollection2x and MyCollection4x.  Now what?  Two copies of every scene in the game?  Dynamically update the references in an export script and then save out 2x and 4x versions of my entire project?  Or just grab one copy and then update the references at runtime?   Every approach feels clunky.  What do other people do here?

Thanks in advance.

Support / Issues with platform settings in project upgrade to 1.80
« on: November 08, 2012, 06:21:34 pm »
I'm trying to upgrade my project to 1.80 and I can't seem to get it working correctly.

First off: have to say I'm loving the design of the platform settings, really flexible, 2dtoolkit continues to impress.  Now if I only I could figure out what dumb thing I'm doing wrong!

I updating my existing collections as defaulting to 2x, with 1x as the other platform.   The collection set up worked perfectly, all my low res assets got loaded and everything looked perfect in the collection data.

Now, when I try to test the game with the preview window set to 480x320 it does not work correctly.  Here is what I'm seeing:
1. tk2dSystem.CurrentPlatform correctly gets switched to 1x.
2. The game loads the low res/1x versions of my assets correctly as well.
3. Here's what it breaks down -- all the 1x assets appear to be scaled up to be the same size as the 2x assets.  In other words, in the 480 by 320 window I see only a small crop of my scene with blurrier assets.   

Obviously what I'd expect to happen here is that the 1x assets would show at their native resolution and fill the 480 by 320 window in the same way the 2x assets fill the 960 by 640 window.

Any idea what I might be doing wrong here?  I'm not using any resolution overrides or doing anything else odd with the tk2dcamera as far as I can tell.

Support / Memory Leak (inconsistent), would love some help!
« on: October 02, 2012, 07:24:36 pm »

Having a real beast of an issue with my game.  It works 99% of the time (like, seriously, I can play for hours and hours with no issues).   Yet on a handful of occasions I've had a weird error pop up, it's happened on both my platforms (Android and iOS), so it does not appear to be platform specific.

The Game Structure
Our game has 6 scenes that are loaded and unloaded in a semi-random order. When transitioning between a transition screen covers the game (this is a persistent GameObject with a DontDestroyOnLoad). This transition destroys all the elements of the previous scene, then calls the following inside a Coroutine:
Code: [Select]
AsyncOperation asyncunload = Resources.UnloadUnusedAssets()
yield return asyncunload;
async = Application.LoadLevelAsync(nextId);
Once that async is done, the transition hides itself and the next scene is played.

The Problem
Very rarely (as mentioned, has happened maybe 8 or 9 times out of hundreds and hundreds of scene transitions), the transition animation will slow to a crawl.   The transition normally takes 2-3 seconds, but once the bug hits it will take 10-20 seconds.   Once the transition is done the game seems to play perfectly fine (crazy, right?), but when the next transition comes up the slowness will return.

Memory Checks
I added a TON of debug code to try and isolate the issue.  This has revealed the following:
-We haven't been able to pin down the problem as associated with any particular one of our scenes, although it may be.
-There appears to be a weird memory leak.  When the game is working normally, right after the UnloadUnusedAssets() we get a System Memory in Use: 3.0mb -- again it will show right around 3mb every time after every game for hundreds of plays.   

When the game starts messing up, this System Memory in Use goes up!  e.g. System Memory in Use: 17.0mb or higher.   In other words, it sure looks like memory is not being cleared.  Sometimes it will fall back down to 3.0 after the bad transition, other times it will stay at this high level through more transitions. 

The really bad part is when it sticks like that, because the game appears to be totally broken (20 second transitions every time), and the only way to fix it is to force quit the app (something many Android and iOS users have no idea how to do).

That's about all the information I have so far, any advice on what this might be or ideas on how to isolate the issue would be immensely helpful.  We were hoping to launch this week  :-\


We just launched our first Unity / 2dToolkit app.  I realize it's a kids app, so doesn't have the appeal of a general audiences game, but at the risk of a little shameless self-promotion, it's probably one of the more popular apps released to use 2dtoolkit.   Monkey Math School Sunshine has been a best seller (consistently in the top 200 overall games, and top 20 kids games) on iOS for a year or so now.   

We were really pleased with 2dtoolkit.   Looking forward to getting more of our apps in Unity and seeing how 2dtk develops!


We're still soft launched now (haven't done any promotion), I like to do that to see what bugs shake out before we start advertising.

Support / Duplicating Sprite Animations
« on: July 13, 2012, 07:06:01 pm »

Is it possible to duplicate sprite animations?  I have several animations which are very similar, and would like to duplicate them and just change the included sprites.

However, when I do this, the new copied animations are not visible from my animated sprites.

Any idea how to fix?

Support / Animation Timing and Animation Editor
« on: April 27, 2012, 10:57:46 pm »
What's the best way to have an animation hold on a frame for a few before continuing?

That is, let's say I wanted to hold on frame 2 for 5 frames.   Should I do a trigger and pause the animation then resume play after 5 updates?  Or should I enter frame 2 5 times in a row?

Related question: is there a way to tell a sprite animation to go to a particular frame?  I know tk2dAnimationSprite has Play(float clipStartTime), but frame index/number would be way more useful than a clipStartTime for me.

I would appreciate any advice on the best approach.

As an aside, before I decided to use 2dtoolkit I was using ex2d, and the only feature they really did better was the animation editor.   I would love to see something more robust (like specific timing per frame on animation rather than global FPS). 

Support / multiple tk2dCameras? (For Pro Image Effects like blur, etc)
« on: April 20, 2012, 11:19:01 pm »

I've been playing with some of the Unity Pro image effects like blur, glow, and the like.    I've been doing this outside 2dtoolkit using basic unity scenes.  Since these effects are attached to cameras, I have to create multiple cameras (one with the effect, one without) and then set their layer, culling mask, and depth accordingly.    This all *seems* to work in my test scene.

But when I try to do the same thing using tk2dCameras it no longer seems to work.  I can get both cameras showing, and I can get the blur effect on one.  But it always seems to either hide one of the cameras, or show and blur both. 

So, is it possible to use multiple tk2dCameras in a scene?  If so, any idea what stupid thing I might be doing that would mess it up?  I admit to still being fuzzy on how the layer/culling mask thing works.  Anyone have a demo project I could look at?

Also, related question:  are there other, simpler ways (shaders?) to achieve some simple effects like blur?

Thanks in advance!

Pages: [1]