Will Unity3d ever directly support 2D sprite based games?

I need to make a sprite based 2D game. Not because I can’t do a full blown 3D. In fact I did. This time only and only 2D fits my design goals.

It’s been an issue in the forums since Unity 1.6, the first replies to this question are from 2006.

I know Unity3D is a 3D tool, but it has sooo many advantages in terms of ease of use, learning curve, real time editing, … = rapid development.

Now I have studied a lot of posts on the forum, the answers are insightful, I learned this:

  • switch the camera to orthogonal, different z values of plygons facing the camera = layers
  • use custom font and display different characters = playing an animation
  • use polygon with UV animation = playing an animation
  • use invisible box around ploygon with all z depth covered = collison
  • physics can be locked to 2D

OK, I got it. But where is this documented? Why is there no clear tutorial? What is the efficient way to do this? Is this going to be officially documented in the 2.5 release? Will there be ever editor objects facilitating all of this?

And one final blow: Unity 1.6 supported *.mov video import with lossless compression and alpha channel import. Now everything is internally converted to theora and the alpha channel is lost. This seems like a huge step back for anyone having a project with hundreds of MB of raw 2D animation frames.

Is Unity 2.5 going to address any of these issues?

Please correct me if I’m wrong, I will be more then happy to learn there is 2D sprite based documentation, steps towards 2D in Unity 2.5.

As you didn’t mention it yet: Have you seen the 2D gameplay tutorial ? Unity 2D tools for game dev – evolved for optimal graphics performance

This helps you set up the basics…ortographic camera…locking the physics etc.

About your last questions: I don’t think they will change much in 2.5 on your subject. Also, casual games are not generally considered to be 2D sprite games.

Thank you for your reply. I did indeed. That’s 2D gameplay. Not 2D sprite based graphic implementation.

Unity will always be a 3D world. So I think the best you can do is using the tutorials 2D setup, and add textured planes for characters etc.

Thank you Leepo. I’m just disappointed as I expected a game example / tutorial / documentation covering this.

Could someone from the Unity development team or someone with background information elaborate on this? What’s the future going to look like for 2D sprite based games in Unity?

I understand there was a separate category in the 2008 competition for 2D.

Does everyone have to write his own 2D implementation from scratch?

Please consider this as friendly feedback as I’m a huge fan of Unity3D.

You could use particle systems. Unity 2 offers you single particle control which offers a full billboard system at your hand.

but there are many more things that you will likely need.

if pure 2D is your target, give BlitzMax + Grey Alien Framework a go, as it is built around exactly around 2D through 3D

Thank you so much for contributing to this topic.

I know about BlitzMax. Grey Alien Framework is NOT available anymore. Big Fish Game mini buyout took care of that one month ago.

I’m trying to find information on how easy/difficult it is to implement a sprite based character animation system into Unity3d.

As mentioned before: there is a 2D games category in 2008 competition. Will Unity develop in this direction in the future releases?

Is there documentation I missed?

What’s wrong with using GUI.DrawTexture for 2D sprite rendering?

As far as I know this is not effective: both performance and functionality wise.

Sorting is a problem to start with, then collision detection etc.

I’m slowly under the impression I asked in the wrong place :wink:

Could you specify where the trouble lies?

As far as sorting goes I’m guessing you mean z-ordering? That’s only a problem if you make it one :wink:

I compiled the advices that people say work well in my original post. I’m just looking for a documentation for these techniques.

I read in a couple of posts on this forum GUI texture for sprite based 2D is a bad idea.

http://forum.unity3d.com/viewtopic.php?t=5285&highlight=sprite

The sorting problem, from PoBros:
http://forum.unity3d.com/viewtopic.php?t=4986&highlight=pobros

I don’t thing GUI.DrawTexture will support collision detection.

Correct me if I’m wrong.

I’ve read the threads and couldn’t find anything saying that its problematic to sort DrawTexture calls or that the method has a performance problem. Collision detection is not done on DrawTexture calls.

You would have to either code yourself out of that or rig some colliders locked on one axis and translate position data between those colliders and the data behind your DrawTexture calls.

Edit:
By the way I don’t get your thread title. You’re saying casual gaming equals 2D?

Thank you AngryAnt.

I’m welcoming new insights. The 2 threads I posted before definitely refuse GUI methods as a way of making a 2D implementation.

Thank you also for the comment regarding the thread title. After 3 years in the industry I really have the impression most casual games = games selling to the casual audience = games selling on casual portals: were, are and will be 2D.

I will change the title “Unity moving away from casual” so it reflect more my issue.

Can you point me to a 2D game with the mentioned GUI implementation, documentation on this, etc.?

Unity isn’t designed for creating real 2D games. but you could do some pseudo 2D work by using 2D planes and restrict them to only move in two dimensions. In this case, colliders and physics would still work.

As for the loss of alpha channel in video clips… yeah that sucks. I wonder if a Shader could be created to cause a certain color (think green screen) to be transparent?

I just posted this in the Shader Lab forum… http://forum.unity3d.com/viewtopic.php?p=116493#116493

<update 2x> I searched the forums and found that a greenscreen shader has already been created! http://forum.unity3d.com/viewtopic.php?t=12228&highlight=colbert+green+screen+video

Well, to be fair there have been many “issues” mentioned on this forum for a while now that have been addressed or still need addressing. Please realize that we have a finite number of resources (staff/time) so we can’t do everything and we need to focus on the core priority: being a 3D game development tool. Over time we have some interest in more 2D features but for now those are taking a bit of a back seat.

Again, please understand that there are a lot of game types that could benefit from tutorials, not just a 2D sprite based game. How about a multiplayer tutorial? A 3D platform tutorial (done!)? A FPS tutorial (old one is going to get updated)? What about a new racing game tutorial? What about a tutorial?

We’ve helped bridge the 2D gap in part with the tutorial that’s already been mentioned, although it’s not “sprite-based” in particular. Over time you’ll see more and more tutorials from us, in the meantime feel free to add to the community and crank one out yourself. :slight_smile:

No, I think it’s a bit of a step forward as it incorporates full video support into our engine itself. The work there is not done but at times “forward movement” causes unsettling moves in the shorter term, we’ll get there.

No, we’re not doing any 2D sprite based features nor any specific changes to our video support in the 2.5 release. Separately we’re working on tutorial updates for this spring but those are not tied to 2.5 in particular nor do they currently include any 2D sprite-based tutorials.

if Grey Aliens framework is no longer available (bought it before luckily so I can still get it), then TGB might be the second best solution actually.

Unity is great but for doing 2D you would have to do all yourself

2D opted physics, a scene graph to handle active and inactive stuff (as you will have to use a single mesh, you can not use the onXXXinview callbacks) and other things.
A lot of work that I myself definitely would not invest if there is alternative technology at the price there is.

@Higgy: I understand and I’m glad you have a strong vision and dedicate resources in the right direction.
Thank you once again for your time and effort.

@dreamora: Thank you, for clearing this up.

Unity3d is definitely a very cool tool. Good luck with your current projects.

I would like to thank all who have participated in this thread.

This 2D sprite script has just been released by Brady:

http://forum.unity3d.com/viewtopic.php?t=17864&highlight=&sid=c8c4c415a2ba633d07c5d564b0e492c1

awesome, I will check this definitely out! A million thanks!