Unity for 2D games - ios

Ignoring price for the moment, would using Unity for a 2D game be better than building one natively in iOS, i.e. faster and more powerful because of the underlying OpenGL usage, or is it either not supported well, complete overkill, not much better than just using UIImages and/or Quartz, or for some other reason worse?

Depends on the game. If you have under 100 or so sprites, you can just use UIViews without any big issue. Over that and you're starting to get in the realm where OpenGL will matter.
If I were doing a game with with lots of sprites or particles, I'd certainly look into Unity. Then again, I'd also look into Cocos2D. (I'm not directly familiar with either, my games are all UIView-based.)

Building any game using Unity instead of just UIKit/Quartz has the advantage that it will be easier to port it to other platforms if you want to.

Related

Rendering all sprites to a texture or as separate quads?

I'm wondering what the most effective way to render sprites using Stage3D is? Do I render them into one texture (kind of like rendering everything into a BitmapData buffer), or do I render them into separate textured quads (Using starling, for example)?
I will probably end up with quite a lot of sprites, since I plan on writing a tile map engine, that can probably have layered tile maps etc.
Best Regards,
Tomas
From what I understand you should use Starling. Starling has been recommended to me multiple times based on the need for performance. I personally don't need high performance and don't have the time to learn Starling before my project is due (Adobe Air for a mobile game). Good luck.
As far as specifics, you may want to run through a few tutorials and decide upon a direction.
i recommend you to go for Starling because of:
friendly api
advanced optimizations
transition from native flash to starling is easy
helpful community
if you are curious about Starling and tile maps then check:
explanation how Starling uses stage3D to render objects
Starling extension which works with exports from Tiled engine

Working with images on iOS platform

Information:
I want to do some tasks on images such as resize, crop, rotate and so on.
I hope they could be objects so that I can manipulate them one by one easily. In development time we could run up to several images at the same time to working on, just a-little-like game programming.
I see there's several things to choose toghether with XCode:
- Cocoa (default?)
- Quartz2D
- OpenGL (ES 2.0?)
- Cocos2D/Box2D
I'm new to mobile development as well as iOS.
Question:
- Because I could choose only one to start with, which should I choose? Or are there any other libraries/frameworks?
I've used Cocos2d Cocos2d for a game and it was pretty easy to pick up and manipulate images on screen. As it is build on top of OpenGL it abstracts you away from the nuts and bolts. But also it might be a bit heavy for your needs.
So if you can do what you need in Cocoa then use that but if you need more then look at Cocos2d.

Graphics for a iOS 2D Game

I've already published a 2D game on the App Store, but I've noticed that when I add too many objects, the fps drop down, and it's a quite simple game, so I believe it shouldn't happen.
So I think that I'm not rendering the graphics properly.
What should I use, OpenGL ES, Quartz 2D, ...?
I've been reading Apple's documents about OpenGL ES for iOS, but they hardly ever mention 2D, so I'm not sure if it can be used for this.
I'm now using Quartz 2D, (I guess it's UIView, UIImages, UIImageViews), but in fact, I'm not using the drawRect method of the views, ever. I create the images or graphics within the init function of the view, and a save them into a variable if I need to modify their properties later.
Any suggestion, recommendation, pdf would be highly appreciated! :)
PS: Here's a link to the game, if you want to have a better idea about it: http://itunes.apple.com/es/app/kipos/id494638587?mt=8
I recommend you use Cocos2D. Its features will make game development a lot easier for you. If you think you're up for a challenge, try OpenGL ES. I'll warn you though: it has a very steep learning curve.

What options for decent particle effects engines do I have for iOS?

The core question is "what are my options for decent particle effects in an iOS app?"
I wrote an iPad app where I wanted to use a large amount of UIKit objects in the UI and just keep to a native iPad codebase feel. However I wanted nice particle effects, so instead of going with cocos2d and distancing myself from using native objects directly, I wrote my own particle effects engine utilizing quartz. It works, but the performance is very underwhelming.
Do I have to go with an openGL ES solution to get any good performance at all (openGL and uikit view don't play nicely together); Are there any libraries out there that will let me simply add a UIView that contains the particle effects systems layered in my app as I see fit to place it (pretty much what I've tried to do with pretty bad performance)?
(Forgive me if my usage/knowledge of GL is rusty; I've been out of sight for a few months and do not have a strong handle on it.)
I believe they've added particle effects to Core Animation as of iOS 5. Try this video or look up CAEmitterLayer.

Language/Program for simple 2D animation

I want to write something like this: http://www.youtube.com/watch?v=5S4KpCkHDqM I mean, I want to have 2D gaming space, but to have stylized as 3D, so my characters will move on the surface, but will have nice 3D effect. I wounder if Flash/ActionScript will do? Any other suggestions?
Flash and Actionscript can definitely accomplish this. There are at least 2 ways to accomplish the 3D look in 2D space.
The easiest is to do as #Blender said in the comments. Render some 3D images and bring them into flash. There are easy tools in flash to create animated sprites, including a native movieClip class, that has a timeline to play back frame-based animation.
But there is also full 3D in flash. You can bring low-polygon 3D models into flash easily using free and open source libraries such as Away3d (away3d.org) and papervision (papervision3d.org). Presently, flash player 10 has runs slowly when using these libraries.
But Adobe is about to release a new version of the player (version 11) that supports open GL for 3D and has significant performance improvements.
Away3D and papervision have already developed version of their libraries to support the new beta player and openGL.
So to summarize, yes - flash can make a game like that. It is currently the best way to develop games that are intended to be played in a browser. Because at least for the time being it has the most widespread support, and is stable between platforms and browsers.
Your example is pretty much entirely 2D: it just uses effects like shadows, animation and parallax scrolling between layers to achieve a (mildly) 3D effect.
As Plastic Sturgeon and Blender have pointed out, Blender might help for creating your assets - but it has a pretty steep learning curve, and you might be more comfortable 'faking it' in Adobe Illustrator or Photoshop if you've used those before.
Once you've created your assets, you need a platform to put together your gameplay: Flash is one possibility, but you could also look at Unity3D, which has good support for 2D and 3D, and has a browser plug-in if you want to make your game web-based.
If you're looking for a java-based solution, you could try Processing, which is cross-platform, and can export to javascript for web deployment. It's not exactly designed as a gaming environment, but it might do the trick - and it's free.
Hope this helps.

Resources