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!
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.
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.
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.
Nick Breslin, Social & Unity Developer
Founder of Etiquette Studio
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.
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
ElectroCute * Smack Boxing * TouchWars * Monster Ball * Smack Hockey * Tactical Soldier
Unity SmartFoxServer API * Unity Asset Server Commit Mailer
Follow on twitter: http://twitter.com/thomas_h_lund
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.
In fact that was my main reasonOriginally Posted by Thomas LundAnother 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
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.
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!
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.Originally Posted by ChoinkeesHaving 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).
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.
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.
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.
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
PreviewLabs - the game starts here
Unity3D have some IDE! And cocos2d don't! for us is simple like that
Easy porting among multiple platforms is the main reason. Also, my background is in C++ but I like C#.
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,
m.gaia studio: Fun with purpose