Quartz 2D vs OpenGL ES Learning Curve - iphone

I have been developing iPhone Applications for a couple of months. I would like to know your views about the Quartz vs OpenGL ES 1.x or 2.0 learning curve. You can tell your perspective. My Questions are
*I am a wannabe game developer, So is it a good idea to first develop in quartz , then move
on to OpenGL ES or does it not make an difference
*Can you please tell your experiences when you were having the similar question
Thanks :)

Quartz 2D is not applicable for game development IMHO. It is a software rendering API. It won't give you realtime rendering speed. It's good for drawing charts or vector text with shadows, or for blending several images together. Just not for games. Unless you want to make a game where few images are moving against a monochrome background and even in that case I doubt it will be really smooth on older devices. I've seen some games obviously coded with Quartz. A pitiful sight.
Sooner or later you'll end up using Open GL ES or a game framework build on top of it. I recommend you to check cocos2D, SIO2 engine, or examples from SDK.
With careful programming it is possible to make an Open GL ES game with parallax scrolling and relatively small amount of objects work at 60 FPS even on 2nd gen devices. Tiny Wings is an example of such game. And maintaining stable 30 FPS is not a problem at all.

I skipped Quartz and went right to OpenGL ES. I started with a 2D sprite based game. Thought it was pretty easy.
The key is having a good example to look at. I used the Lunar Lander clone (Crash Lander), but I don't think that's easy to find anymore. Maybe someone who has done it recently knows of a better, newer example that uses current best practices.

I'm in the same boat as you describe, although I have no programming background. (Although I don't know what your background is either) Currently, I am in the process of learning to code as I learn the various API's that are available. I'm an objective-c guy going backwards to the c-based Quartz API, and it's a little bit of a challenge. Luckily, Programming in Objective-C 2.0 by S. Kochan has a great chapter on underlying C features to keep you afloat.
I have taken a couple of stabs # OpenGLES, and I have to say, that from a conceptual standpoint, I'm not ready for it. The Quartz2d API is a bit easier to learn conceptually because it's very easy to get up & running with a few commands. Right now, I'm at the point where I can define shapes and point to point images with out too much trouble.
OpenGLES is going to be something in my future, but it takes such an enormous amount of code to configure the drawing view, set up buffers, etc. If you are familiar with everything the code is doing, then it's a bit easier. However, from a learning perspective, Quartz is an easier way to get going, quickly.
Resources I'm using: The aforementioned book, and an anemic amount of blogs containing tutorials, which are limited # best. At this point, make an appointment with the apple docs and get cozy, because it's about the best (free) stuff that's out there (& exhaustive) With that said, I'd love for someone to prove me wrong on this site by posting a great resource for learning, but that's about it. Good Luck.

I have been looking for the fundamental differences so I can decide between OpenGL (ES) or Quartz or a hybrid. The good news is that the hybrid is an option. Clearly Quartz is easier to master for O-O programming and the answer from Apple appears to be that OpenGL, "...is ideal for immersive types of applications..."
http://developer.apple.com/library/ios/#DOCUMENTATION/General/Conceptual/Devpedia-CocoaApp/DrawingModel.html
I don't want to limit the category to games as I believe any game UX can be applied to a business App, a productivity App, entertainment viewing, etc. By the same token, I fully expect the technology (both h/w and s/w) to advance to make either a choice.

Related

High Graphics 3D Game Development for iPhone

I have good experience with the iPhone development tools and making apps with window based applications and stuff. I am now trying to make an awesome 3D game, which is an area I have never tried out.
I am very interested in learning about the development of "INFINITY BLADE" and I am very curious to know how it was developed and how they were able to develop it with so much detail.
I had already looked at links like iPhone 3D Engines, but it seems outdated.
Where is a good place to start for learning HIGH Performance 3D games for iPhone / iPad ?
Could you share any tips on the development life cycle for the 3D Games ??
Tools used for making high quality 3D images for the creative side of iPhone Development ? And resources on the creative side ?
Could you share the game development life cycle for a particular app , or perhaps your comments on the development of Infinity Blade ?
This isn't a full answer, but I decided to post it anyways.
Infinity blade was written using unreal engine 3, which recently (or not so recently) got an export to iPhone option. Unreal engine is the same engine used for games such as gears of war. I'm assuming that the actual difficulty of getting high quality graphics to run well on the iPhone was handled by unreal engine. As for making the graphics, I'm sure they hired a (bunch of) 3D artists. You can get the UDK for unreal off of their website, which allows you to start learning with it. The only caveat is the cost of the engine when you actually want to release a game.
I've never actually used it so I can't give too much information on it, but you could try looking at cocos2d's lesser known sibling, cocos3d. That would probably be the most cost effective way to learn how to do some 3d game programming in obj-c.
http://brenwill.com/cocos3d/
But if you're looking to bang a game out quickly and learn a good amount about game development, Unity3D might be the best option. They have a few really good hands on tutorials.
http://unity3d.com/support/resources/tutorials/
I might be wrong, but I think Unity might require the use of C# under mono, in which case I'm not sure if that would be something you're looking for.

iOS based OpenGL ES programming

I need to find resources for learning openGL ES for the iPhone.
I've already watched Brad Larson's awesome videos and I'm downloading the advanced videos from apple now.
I know a lot about iOS programming but am clueless on OpenGL, so resources that don't assume I already know openGL.
I want to learn a majority of the OpenGL capabilities, but my major goal is to be able to manipulate an image based on the touch locations. More specifically I want to create a water ripple effect that follows the users finger.
I know there are many equations on StackFlow that implement this, but I'm lost when it comes to finding out how to use them.
I appreciate the kind words on the videos. That definitely makes the class feel like it was worth doing.
Do you have the course notes for both semesters of the class? The spring session notes can be found here in HTML format (VoodooPad format here) and the fall ones here (VoodooPad format here). The links in iTunes U aren't very obvious for those, and they contain many links to OpenGL ES resources that I thought were valuable, as well as all the sample code I show off in the classes.
I like the job that various instructors at Stanford have done with their class sessions on OpenGL ES as part of their iPhone Application Development course (also on iTunes U). They provide a different perspective on the API than I do, and both of us come at it by not assuming that you know OpenGL.
As Bart suggests, Jeff LaMarche's "OpenGL ES from the Ground Up" series is extremely popular for good reason, and he's been posting unpublished chapters from his book on OpenGL ES 2.0 lately as well.
For books, I highly recommend Philip Rideout's iPhone 3D Programming, which introduces fundamentals like the math involved, and takes you all the way through to some fairly advanced techniques. It's also one of the few books to spend a significant amount of time with OpenGL ES 2.0.
However, the best thing that I suggest for learning OpenGL ES is not to spend your time reading books and articles but actually formulate a simple project and try to implement it. Find sample applications out there that do many of the things you want to, and pick them apart. Go back to these resources when you run into brick walls and you'll better understand how the concepts all fit together. I knew very little about OpenGL when I started out with my first application using it, but I built small pieces and standalone prototypes until I knew enough to piece together something that worked.
In your case, I'd look very carefully at the resources linked in the answers to the question "GLSL for simple water surface effects", which do exactly what you want. One implementation uses OpenGL ES 1.1, the other 2.0-style shaders. Pick a way that you want to go (my personal recommendation would be to learn shaders now) and try to make a crude, functional application while working through the above videos and reading material.
You might want to have a look at this: http://iphonedevelopment.blogspot.com/2009/05/opengl-es-from-ground-up-table-of.html
These tutorials seem to be relatively beginner-friendly.
More specifically I want to create a water ripple effect that follows the users finger.
Here is code that does exactly that: http://developer.apple.com/library/ios/#samplecode/GLCameraRipple/Introduction/Intro.html#//apple_ref/doc/uid/DTS40011222

How to make good looking custom ui in mobile and tablet devices?

I'm looking for an intro into designing and making a custom and dynamic UI on mobile specific platforms. As I understand Nokia(Qt), Android, and iOS all use OpenGL ES (2.0?). I haven't looked into Windows phone 7 yet so not sure what that uses. So I think OpenGL would be a pretty good place to start. While OpenGL is mostly about 3D, I'm also open to 2d ways of creating dynamic UI.
I've never really been big on designing interfaces or coming up with cool concepts but now I have an idea for a mobile app that really needs a good looking user-interface. It's sort of a half app, half game type of thing. It really targets people in the gaming community who I think are used to a bit more polish and advanced UI. I could still probably get away with a simple UI(simple not being a bad thing) but I think I at least should learn some design techniques for future reference.
Of course I realise that excessive eye candy which hurts usability, like bloated graphics that slow down the mobile, are of no use at all. I'm trying to make a sleek UI that while looking good allows the user to interact well with the app effectively.
Any suggestions, resources, experience you can share would be most helpful.
EDIT: While I'm looking for ways to use 3D graphics, I'm more concerned with how to come up with a sleek UI in a mobile. I come from a mostly web developer background, with some experience in Photoshop(CSS is the furthest I've gone in designing). I have never really had to design a dynamic interface that reacted to touch and moved all around the screen with some laws of physics attached. There are lots of such effects, such as the carousal effect, which gives the user an enhanced experience. I have no idea how to incorporate these effects into a mobile device. For example, one of the things I need this app to do is take a glassy circular object(a button) that moves around, then turn it into a sort of convex glass lens so it's sort of zooming in on the image underneath to make it look like its actually a magnifying glass. I looked around and this effect is created by a "grid warp" or a "mesh warp". Suffice it to say I have no idea how to do it.
This will help you not only with Windows Phone 7. WP7 uses DirectX 9, but not directly, you must pick XNA or Silverlight(no other options). Also these blog posts I find quite usefull.
For game, game related app I would stick to one design, and as you said start with OpenGL.
I have been searching since yesterday and thought I'd add some links for anyone interested.
Although I'm dividing them up by the platform the articles refer to, with some elbow grease the ideas should be cross-platform compatible.
Qt
Carousal animation in Qt
Shadow effect Qt
Qt Kinetic Scrolling describes kinetic scrolling algorithm in Qt(self descriptive really)
Qt OpenGL Nehe tutorials converted to the Qt environment
Iphone
OpenGL from the ground up - expansive list
Flow Cover tutorial.
Android
Android 3d Tutorial
Another Android OpenGL tutorial
Yet another Android OpenGl ES tutorial, seems people have gone open-source mad.
Custom UI on Android
One finger zoom tutorial at Sony Ericsson Developer World
3D list at Sony Ericsson Developer World
OpenGl/ES
OpenGl tutorials at NeHe, there are tons, I read through the first one (on light) and it was really informative.
TheRedBook intro to OpenGl
Books
Books list at Design4Mobile, these do not cover the technical side rather covers the things to keep in mind when designing mobiles, I think the O'Rielly one should be pretty good.
Inspiration
10 beautifully designed Iphone Apps - for a touch of inspiration
All rounder
Mobile TutsPlus sort of a gathering of tutorials for android and iPhone
That's I found in the last four or five hours, as I find more I'll add it on. I've also made this a community Wiki so others can correct any mistakes I've made here, or to add anything they feel relevant.

Game engines for iPhone vs. native iPhone sdk development

What are people's opinions and/or experiences with game engines such as Unity or Torque Engine? If one were new to iPhone game dev is it worth it to learn one of the engines? What is the performance difference between apps generated by those engines vs a natively built App using the sdk?
Both will equal the performance of what most people could write themselves (i.e. if you're not an experienced game engine developer).
Whether it's worth learning (and buying since both Unity and Torque cost for iPhone development) you'll have to ask yourself two questions:
Is my game idea suited the engine?
Is my passion for programming or game design?
Looking at the range of games made with Unity, it seems very flexible because although it is a 3d engine, lots of 2d games have been made with it. The downside of using Unity for something very simple (say, a match-3 tile game) is that it's a bit over the top in terms of download size.
On the passion issue, some people like programming a lot and will always feel it's better to write the engine themselves. And that's OK. But if you have a great idea for a game and just want to 'bring it to market' as soon as possible, and it requires 3d rendering, character animation, that sort of thing, using Torque or Unity is going to get you there a lot faster.
If you want to do 2d development you should have a look at cocos2d iphone it is implemented in cocoa free open source and very easy to pick up
I think time to market is important to consider - if your going to burn out after a short time and of the engines mentioned above will allow you to build and launch a game quickly compared to writing the engine & game from scratch.
Like U62 said, where is your passion?
Currently I'm building a framework/engine and a game. Its a great learning experience, but we had to understand that it would take a long time (we have day jobs) and that we have to just keep chipping away at it. So far, the experience has been an eye opener and I've learned a great deal ... however, would I do it again? Probably not - I think I prefer designing the game and coding game specific logic - not engine specific.
I've done a lot of research on the platforms and I personally really like Unity. You can email them and request the iphone trial license.
Anyways, good luck!

What do I have to learn to get done with a 3D racing game for the iPhone? What Tools do I need?

I know Java pretty well. I know now most of the Basics in Objective-C.
I know nothing about Photoshop. I know how to use TurboCAD 10 Professional, so I do have some experience in 3D object modelling. Although not much.
What do I have to learn step-by-step, to come to 3D game Development for iPhone? What Tools do I need? Which Books help out? How long did you learn?
Learning the basic ins-and-outs of OpenGL ES on the iPhone took me about 3 weeks. I post some of my observations on the subject here. The source code to my Molecules iPhone application, which uses OpenGL ES, is available here. Maybe you'll be able to find something useful in that example. However, there's nothing in there that deals with textures, which you'll probably need for your game. Bill Dudney has posted source code for a Wavefront OBJ modeler on the iPhone that may help in that regard. For a good text on OpenGL ES, I'd recommend "Mobile 3D Graphics: with OpenGL ES and M3G".
When it comes to Cocoa development in general, it will take you a little while to get up to speed. For me, it was about 6 months before I felt comfortable with it, although that was in the more complex Mac desktop environment. I post some resources for learning Cocoa here, although that's by no means an exhaustive list.
I agree with diciu, this is a bit much for someone just starting out on the platform. I'd find a simpler application or series of targeted applications (that you may never even release) to help you learn the core concepts before you leap into 3-D game design.
Your goal is very ambitious - I think it's a very hard project to tackle as the first project on the iPhone and you'd be better off starting out with a couple of simple Cocoa touch applications to get a feel for the platform.
For a simulation game I would start with experimenting with some physics engine such as bullet. Bullet is C++ and you can use it from Objective-C++.
For rendering 3D you probably want to use OpenGL ES.
I guess that OpenGL is worth a look.