2D support in Unity

I heard a rumor about Unity working on official support for 2D development. Anything on this?

Not a rumor. :slight_smile:

There,
2D (started)
http://feedback.unity3d.com/unity/all-categories/1/top/active/editorgraphics-fullyfeatured-

They should just buyout 2D Toolkit and integrate it into Unity, I think 2d Toolkit is just perfect.

While I like 2D Toolkit, it is nowhere near what I expect from a 2D engine and it has a lot of missing features that make it hard for me to do a proper 2D game.

it really depends on your specific needs - that’s the beauty of having so many plugins.
The place I work at uses 2d toolkit, NGUI, and for complex animations (2d characters) we just use 3ds max (create an atlas, fit it on a plane in 3ds max, cut the pieces out, animate - and voila - 2d characters!)

Can’t you just render out your character with alpha as .png? Instead of going through all that hassle .

on PC maybe - however we target mobile devices (iOS, Android) - and those have strict limits in terms of texture space - for example the ipad 1 can hold around 3 2048x2048 textures (non-pvtc compressed - since adding pvtc compression really lowers the textures quality) - any more and it will get all crashy due to memory issues - the iPad 2 and on are much better but using high res sprite animations will quickly max out even those resources where as with the Fbx 2d characters we can have a single, say, a 256x512 character atlas and it can easily do 10-20 animations

Yeah, it makes sense now. You should have mentioned that you make games for iOS etc.
Have you tried something like Spriter http://www.brashmonkeygames.com/spriter.htm

it looks nice, however 3ds max offers more flexibility - plus there we can use skinnedMeshRenderers for limb deformations which is uber cool

I like ex2D personally as it is less invasive and more native workflow. Like all systems which try hard to reduce fill rate of course and one of the things I love about ex2D is using anim events based on time during the playback of the frames. Great stuff and intuitive :slight_smile:

You could potentially quadrouple the amount of sprite animations if you use each color channel of the textures as an individual 256-color sprite with its own palette… and then you’d just need a simple color-palette lookup shader. It would run a little slower than a straight texture shader because you have to extract the color component and do a second texture lookup for the palette (which will cache well) but it will greatly increase your memory availability.

I agree though, although 2D toolkit is quite good it is worlds away from how 2D should be done. I’m waiting to see to what extent Unity comes up with 2D support. If it’s pretty basic and just poking a toe in the water then I might work on a better 2D engine.

Well I’m thinking of replacing ex2D entirely with my own 2D system. I already rolled my own GUI for The Other Brothers as I didn’t like the lack of customisation or the complete and utter overkill of NGUI (Which is slower to run and slower to work with than a more focussed solution).

For one of our older mobile titles, it actually performs atlasing at load time on a 3G (2nd gen device) in under 1ms, so I don’t feel atlases should be a slow process either. I assume the reason why atlases tend to be slow to generate is all the scanning of each pixel to try and crop as tightly as possible. I’m not even sure TOB benefits from atlases either. I tried it with and without and it didn’t change the framerate at all. Draw calls were still 10-20 regardless.

Custom 2D systems and GUI’s generally make a huge song and dance about all the so called improvements they make, but in real world situations in real world games, they don’t really make a huge difference. They do in benchmarks, but in niche cases like that you’re usually better off coding a custom solution.

My vision of a unity 2D system would be working as close as possible to the way unity works right now, perhaps with a clip editor to arrange (like anim clips) your frames, complete with unity anim events that can get fired on playback. Atlasing should be done in a separate thread at editor time so it all feels seamless and creative. It should just work.

Of course a robust and extremely well optimised 2D physics solution is a must as well. When you talk 2D it must include 2D games, 2D gui and 2D physics.

For the most part TOB is all custom (physics are custom, gui is custom and only the sprites themselves are ex2D, and even then only because the rest of the team were using it at that point, not because I prefer it).

While, I would agree, I feel alot of the issues would be fixed if it had better access to more of unity features, such as making it essentially the same as the .fbx animation except using 2D.

Personally I’m not a big fan of the idea of making the 2D system work like the current 3D workflow. It just doesn’t fit well. They came up with the current editor design to cater to optimal handling of 3D, models, 3D cameras and movements, etc… plus the whole inspector thing I find takes away from what could be much more WYSIWYG, intuitive visual editing. If you look at the workflow in other 2D-focussed tools/game editors it’s nothing like Unity’s method and I don’t think Unity has necessarily improved on those systems. It is the way that Unity works now with a 3D focus that makes it a pain to do 2D work, so why would I want to keep using that same approach? For me a 2D system would be much more WYSIWYG, in-place visual editing, live editing while the game is running, editing of animations and graphics in-place, drawing of gameplay movement paths and placement of AI etc in the scene, and getting rid of much of the inspector button/dropdown overkill. None of the current 2D systems get anywhere near close to this precicely because they try to be like Unity. If I wanted to do 3D in Unity I’d want it to be like Unity but to do 2D I say throw out the whole dam editor and start from scratch with a really focussed, ideal environment for 2D work.

Unfortunately I fear that Unity 2D ie Unity’s official 2D solution is going to keep most of the 3D editing system and inspector utilization and maybe add a small handful of extra widgets or whatever in the scene but still fall way short of really being a proper 2D tool for people who ONLY want to do 2D work.