implementing Game Center into cocos2d 2.1 project - iphone

I'm playing with Game Center and cocos2d because I want to find out how to implement Game Center into game. All I want is just displaying Leaderboards and Achievements. I have followed this tutorial Integrate Gamecenter in cocos2d game and my Achievements works good, Game Center recognise me at the beginning and LeaderBoard cannot display my scores (I've read it take very long time, but I'm waiting like over 1 day and still nothing).
Today I upgraded my cocos2d from 1.0 to 2.1 beta because I want to support iphone 5 and I saw that Helloworld example is integrated with Game Center!
Can anyone show some sample project or tutorial how to implement Leaderboards and Achievements and recognising current player with Game Center without GKHelper, just clean Game Kit? I don't want to use GKHelper because there are to many functions and I dont need it and to be honest I don't really understand it as well.
thank you in advance :)

Cocos2d has no Game Center integration. It does nothing else but open the leaderboard and achievement views. The cocos2d template doesn't even log in the local player. This minimum Game Center example only exists to show how the view should be attached in a cocos2d app. That's the only area where Game Center and cocos2d meet paths, every other aspect about Game Center is universal, ie it applies to any app, with or without cocos2d.
For a reasonably complete Game Center integration, I wager you'll have to understand and use at least 50% of the GKHelper functions, most if you want multiplayer. And to understand those methods I recommend reading the Game Center Programming Guide.

Related

Does Game Center require Sprite Kit?

I created a quiz game in Swift 4.2 that was NOT built using SpriteKit. All of the current resources that I can find about Game Center integration involve SpriteKit. Thus, I am trying to figure out if I need to make the game in SpriteKit in order to use Game Center? If not, can someone point me to current, relevant resource?
No, you don't need sprite kit, what you need is Game Kit framework, it's the framework that apple provide for you be able to have this connection.
Try a look here first, for the apple documentation:
Apple GameKit documentation
And after looking at this look here for a easier tutorial: Implementing Game Center - Game Kit

Making my Unity Game with Stereoscopic View (VR)

I have built a Unity3D + Google Tango based game on the NVidia Dev. device. Everything seems to work fine, but now I would like to play this game in stereoscopic view (For Dive Goggles). I looked at the ExperimentalVirtualReality example (https://github.com/googlesamples/tango-examples-unity/tree/master/UnityExamples/Assets/TangoExamples/ExperimentalVirtualReality) and was successfully able to port all the prefabs into my game, but for some reason the experience is not satisfactory.
The stereoscopic view of my game tends to over lap with each other when I look through the Dive goggles. The experience is a quite off.
I noticed that there are some public parameters on the TangoVR Player Object in Unity Project for 'IPD in MM', 'Screen Width in MM', 'Eye Offset in MM', etc. Do I have to play around with any of these. What does these values even represent?
Any help or pointers will be greatly helpful and appreciated.
IPD would be Inter-Pupillary Distance, while offset is the distance from your eye to the 'point of articulation' when you move your head.
This describes it (with pictures!): http://gamasutra.com/blogs/NickWhiting/20130611/194007/Integrating_the_Oculus_Rift_into_Unreal_Engine_4.php
I've found when trying to use cardboard lenses on devices with wider displays than the fov of the lenses you get an unsatisfactory experience.
This has to do with the lenses not being in the center of the frame, when focused at the display.
To circumnavigate this with larger devices you can push in the margins of the stereoscopic views. For the tango, with testing standard cardboard lenses I found that things work nicely if they were pushed in about an inch. The apps on the play store, Tango Mini Town and Tango Mini Village do a nice job of demonstrating this work around.
The ideal way to get this working would be with google cardboard and a proper tango tablet 7 inch view controller, but currently the cardboard app is incompatible with the tango. Fingers crossed for cardboard support.
As far as simply playing around with an optimal view points in unity, one can modify the view port rect on the stereo camera inspector menu in unity to get the ideal experience for a specific device with what ever controller you choose.
Thanks for all those who helped answer this. Many of my concepts definitely got cleared but nothing got me close to an actual solution. After researching a lot, I finally found this article (http://www.talkingquickly.co.uk/2014/11/google-cardboard-unity-tutorial/) super useful. it basically tells me to implement the Durovis SDK (https://www.durovis.com/sdk.html) with its Unity package.
Everything was pretty straightforward and experience I got from it was so far the best.

iPhone iOS how to create a room for an iPhone game demo?

I'm building an iPhone core motion game demo and would like to have a virtual "room" around the user. The user would be using the phone with the core motion to "look around" the room through the phone. Attached is an example.
I'm not looking for anything fancy. 4 solid color panels for walls and 2 panels for the floor and ceiling would do. Pretty much a large cube with the middle at the user's location
What is the quickest way for me to create a room with a box geometry, putting the user in the middle? Can this be done with UIKit objects, or do I need to use openGL to render the panels? Maybe there's some kind of a game engine that I can use for these purposes?
I would want to rotate the room in the future.
Thank you for your input!
You won't be able to create a 3 dimensional environment without using OpenGL in some form. The best way to get started is to follow a good tutorial on OpenGL such as this one. You could even take this tutorial and put the camera inside the cube and voila, instant room. You would just need to add view rotation logic from core motion and you would be set.

iOS dev - sharing screen captures

I'm looking to write an app that lets users draw a game, something like tic-tac-toe, for example. One user would begin by drawing the grid, and then each player could literally draw their own O or X. It would be a multiplayer game where each user has his/her own device.
I'm not sure what would be the best way to share this data from device to device. I've only been able to think of 2 options:
Should I attempt to upload a screenshot to the server after each player makes a move?
Should I upload the exact points where the user is drawing and then redraw these points on the other user's screen?
Any other suggestions, or maybe a point in the right direction? I'm fairly new to all of this so please don't be too harsh ;)
starting out on a multiplayer game (even if it is a straightforward one) is ambitious :) if you don't mind restricting yourself to iOS5 and above, then i would check out the new turn based multiplayer game functionality. there's a good tutorial here:
http://www.raywenderlich.com/5480/beginning-turn-based-gaming-with-ios-5-part-1

Using game center when available

I am adding Game Center features (leaderboard) to my game. Since Game Center is not a requirement for my game, I check if it is available and then use it or not.
To check if Game Center is available, instead of making direct access to GK classes (like GKLocalPlayer), NSClassFromString is used.
My question is, after determining that Game Center is supported, in the code that will be executed only if Game Center is there (although the code will be there if Game Center is not) is there any way to use those classes directly, without using NSClassFromString for all GameKit classes I use? Currently I am doing it, and the game crashes if Game Center is not available.
Thanks in advance
It turns out that the problem was not with the Game Center references, but with the block-based methods used by Game Center.
Solution: iOS 4 app crashes at startup on iOS 3.1.3: Symbol not found: __NSConcreteStackBlock