2D Toolkit Forum

2D Toolkit => Support => Topic started by: kebrus on October 21, 2012, 11:04:05 pm

Title: Is 2D toolkit the right tool for me?
Post by: kebrus on October 21, 2012, 11:04:05 pm
Hi everyone, sorry if i'm posting in the wrong section.

I have a very simple question, i want to know if 2D toolkit is the right tool for me. I've been trying the free tools like Othello framework and spritemanager 1 for the past few weeks and i've been having some difficulties in integrating them in the workflow pipeline an others regarding performance. I've been looking for the paid versions and i'm still not convinced so now i'm looking into 2D toolkit. but since i can't really try it for myself it's hard to tell if it does what i need.

I'm gonna say what i need and why and hopefully you might have a better answer for me


I think these are all the of the major problems i'm having for now, thx in advance for the answer.

Cheers
Title: Re: Is 2D toolkit the right tool for me?
Post by: unikronsoftware on October 21, 2012, 11:25:58 pm
Hi,

1. Axis isn't locked, you're free to do what you want. Nothing imposed on cameras. You can use ortho or perspective cameras too.

2. You don't have explicit control over this, you will have to be clever with z depth. If you want multiple sort layers, you can use multiple cameras with different "depth" values and different layer masks to get this control.

3. Yup, it does all of that - one thing you didn't mention is that 2D Toolkit also rotates sprites to try to get best fit. 2D Toolkit also will generate multiple atlases from your textures (atlas spanning), but I strongly recommend NOT using this feature however tempting that may be if you have large numbers of sprites. It isn't as efficient as manually doing it yourself. Animations are free to span atlases, so no issue there.

4. It uses Unity dynamic batching, so you get whatever performance boost with that. Having said that, there's also a built in Static Sprite batcher, which lets you batch static sprites (backgrounds and such) in the editor.

Hope that answers your questions, Feel free to ask if you have any more.
Title: Re: Is 2D toolkit the right tool for me?
Post by: kebrus on October 22, 2012, 12:12:14 am
Thx for the quick answer

so if i understand correctly 2D toolkit uses simple quad polygons to render sprites similarly to what i could accomplish by importing a quad and scripting a spritesheet animator with the extra features of atlasing, workflow and all that jazz, i'm asking this bluntly because i need to understand if it functions similarly to spritemanager (generating the quads on the fly) or if it integrates with how unity functions, i've been burnt before with z-sorting stuff and i see it happening all over again with spritemanager, but if it functions within unity wont it render correctly using the depth buffer? this goes into my question number 2
Title: Re: Is 2D toolkit the right tool for me?
Post by: unikronsoftware on October 22, 2012, 12:21:12 am
1. By default they face the Z axis. If you want them to face another axis, you will need to rotate them.
2. Generally sorting by z works fine, but if you need extra control, you can use multiple cameras with different depth values.
4. That really depends on how many atlases your objects are in. There is no way to do cross atlas batching - just won't work with the graphics hardware.

It creates quads and/or other geometry with a lot of tools to help do all the boring nasty stuff. If you want to use the depth buffer, your only option is to use alpha test (cutout) instead of blending. Then you get perfect sorting with no effort. If you can do this in your game, then this will just work. If you need blending, the sprites must be drawn back to front, and sorting (and batching) here will become very much more complex.
There isn't much of a way around that apart from writing a custom batcher, but you'll have to do the same work to position all your sprites at the correct z anyway.

I can go into a lot more depth about this when I next get a chance.
Title: Re: Is 2D toolkit the right tool for me?
Post by: kebrus on October 22, 2012, 12:31:37 am
Thanks for all the replies, tomorrow i'll be discussing this with the rest of the guys and if viable you'll get one more customer ^^

thx again and cheers