I am currently working on my first IOS app and have sort of hit a 'brick wall' if you will. I am using Cocos2D for most of my graphical interface do to my preference and ease when working with chipmunk.
Currently I am trying to create a scene that has at least 2 layers displayed at once, split screen style. One layer I need to be a vertical scrolling menu, while the other layer I need to be a pan/zoom 'map' type layer. Being the noob that I am when it comes to Objective-C and Cocos2D I can not seem to figure out how to even attempt this. I have done some searching and came across the extensions for Cocos2D which offer the pan/zoom layer.
Any help or pointers to tutorials, references, sites, etc. would be greatly appreciated!
Related
Weird crazy question I know. My current setup is a SCNScene with a camera controlled by the device's gyroscope. I'm able to add and light normal nodes, however I would like to add 2D UIView objects into the scene like UITextViews or maybe some buttons. The views would need to be inside the scene and thus become no longer visible if the camera moves away from them.
Firstly, is this even possible? Or would this be way more difficult to implement than rebuilding an editable textview as a node? Could this be achieved by categories or...?
I just talked to the scenekit people here at WWDC. He said that as of now it is completly impossible to do it in a nice, functional way. The only options he offered as a possible solution is to create the UIView element somewhere off screen or behind the scene and continuously take screenshots of the object and apply those images as a texture to a SCNNode. He also pointed out the performance will be very poor with this because taking screenshots is heavy and you can't get going very quick with it. So I guess this is a no-go until UIView adds support because, according to the engineer, it's impossible to implement this because of a UIView limitation and not a SceneKit one.
Several years ago I was curious about creating some objects (spoon, ball, tv, ...) in 3d modeling program, export the textures, and then have a screen in iOS app, that can open one object at a time with a possibility to rotate and zoom it. This seemed quite basic and most used case but I didn't find any simple and ready to use solutions/libraries/plugins, just raw OpenGL ES (GlKit), so I refused to use it, as it would require too much knowledge and time as I haven't done any 3d stuff before and my primary work is not related with 3d.
There are also Unity and Cocos3d engines, and it looks like they allow to extend the code by using iOS plugins (xibs/storyboards, navigation with view controllers and etc), but this means you have to make your app project as Unity/Cocos3d first, and only then add your usual UIKit stuff as a plugin. Now that is not acceptable because the project should be written using UIKit first, and I expect to add 3d viewing stuff as a separate component that encapsulates all the necessary stuff inside it as a black box, because I don't want to mess my project up, as this 3d stuff is an optional feature.
Now, after several years I'v searched for the thing again looking for simple 3d viewing plugins/solutions for UIKit, but the situation is pretty much the same imho. I saw iOS8 there will add Scene Kit, but I'm not sure will it be something close to what I expect. So, still I'm not sure is there any solution that would require minimum time efforts, or is OpenGL ES the best solution for this need.
Check out the CC3DemoMultiScene demo app in the latest version of Cocos3D. It demonstrates how to include a Cocos3D scene in a standard UIKit storyboard, and to have the GL view only a component of a larger UIView.
I am in talks with a client to do an app, but in it, they are wanting it to revolve around a little character that follows you throughout the app (think Clippy, from the old days of Microsoft Word :)).
One thought I had was, can I use an SKSprite/Node inside an iOS app not using the SpriteKit framework?
Or is this a matter of animating through an array of UIImages?
Those were my first thoughts - does anyone know the best direction to go in for something like this? I need basic animations for a character throughout the whole app.
Depending on the detail of animation needed, you could do it with just CoreAnimation and possibly selectively choosing the image to display in an UIImageView. For example, see the answers to this question: rotate a UIView around its center but several times
Simple answer is, No, out of the box you can't use a class from a framework and choose to not use the framework. Though I'm not exactly sure what that question means. An SKSpriteNode renders via an SKScene node, and an SKScene node renders via an SKView, which is rendered by a View Controller.
You could do something fancy like dedicate the SKView as only part of the screen, and have a standard UIKit view as the other part, or only have the SKView appear on the screen when you needed it I guess.
So I am about to start a project for an application (Not a game application) that requires a lot of animation. For example a lot of pie and bar charts that animate on the screen.
If I use cocos2d am I still able to use UI elements such as UITableView, UIButton, UISegmentedControl, etc? Can you combine Cocos2d with normal iOS UI Elements on the same view?
Which one is better for creating simple animations?
What are the advantages and disadvantages of using each for a non-game project?
There is the ability to combine Cocos2d and UIKit, but I don't know to what extent you can take it. Check out this tutorial on combining them: http://www.raywenderlich.com/4817/how-to-integrate-cocos2d-and-uikit
I'm fairly new to iOS programming and did the same research you are currently doing for my project which is very animation heavy, but not a game. I found much more information, forums and tutorials on doing animations with Cocos2d than I did for Core Animation. Not to say it's not out there, or that 1 is necessarily better than the other for what you're trying to accomplish, just my 2 cents and several weeks of Googling.
Check out Core Plot maybe you can use that to build your app.
I am trying to create an animation in which a circle will be containing some text or image inside it, when user will tap on circle, the circle will reveal its child circles, which will be containing some details in text form. This is something similar to discovr app http://discovr.info/. I am totally a newbie in graphics and animation world. I have read several post & documents like where to start with animations, opengl, core animation, cocos2d etc, but still don't know how should I start working on this application. I will be really grateful if you can help me in getting stating up this project. Please also tell me where else I should look for resources.
Thanks in advance,
Regards.
Great start for CoreAnimation (if you don't want to read whole Apple documentation) could be this tutorials by Mike Nachbaur (4 parts):
Animating Interfaces with Core Animation: Part 1
Animating Interfaces with Core Animation: Part 2
Animating Interfaces with Core Animation: Part 3
Animating Interfaces with Core Animation: Part 4
When new iOS trainees in my job are starting to learn CA I often give them this tutorials because everything is clearly explained there.
There are some great guides in the Apple developer library.