rubymotion, game centre and creating a multiplayer game - ios

Does anyone know of any good resources/tutorials/sample code for creating multiplayer functionality within a rubymotion iOS game?
I am currently using Joybox and I want to integrate iOS Game Center to enable two players to play the same game at once.
I have found a great tutorial by Ray Wenderlich:
http://www.raywenderlich.com/3276/game-center-tutorial-for-ios-how-to-make-a-simple-multiplayer-game-part-12
But it's Xcode and Objective-C centric, and I'm having a hard time translating it to RM, so any other source of information would potentially be a big help. Any advice is very welcome.
Thanks.

Related

How to turn off auto sleep ios in my website

I have a website to play the game. When user plays the game in my web, the ios device auto sleep and turn off the screen then the game can't play anymore.
Do you know that and any idea for that?
Thanks so much!
I understand that you want to prevent the user's device to go to sleep when your game is open but the user doesn't touch the screen for a period of time.
There is no official support in iOS for this kind of feature.
NoSleep.js tries to offer some "hacky" way to keep the device awake, but according to it's issues it's not very reliable and clearly not future-proof.
If you want to have more control on the device consider the creation of a native app for your game.

iOS and SpriteKit camera background

I am developing a game for iOS using Scenekit and maybe GamePlayKit. What I want is for the background of the main game play to be set to a live camera feed. That should be simple enough. A little googling brought me to this`question. My question however, is will a technique like the one in the linked question work well with SpriteKit? The question deals with setting the background with UIKit. Can I use this option with SceneKit too or do I have to use some sort of SceneKit specific way to set the background like so?

HTML Recording video on iOS

I'm new to HTML coding, and i'm currently trying to build an app in iOS like snapchat, that will take a users camera and record without stopping if the user goes into the main menu or whatever. I'm looking for some HTML5 code that will allow me to have the main interface just be the back camera output, with buttons that i'll have over the front.
A few searches have led me here: http://www.html5rocks.com/en/tutorials/getusermedia/intro/
Which I have tried to make work but iOS does not support it.
I'm basically asking: How do I make an app record video with it starting on screen?
You could write a web app to do this, but not a native app (i.e. from the App Store). For that, you'll need to learn Objective-C or Swift, then take a look at the AVFoundation framework.

Swift 2.0 - Can't figure out how to add Sounds to a Game

I am trying to add audio to my game and just cannot figure out how. There are tons of tutorials on how to add sound for Swift but not Swift 2.0. All I am trying to do is have sound effects when I tap the screen.
I've seen some people say to use "init" but I cannot get that to work.
Thank you!

how to share iOS game screen in real time?

I created a simple game on iPhone. I want to show my play in real time to my friend's iPhone through network.
Do you know any open source to implement the part?
Or, can you let me know which part I should study to implement it? open gl? cocoa 2d?
thank you.
AFAIK there's no such a think as screen sharing features on iOS and even if there were they would probably be prohibited by Apple. The only screen sharing feature there is is Air Play, which is available for developers to use, but this sharing is only done through an Apple TV. Check out this documents and see, however: Multiple Display Programming Guide for iOS and Air Play Overview.
If you want to make a multiplayer game (either when players play simultaniusly or a turn-based game) you should use the Game Center APIs instead of sharing a screen directly. Please check the Game Center Programming Guide.

Resources