I know Unity is primarily designed for 3D games, but how easy would it be to rig Unity for more simple 2D games using 2D sprites/animations and 3D objects? I've just stumbled across Unity while looking for a game engine framework that I can use for prototyping and development, and so far I'm totally sold - I just need to get some idea of how flexible it is. Looking forward to trying it out soon. Thanks in advance.
Unity isn't restricted to 2D or 3D projects. It may seem that, on first visits, Unity is simply a 3D engine as most of the tutorials and projects being showcased with it focus on that. But this is not the case and Unity can be used for 2D, 3D or whatever else you can come up with. Unity's key strength is the asset management, workflow, ease of use, great developers and community, ability to code in whatever language floats your boat (Javascript, C#, Boo), and "flow." I'm working on creating an online 2D card game in Unity so everything is possible. It's he best game engine I've ever had the pleasure to work with in more than 18 years of computing.
Have a look at this game I did last week, or this game from this week. The latter doesn't use sprites at all, but it could have, since the gameplay is totally 2D. (It does demonstrate the use of an orthogonal camera, though, which the first one doesn't use.) Edit: Gee, you can't even wait 2 minutes around here before everyone else replies before you. Anyway, as long as I'm editing, let me add that after those experiences, not only would I say that Unity is suited for 2D, but I'd use it in preference to other 2D engines because of the workflow and physics engine. The only downside I can think of at the moment is that you can't really have pixel-perfect collision detection between sprites, but most of the time you don't need that, I don't think. --Eric
Thanks for the super quick responses. I can't try the games out in my current locale - but I will when I can. I really appreciate the feedback - if any other users have experience executing 2d concepts in Unity, I'd like to hear their feedback as well. Especially strictly 2D concepts, just for contrast.
I'm working on a 2D game and it's going great. A little effort needs to go into getting physics working right in 2D, but it's not been a problem for this forever-newbie.
And then there's of course the Big Bang Brain Games... 2D gameplay, 2D + 3D presentation. http://www.freeverse.com/braingames/ d.
Thanks again. I guess the next step will be to download the demo and give some of the tutorial material a go to get a feel for the environment in practice.
Here's an example of sprites and tilemaps in Unity. In this case, the game world is really 3D (even though the action mostly takes place on a plane), but the graphics are all 2D. I'm using TextMeshes and custom fonts for both sprites and tilemaps, and I use different letters to index the animation frames and so on. For clarity, this is an in-progress remake of my old game, Yoink. The original wasn't made in Unity, but this new version is entirely Unity code. Use arrow keys to move around and space to fire. At the moment, everything is indestructible.
Always enjoyed the game mechanics in Yoink, Neil. Glad to see it being resurrected! The only downside to working in 2D with Unity is that you'll occasionally have to deal with the added complexity of 3D and do a little foundational prepping to make the 2D more manageable. The big upside, of course, is that adding or moving into 3D is going to be cake.
2D is just 3D with one axis set to zero.. I don't know why people can't see that and have troubles making 2D games in a 3D environment.. .ORG
I don't know that anyone's actually had any real trouble...except for that one prospective Unity buyer who ended up deciding it didn't work for 2D, but I'd really like to know what the actual problem was in that case, because I bet I (or anyone with some experience) could have fixed it.... --Eric
Practically, there is no pure 2D, like X,Y coordinates, any 2D application need to sort the rendering order of the object so sprites aren't occluded by background or trees aren't shown in the back of a cloud, you need to sort it in some way, and.. wait a minute.. isn't that the third axis ? Just with camera orthogonal maybe and no dynamic angles for the view projection. I just said that because i have seen people always asking how to do 2D in 3D, not only Unity, but OpenGL, DirectX, and others.. .ORG
The other issue is the use of quaternions. There is no reason for them in a 2D system, yet you are forced to deal with their issues when using most 3D engines. Plus, a dedicated 2D engine will have a pre-made system that deals with sorting, "sprites", animating textures, transparency, backgrounds and other issues, where using a system like Unity puts some of that on the developer's shoulders. Honestly, though, these are tiny obstacles to overcome --this community can help and quickly-- and the benefits of Unity over other systems make it a great one stop solution for any type of game you want to make... except maybe text adventures. (?) Sorry, Eric5h5, I know you're probably already giving in to the temptation and we'll see a text adventure with fantastic particle effects in what... 5 hours?
OK, put this on a GUIText object: Code (csharp): function Start () { print ("You are in a maze of twisty passages, all alike."); } function Update () { var c : String = Input.inputString; if (c == "\n") {ParseText(guiText.text);} else {guiText.text += c;} } function ParseText (line : String) { print ("I don't understand \"" + line + "\"."); guiText.text = ""; } Sorry...that's the best I could do. --Eric
W00t. More replies. Yeah. It doesn't sound tooo painful. I *think* I'm going to be getting a Mac Pro - due in no small part to Unity. The only thing I'm waiting on is graphics card upgrades. I'm hoping for new DX10 GFX card support come WWDC as a minor announcement. ::crosses fingers:: Though I'll probably start playing with Unity soon in demo on my mactop - but it's many years old now and not particularly fast.