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
Related
Is it possible to use SceneKit for GPU accelerated graphics within a cocoa Application?
I'm looking for a way to do 2D animations in a PowerPoint like application, and not sure which direction to take to have GPU accelerated animations.
Picked up xCode about a week ago and went straight into swift with no Objective-C background. Didn't find any information on the topic, hoping to get this answered here.
Your screenshot depicts the template selection in the project creator. What template you use has no impact on what features is possible in your application. It is perfectly possible to create a Cocoa app and simply drag and drop a SCNView and set it to run a SceneKit scene.
That being said, SceneKit or SpriteKit is definitely overkill just for doing "2D animations like in PowerPoint". You should look into Core Animation:
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CoreAnimation_guide/Introduction/Introduction.html
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.
I am going to make a 2D iPad game today, but I do not want to use a game framework. I am more interested in how the framework is created, how to program the physics, and other low level topics.
So, if I'm not using a framework, how do I start? Is the first step to create an OpenGL based app in XCode?
OpenGL would be a place to start, but i would look through the cocos2d source, and see how various things are being done in that.
To program a 2D game from the ground up, especially if you're new to iOS, I don't see any reason to use anything other than the CoreGraphics and CoreAnimation APIs. Any bitmap-based imaging is typically done via OpenGL behind the scenes.
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
Hey, I just downloaded this game doodle launch today and I think its pretty cool, I would like to make a similar game using some sort of engine? it has physics and it uses the iPhone tilt controls... any suggestions??
This is the link in case you want to check it out...:
http://itunes.apple.com/us/app/doodle-launch/id393793976?mt=8
Cocos2D is a popular, fairly easy-to-use game engine:
http://www.cocos2d-iphone.org/
It doesn't have physics by default, but many people add the Box2D physics engine:
http://www.box2d.org/
Here's a clear tutorial on using the two together on iOS:
http://www.raywenderlich.com/457/intro-to-box2d-with-cocos2d-tutorial-bouncing-balls