Hello Guest

Author Topic: 2D Toolkit 1.76 beta 1  (Read 25855 times)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
2D Toolkit 1.76 beta 1
« on: July 05, 2012, 12:00:38 am »
TILEMAP: renderData mirrors tileMap transform
BUGFIX: Animated sprites, loads of bugfixes, refactored internals
BUGFIX: Unity 3.5.3 no longer requires intertia tensor hack, correctly disabled in 3.5.3 and not older versions
BUGFIX: Sprites in prefabs correctly update live instances
TK2DCAMERA: Massively improved scaling correction modes
TK2DCAMERA: Improved interface
BUGFIX: Merged CG shaders branch. All default shaders now have CG counterparts.

I won't be adding any more features to 1.76, only further bugfix betas if necessary - need this out as soon as possible so I can get 1.8 merged and released. Any help testing would be greatly appreciated.

As usual the version should be 100% backwards compatible, but please still backup before upgrading. I've started marking redundant functions as obsolete, and you should see warnings while compiling in Unity - I'm going to be doing this a lot more going forward.

phildo77

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 31
    • View Profile
Re: 2D Toolkit 1.76 beta 1
« Reply #1 on: July 08, 2012, 01:05:48 am »
A couple of things:
1)  The new Beta 1 breaks my animations.  I think it may have something to do with IsPlaying()/Playing.  I have not been able to spend time trying to figure this out.  I went back to 1.75 due to this breakage.  If you need I can see if I can narrow down where the issue is.

2)  TK2DSpriteAnimation (This behavior is also present in 1.75 Final):
Animation does not work in the game or display properly in the inspector.
To recreate problem:
1-Create new Sprite Animation In the inspector (under TK2DSpriteAnimation)
2-Name it
3-Select "Once"
4-Make sure group is disabled (Verified that it really doesn't matter if Group is highlighted or not)
5-Select first frame (my case: "SlumsFemaleExtra2_Idle_0001")
6-Click "Add Frame"
7-Select first frame (my case: "SlumsFemaleExtra2_Idle_0002")
8-Click "Add Frame"
9-Select first frame (my case: "SlumsFemaleExtra2_Idle_0003")
10-Click "Add Frame"
11-Select first frame (my case: "SlumsFemaleExtra2_Idle_0004")
12-Click "Add Frame"
13-Select first frame (my case: "SlumsFemaleExtra2_Idle_0001")
14-Enable Group

Expected results:
-For the inspector to show all 5 frames in order of 1,2,3,4,1
-For the animation to work in gameplay

Actual results:
-Frame 2 is missing ("SlumsFemaleExtra2_Idle_0002")
-Frame 1's count is 2 frames
-Animation has weird behavior in-game  (Animation played is not the selected one)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 1.76 beta 1
« Reply #2 on: July 08, 2012, 01:22:10 am »
A couple of things:
1)  The new Beta 1 breaks my animations.  I think it may have something to do with IsPlaying()/Playing.  I have not been able to spend time trying to figure this out.  I went back to 1.75 due to this breakage.  If you need I can see if I can narrow down where the issue is.

2)  TK2DSpriteAnimation (This behavior is also present in 1.75 Final):
Animation does not work in the game or display properly in the inspector.
To recreate problem:
1-Create new Sprite Animation In the inspector (under TK2DSpriteAnimation)
2-Name it
3-Select "Once"
4-Make sure group is disabled (Verified that it really doesn't matter if Group is highlighted or not)
5-Select first frame (my case: "SlumsFemaleExtra2_Idle_0001")
6-Click "Add Frame"
7-Select first frame (my case: "SlumsFemaleExtra2_Idle_0002")
8-Click "Add Frame"
9-Select first frame (my case: "SlumsFemaleExtra2_Idle_0003")
10-Click "Add Frame"
11-Select first frame (my case: "SlumsFemaleExtra2_Idle_0004")
12-Click "Add Frame"
13-Select first frame (my case: "SlumsFemaleExtra2_Idle_0001")
14-Enable Group

Expected results:
-For the inspector to show all 5 frames in order of 1,2,3,4,1
-For the animation to work in gameplay

Actual results:
-Frame 2 is missing ("SlumsFemaleExtra2_Idle_0002")
-Frame 1's count is 2 frames
-Animation has weird behavior in-game  (Animation played is not the selected one)

Thanks for that I'll look into both ASAP. The is playing one is a bit more tricky, as the core system is different now. What issue are you seeing? Is it reporting playing while something isn't playing or the opposite?

The second one should be straightforward to fix.

phildo77

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 31
    • View Profile
Re: 2D Toolkit 1.76 beta 1
« Reply #3 on: July 08, 2012, 02:17:06 am »

...

Thanks for that I'll look into both ASAP. The is playing one is a bit more tricky, as the core system is different now. What issue are you seeing? Is it reporting playing while something isn't playing or the opposite?

The second one should be straightforward to fix.
I'll spend some time trying to figure out what is going on in debug.  Due to how I am using it I can't tell you off the top without investigation.  It LOOKS like it is reporting false when it should be true.  Like I said though... I need to verify! :)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 1.76 beta 1
« Reply #4 on: July 08, 2012, 01:46:06 pm »
Found the bug with the "grouping"! Thanks for the comprehensive bugreport, that really helped. It was frame 1 being there twice that triggered it. Never saw it as in all my tests, as I never had frames spaced apart like that, always 10x of the same frame in sequence or something like that. Its fixed now, and will be in the next update.

whale

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: 2D Toolkit 1.76 beta 1
« Reply #5 on: July 08, 2012, 07:14:01 pm »
I was just going to say that I had experienced the same problem but it looks like you got it,

I did have one other issue though- This is my first update in 3 or 4 versions so perhaps this change was intentional but after updating, all my previous sprites work fine. But when I try and make a new one, as in make the collection, make the sprite, at first my sprite was just coming up as a pink square, i fiddled with the shaders and managed to get it to a white square. (note that it looked fine in the collection editor/inspector, but scene/gameview was a flat color). Whats weird is the setting appear to be identical to sprites created in previous versions.

While I was writing this I rolled back to 1.75b3 and took the same steps as above, and everything works fine.

Cheers

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 1.76 beta 1
« Reply #6 on: July 08, 2012, 07:30:13 pm »
That isn't intentional. So creating new sprite collections results in white sprites in the scene? This is definitely something I test all the time, and it is fine on this version I've got now (slightly newer than the released one). None of that stuff should have changed in a while now, though there was a bug which caused this a while back.

Can you please drop me an email to discuss this further? support@unikronsoftware.com

bigtunacan

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: 2D Toolkit 1.76 beta 1
« Reply #7 on: July 10, 2012, 03:23:00 am »
Another bug???

I downloaded the latest build to get the Fit Mode scaling.

I use iPhone scaled graphics as my baseline, then scale to fit the different Android resolutions.

So as a test I set Width=960, Height=540 (this is a common Android resolution; same width as iPhone, different height).
I set

Auto Scale = None
Fit Mode=Constant
X=1
Y=.84

But it does not affect a non uniform scale; instead it continues to have a uniform 1:1 scale.  So I still have the same problem as earlier versions... either only part of the screen is filled so off screen artifacts will continue to be drawn onto the screen.. or I have to stretch past screen size and too much of my in game imagery is cut off in one direction.  I tried playing around with a few other settings in the scale, but none of them seemed to allow non uniform scaling.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 1.76 beta 1
« Reply #8 on: July 10, 2012, 09:34:03 am »
Fit will fit the largest dimension and won't scale nonuniformly. That is intentional.

If you set Auto Scale to Fit Visible, and Fit Mode to Center will center the box on screen, allowing you to letterbox, etc. If the native resolution aspect is larger it will fit height otherwise it'll fit width.

I could add non-uniform scale to fit the screen, but I honestly think it would generate far far more support requests due to artifacts than it would solve. Non square pixels will introduce all sorts of problems, eg. if mipmaps were on, it would mip instantly.

I'll add it to the main version if theres enough people wanting it (and understand the implications...), but if you want something which will do it, drop me and email and I'll be happy to send you a patch.

39thstreet

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 77
    • View Profile
Re: 2D Toolkit 1.76 beta 1
« Reply #9 on: July 13, 2012, 07:13:01 pm »
Tried updating to this beta today, and all my textures went pink (as they do when they are missing).  I could still see them in the collection, but all of my sprites in all of my scenes appeared as if they had no textures.

Reimporting 1.7.5 fixed the issue.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 1.76 beta 1
« Reply #10 on: July 13, 2012, 07:28:45 pm »
Can you get in touch by email please? This shouldn't happen.
support@unikronsoftware.com

I'd like to sort this out before b2, today or tomorrow if possible...

Edit: Just need a bit more info to try and track this down.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 1.76 beta 1
« Reply #11 on: July 13, 2012, 10:19:07 pm »
I think I've worked out why some people were having the "pink square" issue. To both 39thstreet & whale - had you moved the tk2d Shaders folder from the default location?

The CG shaders included tk2dCG.CGinc - if the original shaders had been moved, then the new shaders will automatically overwrite them, but the tk2dCG.CGinc file would have ended up at the default location, and it would've failed to compile hence the pink blocks, and why reverting magically fixed it.

In the interest of backwards compatibility, I'll go ahead and inline all the includes. I'll post b2 with that and a lot more fixes after thats done.

Edit: Confirmed you get a pink square like that. Did anyone see these error messages: "Shader error in 'tk2d/XXXXX': GLSL preprocess error: Include callback failed at line X"
« Last Edit: July 13, 2012, 10:32:17 pm by unikron »

39thstreet

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 77
    • View Profile
Re: 2D Toolkit 1.76 beta 1
« Reply #12 on: July 14, 2012, 12:53:13 am »
Yep, I had indeed changed the default directory.

Sorry for not getting back to you earlier with that.  I'll check out beta 2 on Monday.

Thanks!

phildo77

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 31
    • View Profile
Re: 2D Toolkit 1.76 beta 1
« Reply #13 on: July 18, 2012, 03:47:43 am »

...

Thanks for that I'll look into both ASAP. The is playing one is a bit more tricky, as the core system is different now. What issue are you seeing? Is it reporting playing while something isn't playing or the opposite?

The second one should be straightforward to fix.
I'll spend some time trying to figure out what is going on in debug.  Due to how I am using it I can't tell you off the top without investigation.  It LOOKS like it is reporting false when it should be true.  Like I said though... I need to verify! :)

Okay... I think I've narrowed down the problem.  It looks like .clipId is reporting incorrectly.  I'm asking for .clipId and I get zero when I should be getting 2.  I've confirmed that the object's .currentClip.name is the name for .clipId = 2 not 0 when this happens.  Does this make sense?  This one's a show stopper for me.

Twyzzer

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 1
    • View Profile
2D Toolkit 1.76 beta 1
« Reply #14 on: July 18, 2012, 08:26:13 am »
I would be more than happy to help out with the beta testing on this version. Let me know what you need.