Author Topic: NGUI + 2DTK ?  (Read 4769 times)

mlegrand

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
NGUI + 2DTK ?
« on: May 15, 2013, 11:57:21 AM »
We're currently NGUI + 2DTK.

Is that stupid ? Can NGUI do everything they can? Do you have any familiarity with the competition?

Seemed like a couple other folks were doing the same combo.

One thing we probably need to sort out, if we plan to continue using both, is how to share sprites between their notion of a SpriteCollection and NGUI's UIAtlas.

Any thoughts on this?
Thanks

MrTact

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 2
  • Posts: 32
    • View Profile
Re: NGUI + 2DTK ?
« Reply #1 on: May 15, 2013, 12:05:29 PM »
We punted on 2DTK because NGUI did everything we needed, plus UI. The one area in which 2DTK beats NGUI (IMHO) is with animated sprites -- we had some animated sprites we ended up dropping because we couldn't find a direct analog in NGUI that worked.

If you are using Spine for 2D skeletal animation, there is a runtime in development for 2D toolkit; for NGUI you would have to roll your own.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI + 2DTK ?
« Reply #2 on: May 15, 2013, 12:15:55 PM »
I think there is room for both. 2DTK is better for 2D games, while NGUI is better for user interfaces. If you really wanted to, you could create a custom widget type that would use a 2DTK atlas. Just look at what UITexture does.

mlegrand

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: NGUI + 2DTK ?
« Reply #3 on: June 05, 2013, 12:07:47 PM »
We implemented a tkUISprite that displays 2dtk sprites inside NGUI Panels. Was mostly straightforward. Supporting dicing was the trickiest part. May be able to post code if coworkers are OK with it and there's any external interest.

BlueByLiquid

  • Guest
Re: NGUI + 2DTK ?
« Reply #4 on: June 05, 2013, 03:26:45 PM »
We implemented a tkUISprite that displays 2dtk sprites inside NGUI Panels. Was mostly straightforward. Supporting dicing was the trickiest part. May be able to post code if coworkers are OK with it and there's any external interest.

I know I would be interested as I have to do this soon.

gdeglin

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 3
  • Posts: 18
    • View Profile
Re: NGUI + 2DTK ?
« Reply #5 on: June 05, 2013, 11:22:57 PM »
We implemented a tkUISprite that displays 2dtk sprites inside NGUI Panels. Was mostly straightforward. Supporting dicing was the trickiest part. May be able to post code if coworkers are OK with it and there's any external interest.

Definitely interested. I really like TK2D's sprite dicing feature and the way it supports multiple resolutions. Would be amazing to be able to use those in features in NGUI.

tschacht

  • Guest
Re: NGUI + 2DTK ?
« Reply #6 on: October 17, 2013, 11:46:43 AM »
If posting your tkUISprite is an option, I would really appreciate it.  I'm currently working around this by overlaying 2dtk sprites on top of their ngui containers and constantly sync'ing position and scale.  It adds a lot of messy code and layering issues can become a mess.

mlegrand

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: NGUI + 2DTK ?
« Reply #7 on: October 17, 2013, 12:37:21 PM »
I don't work at the company where that code was written anymore.
I'm forwarding this thread on to the author.
I previously mentioned to him that we should share the code on here and he was receptive to the idea.
Think he wanted to clean it up and make sure it was ready for prime time before posting, but it may have just fallen through the cracks.