Search Unity

  1. Check out our Unite Austin 2017 YouTube playlist to catch up on what you missed. More videos coming soon.
    Dismiss Notice
  2. Unity 2017.2 is now released.
    Dismiss Notice
  3. The Unity Gear Store is here to help you look great at your next meetup, user group or conference. With all new Unity apparel, stickers and more!
    Dismiss Notice
  4. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice
  6. Unity 2017.3 beta is now available for download.
    Dismiss Notice

Why Unity3D for 2D game development?

Discussion in 'iOS and tvOS' started by Zombie Shakespeare, Jun 22, 2009.

  1. Zombie Shakespeare

    Zombie Shakespeare

    Jun 6, 2009
    I've been tasked with assessing the benefits of engines for iPhone development, and I was wondering why people have chosen Unity3D for the express purpose of doing 2D games over, say, a library like cocos2D when the later seems much better suited for such a project. Thanks in advance for the replies!
  2. MikaMobile


    Jan 29, 2009
    For me it was just a matter of having had a fair amount of experience with Unity already. I just really like the overall workflow when it comes to 3d work, and didn't find it too hard to adapt that workflow to 3d models that just happened to look 2d.

    The main benefit for me personally is that I can do animation in Maya if I use a 3d engine like Unity. I find that rotating, translating and scaling various drawings (and pieces of drawings) produces a smooth and expressive visual style that would be much harder to pull off if I were using the traditional method of cycling through individual frames of animation like the 2d games of old. It's like having the flexibility of flash, but without the constraints of vector based art.
  3. n0mad


    Jan 27, 2009
    And with a 3D engine, you can add some pseudo-depth effects in your 2D that woud quickly become trivial with some 2D only engine.
  4. Tempest


    Dec 10, 2008
    I am developing an iphone game using Unity purely with the GUIManager, which is basically a game with the GUI, and Sprites.

    Unity is overkill on the technical side of things, as I won't be using any of the 3d or physics in this. My reason for going along this path is because of my experience using Unity versus any other engine, but more so, the rapid development capabilities I have when using Unity.

    Putting stuff together in both a prototype and final form is very fast for me, and I can hand this off in parts to the artist/designer who can tweak/test values in the inspector.

    Are there better engines for just Unity for this project? Sure. But Unity is working great for it.
  5. mudloop


    May 3, 2009
    For me personally, it's just that I don't want to learn Objective C at this point, and I already knew C#. And I'm also working on a 3D game, so being able to do both with one system is great.
  6. Thomas-Lund


    Jan 18, 2008
    Another reasons could be that your game code very easily can be re-used for a PC/Mac/Web game, where you would be pretty restricted platform wise if your game was coded in obj-c

  7. the_motionblur


    Mar 4, 2008
    If I was doing a 2D game in unity I'd do it just because of the workflow. I like the Unity UI a lot. More than what most 2D game engines/workspaces had to offer. The free ones at least.
    Also there's the Unity advantage that you can compile for Win and Mac and Web.

    the only other solution for me for a really pure 2D game right now might be in Flash. And I really don't like Flash. :)

    It depends on you preferences and goals, I guess. unity certainly isn't the 2D tool of choice for everybody but I can see why people want to use it.
  8. n0mad


    Jan 27, 2009
    In fact that was my main reason :)
  9. Choinkees


    May 11, 2009
    Part of the decision for me was that Unity isn't just 3D graphics... it's also input handling, audio playback, auto texture compression, support for heaps of different file types and having Unity convert them to something appropriate for iPhone, hotlinking to source Photoshop files so that they auto update and flatten for me after I finish editing them, etc... ..I don't need to manually do that stuff in XCode and plug in extra libraries like SoundEngine or OpenAL and stuff.

    Having mentioned that, initial testing of one of my ideas has revealed that Unity iPhone definitely wont be tool of choice, but that project relies almost totally on individual pixel drawing operations and creation of hundreds of basic shapes over time (draw filled rectangle or circle functions and stuff).

    I guess it really depends what type of 2D app you want to make. There are some awesome 2D iPhone games made in Unity that show off how well it can do sprites, but if you need direct drawing functions for say a mandelbrot fractal generator or something then yeah maybe cocos2d is a better option for that project.
  10. Silverfox


    Mar 16, 2009
    I would say Unity is a good investment, as you get a game development system with a logical, efficient workflow that can handle 3D - should you need it in future. (I actually got into Unity wanting to make a 2D game - it wasn't long before I was redesigning it in 3D).

    I've tried Flash, Torque game engine,(blargh!) and GameMaker. Unity is the most flexible and will also give you possibilities to do nice effects even in a 2D game, such as 3D particle effects, parallax etc.

    + With Unity, there is an active and helpful developer community!
  11. bliprob


    May 13, 2007
    My first game was 2D and I implemented it entirely in UIKit. If I was starting over today, I'd probably lean towards Unity for the multi-platform factor. Also, the speed of incremental development and testing in the Unity environment (as opposed to the turnaround time of the usual code-build-install cycle) should not be overlooked.

    I wouldn't blame Unity for that. The iPhone's memory architecture was probably most to blame for setPixel speed issues. It should be hugely improved with the iPhone 3GS.
  12. EvilRabbit


    Jul 19, 2011
    Objective C and XCode 4 - reason enough. ;-)
    Have just completed my first Objective C/Cocos2D commercial app and it was a pain. For me it comes down to:
    1) Visual Studio 2010 with ReSharper and Mercurial is an amazing toolset to work in. XCode forced me to have to recreate the project at least 4 times after it becomes corrupt and didn't enjoy the Git integration. We have also been pretty spoiled with garbage collection and memory management on IOS devices can be a pain - initially.

    2) The amount of resources and support for C#/JavaScript and Unity. There are 2-3 books on Cocos2D and the forum is helpful, but its not at the same level.

    3) iPad 2 and future devices will feature more and more 3D content so Unity make for a sensible decision.

    So in a nutshell, I have been working with c# since inception and really enjoy Visual Studio and use it, not because its the best system, but because it works and there is a ton of resources in comparison to Cocos2D - and I now am pretty confident in Objective C.
  13. hippocoder


    Digital Ape Moderator

    Apr 11, 2010
    Unity handles a lot of things that are great for games regardless. The rendering is the aspect I use it for the least, believe it or not:

    1. I get great physics and fast culled optimised collisions
    2. I get a trouble-free development environment and it makes C++ look silly
    3. it works cross platform on so many platforms
    4. it has an editor built in that I can extend how I wish

    2D these days all used 3D hardware to render. Makes sense. There are no 2D engines any more for any platform.
  14. bernardfrancois


    Oct 29, 2009
    We're often using Unity3D or 2D gameplay prototyping purposes. It allows us to develop very fast, and allows us to try out our prototypes on different platforms without or with minimal modifications.

    There are other frameworks that are fast for 2D prototyping - such as PyGame - but most of them don't allow building for multiple platforms so easily.

    We've shared an overview of the techniques we use for 2D game programming and prototyping on our blog in the following article:
    2D Game Development in Unity3D: Overview
  15. badawe


    Jan 17, 2011
    Unity3D have some IDE! And cocos2d don't! for us is simple like that :)
  16. giyomu


    Oct 6, 2008

    well there is some nice little level editor you can use for cocos2d be it tile map based or not... :)
  17. MarkcusD


    Jul 12, 2011
    Easy porting among multiple platforms is the main reason. Also, my background is in C++ but I like C#.
  18. fantahimura


    Oct 22, 2011
    As the guys have already pointed, there are a lot of benefits from using Unity. Using C# and its garbage collecter provides superior productivy compared to using the Obj-C model of reference couting, which can be a pain in the eye for newcomers.
    Now, Obj-C has the ARC (automatic reference counting) that has lifted a heavy weight from the shoulders of developers, but still, Unity has the advantage of porting to multiple platforms.

    One thing that turns to be great is the community itself. There is the Unity Asset Store, where you can find extensions that have been made to address the lack of some functionalities on Unity. For example, there are some 2D extensions that are very helpful when designing 2D games.

    Hope it helps,