Cocos2D HighScore framework - iphone

i'm a new developer working on a game project using Cocos2D, I need help in integrating HighScore in my game, is there a good framework for this? or should i do it from scratch using TableView? i tried to find something related to this using google but all the topics were from 2009/10.
Please help!

If you don't want to reinvent the wheel and cross-platform is not a concern, you can add a simple GameCenter leaderboard first (Apple provides a standard leaderboard view which your apps can use, you have to create the leaderboard on iTunes connect before implementing it).
Later, when you have the default version running, you can customize it to make it look like your game. You can read more about all this in the Game Center Programming Guide.
If on the other hand you want to avoid using Apple provided classes, see this thread on the Unity forums where some alternatives are mentioned.

I have recently done high score implementation in Cocos2D game and i did something like following. Hope this helps.
(I have stored only top 5 high scores.)
Created HighScore.plist file with empty array (HighScoreArray) inside that.
In AppDelegate.m Copy HighScore.plist if its not in User Documents Directory.
When game is over you need to calculate and update HighScore.plist.
First of all check if current Score is not 0 (Zero).
Check if HighScore Array contains 5 scores.
YES then insert current score. Sort array and remove last object update plist.
NO then insert current score. Sort array and update plist file.

Related

Best way to build a camera app on iPhone

I am thinking of building a camera application - with the ability to do image processing (adjust contrast, apply different image filters) while you are taking picture or after the pictures has taken.
The app will also have the ability of drag and drop icons.
At the end you are able to export the edited images either to the camera roll or app memory.
There is already many apps out there like this. (Line Camera) etc...
Just wondering what is the best way to build such app.
Can I build the app purely with Objective C ios sdk? or do i need to build it with C++/cocos2d, etc...
Thanks for your help!
Your question is very broad, so here is a broad answer...
Accessing the camera/photo library
First you'll need to access the camera using UIImagePickerController to either take a new photo or grab one from your photo library. You can read up on how to accomplish this here: Camera Programming Topics for iOS
Image Manipulation
AviarySDK has much of this already built for you. Very easy to set up and use in your apps. You can download their sample app for free in the app store if you want to see what it can do. Check it out here: http://aviary.com/
Alternatively, read up on Core Image if you'd like to avoid third-party libraries. See Core Image Programming Guide for more information.
There is absolutely no need for cocos2d which is a game engine.
You can accomplish everything you mentioned using only Objective-C.
If you want real-time effects you will need to dive into OpenGL. you can use GLKit if you target iOS 5 and above.

Augmented Reality Application in iOS

I am trying to create an ios application using which we can convert a real life object e.g Sofa, Table as 3D objects using IPhone's camera. These 3D object info can be saved in the database and can be displayed as Augumented reality objects when the IPhone camera is pointed at some other part of the room.
I have searched the internet but could'nt find any info on where to get started to convert real life objects to 3D objects for viewing as augumented reality objects.
check below link where you found SDK and also sample code for implement AR
http://quickblox.com/developers/IOS
I think any way you go with this it's going to be huge task. However I've had good results with similar goals using OpenCV.
It has an iOS SDK, but is written in C++. Unfortunately I don't think there's anything available that will allow you to achieve this using pure Obj-C or Swift.
You can go through following links
https://www.qualcomm.com/products/vuforia
http://www.t-immersion.com/ar-key-words/augmented-reality-sdk#
http://dev.metaio.com/sdk/
https://www.layar.com

How to record game in cocos2d iPhone

I am developing a cocos2d app.
It's almost completed but now I want to record the activities of my app as a video file, including sound produced by the app.
How can I implement this?
Anybody can help me.
Please suggest a way to implement this.
Thanks in advance.
The question isn't new, but since it isn't answered I thought I'd pitch in:
We provide an SDK called "Everyplay" that allows you to do exactly what you're looking for. It's free to use, and is lightweight.
We provide out-of-the-box integrations for Unity3D, cocos2d (1.x, 2.x), cocos2d-x, and you can of course integrate to a custom OpenGL-based game engine.
The documentation is available at https://developers.everyplay.com/doc
The documentation contains an example app key to use when developing, but you can of course sign up for your own client key at https://developers.everyplay.com/
There are many options - and the fact that your app is cocos2d doesn't matter much.
iSimulate works well. You can actually play the app on your device and record the gameplay as well as the touch events. This is important if you want to show user interaction in your app. You run the app in the simulator but you control it from your device.
If you just want to record the app interaction without caring about showing users the touch events, you can use Screenflow or Jing or some other recording software. I used to use Jing (free) but Screenflow works better for me and it also lets you create more advanced video like a trailer with effects. edit You should be able to capture touch events through the simulator with Screenflow too. You can choose to show them or not. And can use different indicators for those events.
Search on google for mac or iphone recording software. There are many options. I had the best experience with Screenflow because I wanted to make a trailer and gameplay video.
I'm developing similar application which allow user record the activity within cocos2d-x activity.
I'm using screen capture method and then combine it using FFMPEG. The performance wasn't too good thought but is the easiest way to achieve.

how to add the animation in iphone application using open GL or coreGrapics

i am working with a customer feedback application here i am planing to add some animations like on click of next question one cloud should come n drop the questions or some thing like that, can i do that using core graphics or should i use openGL? can any one give me some sample codes or tutorial links?
I say stay with CoreAnimation as long as you can and only use OpenGL if really need to. Most things are easily doable with CA, and you get lots of features for free (smooth animations, fading, ...).
You can do this using CAKeyFrameAnimation. You will easily find some sample of this. Try google my friend.

iPhone game highscore server with OpenFeint

Im building an iPhone game and would like to implement a fairly simple leaderboard using OpenFeint.
However, I don't really want the full-blown OpenFeint app to reside within my game, rather, I would like to simply use OpenFeint as a datastore and ranking calculator.
Ideally, I'd simply like to display the scores much like Canabalt has done so.
Is it possible to use OpenFeint without all the OpenFeint UI?
Cheers,
Byron