Which engine is best ?
I've finded some engines : Ogre, Irrlicht and direct rendering from opengles (convert .obj files into buffer and rendering it).
I've compiled Ogre - CeGUI works very ugly on iPhone... And Ogre has many-many files :)
I need just rotate, zoom and object picking for static objects.
Which method/engine is better ?
And, for example, when i use Ogre - can I use antialiasing ?
When I have rendering directly by glDrawArrays, i can use software AA (for example, jitter method).
Can this some of engines?
I suggest you take a look at http://isgl3d.com/. It is written in Objective-C, simple, compact and is appropriate for your needs.
There is also Cocos3d (an extension to cocos2d which can handles simple 3d things) with no physics and collision detection but I prefer isgl3d.
If you just want to render some static objects with rotation and zoom, you can write it from scratch in OpenGL ES in much less time than what is needed to learn to use a big 3D engine like Ogre or Irrlicht.
http://nineveh.gl/ - NinevehGL not yet released but it's really easy to learn engine
I've used Irrlicht for years and I love it. Very easy to learn, very fast and a breeze to compile and use.
Related
I've tried reading up on Core Animation, Quartz, OpenGL, and cocos2d. While I think I have a feeling what they're all meant for, I still can't decide what's appropriate for the project I'm undertaking. The requirements are straight forward, I need to be able to import a custom font and draw it. I need to draw lines and arcs.
I tried using OpenGL ES for this, but it was very hard to work in custom fonts. Between Quartz and Core Animation, I'm not sure what's applicable. The application will always be in 2D. Performance is important. I have a feeling Quartz might not be appropriate since you can use a finger swipe to move the screen to a different part of the content and it seems that redrawing that much content with Quartz is heavy on the GPU. Not sure though, this is all from reading.
The outlier is cocos, since it seems to fit into a couple different buckets. It seems closer to OpenGL, but without the insanity when it comes to loading in custom fonts. There didn't seem to be enough info to get a feel for whether it would fit for this project though.
I have pretty extensive experience with both Corona and Cocos2d. Corona is easy to use and great for a beginning programmer. There's a fairly large class of apps that you can write in Corona, but if you're looking for high performance, your best bet is Cocos2d. There's practically no 2D app you can think of that can't be written in Cocos2d. I recommend Steffan Itterheim's book if you're interested in learning it.
Best of luck!
Sounds like you need Ansca Mobile's Corona and x-pressive.com's Text Candy library:
Corona SDK
Text Candy
I have been looking into Open GL ES, Quartz 2D, a framework called cocos2D and I am not sure what would be the best direction to move forward in when making a 2D game. I am planning on making a pretty simple not to intense game and I am new to game development but not to iphone development.
Which would be the easiest to learn? Which one would give the best performance ?
Thanks
I was in the same position as you and I chose Cocos2D. It's perfect for a beginner. It's basically a wrapper for OpenGL ES, and it's open-source so you can see how it works and modify it to your liking.
Starting with Cocos2D is a good idea because you can make a lot of abstraction from complex low-level functionality, while achieving a good high-level overview of your game. While developing, you will pick up some low-level details as well, so that you'll be more prepared for them in future games.
Plus, Cocos2D has a really nice structure for simple 2D games. If you were to write this yourself in say OpenGL ES, then you would just lose a lot of time that you could be spending actually designing your game :)
But that's just my opinion.
Oh and don't worry too much about performance. Cocos2D is fine in that aspect. Like I said, it works on top of OpenGL ES so the drawing is done very efficiently. It also supports stuff like sprite batching and texture atlasses, which is good for performance.
As the goal of these frameworks is to provide simplified game development, this is definitely the way to go. Of those that you list, two of them are graphics "engines" (Open GL ES, Quartz 2D), and one is a game engine (cocos2D). If you choose graphics, then you'll probably have to write quite a bit of extra code, even for a simple game.
I was just have an idea of creating a card game and I was just thinking whether to use OpenGl or CoreAnimation.Can you please tell me whether it would be a bit of a overkill to use OpenGL for s 2D card game.Thanks :)
It's hard to say without knowing more. You can get pretty far using CALayers, images or drawing with quartz for the cards though. It really depends on the level of visual effects you are considering. If it's just moving cards around, then I'd say use layers.
Might want to check out GeekGameBoard.
"A small framework for building board and card games, using Apple's Core Animation."
Given that Core Animation uses OpenGL for rendering, you probably won't notice much of a difference in performance or memory usage. I don't think that you would gain anything by using OpenGL. Plus, you would have to handle all the animations on your own, as opposed to the prebuilt "set it and forget it" technique in Core Animation.
On an iPhone:
If I am writing a game that has multiple levels, with multiple animations (image sequences), jpg and png (transparent), some full screen and some not, some looped and some played once only. What is the best way of doing it? Each level might have up to 10MB of images. Add on to this music, and video (cut scenes). All 2D graphics, no 3D models.
Is OpenGL required? Or can this be achieved with Quartz or Core Animation?
I do similar using UIViews and a bit of Core Graphics (Quartz 2D) and it works fine. I've found the custom drawing in Core Graphics pushes it a bit further, tho - UIViews work best when given images rather than having to draw themselves. Also watch out for lots of transparencies. You'll probably find that large or long (many frame) animations will be the killer, though. There are some techniques for minimising the impact of the animations which involves allowing it to purge images from memory if not being immediately displayed (I forget the setting). This may result in your animations not being as smooth as you they would otherwise be (not sure if Open GL ES would help here, though).
You should probably prototype using UIViews, and decide then if it's worth doing the extra work for OpenGL ES. Also, if you're not already familiar with OpenGL/ Open GL ES it's a steep learning curve.
I've used both Quartz and OpenGL to do graphics on the iPhone, and while OpenGL has a much higher learning curve, it gives much better performance than Quartz. Let's say you have a scene that involves drawing 6 large, semi-transparent images on top of each other. Quartz will do it, but you'll probably get 15fps at best. OpenGL takes advantage of the iPhone's PowerVR chip and the drawing is hardware accelerated - so you can load those images into OpenGL textures and render at 25-30fps no problem.
I would agree with Phil though - try doing it using Quartz and see if it meets your needs. OpenGL is extremely powerful but it's API lacks some of the convenience features of Quartz (such as saving/restoring graphics state).
One another note entirely, you might want to take a look at Unity's iPhone development tools (http://unity3d.com/#iphone). They leverage OpenGL but provide you with an IDE to create your game. It abstracts away all of the graphics-level code, so you can focus on the high-level gameplay. My brother uses it to write iPhone games, and it's extremely cool.
I recommend having a look at Cocos2D iPhone.
cocos2d for iPhone is a framework for building 2D games, demos, and other graphical/interactive applications. It is based on the cocos2d design: it uses the same API, but instead of using python it uses objective-c.
Most likely OpenGl.
One advantage of using OpenGL ES would be that the investment of time for learning the technology could be applied to other platforms/contexts and your game is potentially more port-friendly. These may not be important to you.
I would suggest using Quartz. OpenGL ES is really best for 3d stuff. However both work fairly well, so if you already know OpenGL ES, it's fine to use that.
You should consider using a lot of less resources in your game, Apple recommends not to use more than 10 mb in texture for openGL apps.
Try texture atlas, reuse graphics, tile based graphics...but avoid to use to much graphic assets.
When you drag an iphone GUI element like a list, it scrolls in a physics correct way, and also has a nice bounce effect at the end.
I would like to write a GUI element in my game, without using UIKit. I wonder where is the code implementing this, and if I can use it instead of trying to write something similar.
Any ideas?
I think that a physics engine would be overkill for just animating a gui element (unless you already have a physics engine in your game).
You could try using animations but I've no experience of doing this without UIKit but I suppose you would start here?
If you didn't want to use Core Animation, I would take a look at Robert Penner's easing equations - they're in actionscript but are pretty simple to port to C and would be a good start to get your own animation code started.
Hope this helps,
Sam
You can perhaps use animations to achieve this, you can define animation paths for bouncing or doing whatever it is you need and activate them when needed. I think the example project MoveMe can help you out
I can recommend the O'Reilly book "Physics for Game Developers" by David Bourg, which has great coverage of algorithms and code for all sorts of simulations. You probably want to start with motion affected by drag for the flick and gradual slowing, then look at a spring model to simulate the damping at the end.
box2d is an open source project that provides a great 2d physics engine.
this library is used by Intel clutter, which is a nice physics oriented UI library that is capable of running on mobile devices. that means that box2d is already optimized for mobile platforms like the iphone.