Provenance icon indicating copy to clipboard operation
Provenance copied to clipboard

Enable Provenance on iPhone to act as Game Controller to Provenance on AppleTV

Open zonabi opened this issue 10 years ago • 30 comments

As an iOS Gamer, it would be great to be able to use the iPhone Provenance App as a Game Controller to the Provenance AppleTV App.

The Provenance iOS app could have a new View that is a simple Game Controller that sends messages to the Provenance tvOS app.

zonabi avatar Oct 07 '15 21:10 zonabi

This actually would be a pretty neat idea. Not sure how well it could be implemented, but not a bad solution to the controller problem.

On Oct 7, 2015, at 4:43 PM, Jose Gomez [email protected] wrote:

As an iOS Gamer, it would be great to be able to use the iPhone Provenance App as a Game Controller to the Provenance AppleTV App.

The Provenance iOS app could have a new View that is a simple Game Controller that sends messages to the Provenance tvOS app.

— Reply to this email directly or view it on GitHub.

jpete24 avatar Oct 07 '15 21:10 jpete24

+1 this is a great idea!

damian-pf avatar Oct 07 '15 21:10 damian-pf

I saw this in another emulator for iOS a number of years ago here: https://github.com/rileytestut/SNES4iOS

Effectively you could use an iPhone as a remote control for the iPad. Demo'ed great to the class. However, this emulator broke in iOS 8 and has not been supported since.

tkunstek avatar Oct 13 '15 06:10 tkunstek

:+1:

SamWarmuth avatar Oct 22 '15 18:10 SamWarmuth

I actually wrote the SNES-HD app that the above link was branched off of long ago :) I ended up re-writing the remote gamepad stuff so that the iPad app serves up a mobile-friendly webpage that would render an SVG gamepad and use javascript for interaction.

Life got in the way, and I never finished my rewrite, but since I'm getting an Apple TV in a few days, I've been thinking about digging that code out of the bin and seeing if it could be useful here. There's an embedded web server in Provenance anyway...

I'll see what I can come up with :)

yusefnapora avatar Nov 02 '15 16:11 yusefnapora

No JavaScript plz ;)

jasarien avatar Nov 02 '15 17:11 jasarien

JavaScript is messy, no doubt :)

The main advantage is that you don't need to install anything on the phone, which makes it easier for friends to join in since they don't need to connect to Xcode & provision their devices, etc. It also means you don't need to worry about versioning if you ever change the wire protocol, since you control both ends.

But if that's not a big concern, I'd rather do native code as well.

yusefnapora avatar Nov 03 '15 16:11 yusefnapora

My main concern is latency from the web view, over wifi, through the http server, translated into button presses sent to the emulator - I can't see that working at all for some games that need immediate feedback for button presses. Even the native on-screen controls aren't as latency free as I'd like, and the MFi controllers aren't the best either.

jasarien avatar Nov 03 '15 17:11 jasarien

We'd be better off supporting something like Joypad.Joypad Game Controller by Joypad https://appsto.re/us/EhP1E.i I'll take a look at their sdk today.

XeresRazor avatar Nov 03 '15 17:11 XeresRazor

bluetooth, y'all! no wifi. yes @XeresRazor exactly like the Joypad app/controller

zonabi avatar Nov 03 '15 19:11 zonabi

You can setup a socket connection between the devices, faster than BT and using a web server

davidmuzi avatar Nov 06 '15 00:11 davidmuzi

Agreed.

jasarien avatar Nov 06 '15 00:11 jasarien

I've tested the Joypad SDK on Provenance just for fun, creating the required GCController related subclasses (very similar to the iCade implementation). With an iPhone as controller and an iPad as player it works just fine. Pro: easy integration, nice UI, good latency*. Cons: *bad latency after a few minutes of gameplay, old and abandoned closed source SDK, no arm64 support.

Anyway, I agree with a custom direct connection solution using sockets.

alenofx avatar Nov 06 '15 02:11 alenofx

An interesting update: here is a new (Swift) framework to create virtual game controllers based on NSNetService: VirtualGameController. Haven't tested it yet on Provenance.

alenofx avatar Nov 09 '15 14:11 alenofx

that would be great or is there any game controller app that emulate a game controller on the iPhone to use it in more games?

Oggymator avatar Nov 14 '15 17:11 Oggymator

is it possible to use this in any way? https://github.com/robreuss/VirtualGameController

Oggymator avatar Nov 21 '15 12:11 Oggymator

Apple just released tvos 9.1 for Apple TV. Allows Remote Control with iphone now.

Don't know if that helps, but yeeehhaa! http://9to5mac.com/2015/12/08/tvos-9-1/

rohapa avatar Dec 09 '15 00:12 rohapa

Release of 9.1 for tvOS makes responsiveness of both the SteelSeries Nimbus & Horipad Ultimate both nearly flawless for MFi controller input (in Providence). Latency is at an all-time low, and games that require button mashing and quick responses are downright playable.

graphicbryan avatar Dec 09 '15 16:12 graphicbryan

wait, really?

jasarien avatar Dec 09 '15 16:12 jasarien

I tested from GBA, NES, Genesis, SNES, and played all the way up to Venom in Star Fox, and felt just like it was 1993 all over again.

Also there was no reason to re-compile Providence, the update to 9.1 did not remove anything other than my developer menu in the Settings app, not a big deal easy to re-enable with Xcode 7.2 (also updated yesterday).

graphicbryan avatar Dec 09 '15 16:12 graphicbryan

Cool, lets take this over to https://github.com/jasarien/Provenance/issues/157 and discuss it there.

jasarien avatar Dec 09 '15 16:12 jasarien

I would love to see this added. 👍🏼

JakeBondo avatar Jan 10 '16 05:01 JakeBondo

What's status on this? Has anyone tried this before: Apple TV Remote App doubles as game controller

Do we really need Provenance app to do this? Have them speak app to app, iPhone to aTV? or does the Apple TV Remote app for iPhone suffice? or is there another 3rd party already app out there that turns your phone into virtual MFi controller? If so, I'd like to close this one. We have full MFi controller support already making this just a novelty (who wants to play on the tv without a true haptic physical muscle-memory buttons?), and additionally, @JoeMatt is currently working on a great solution for getting full featured controllers (like PS3, etc) to talk to the app through another means.

Can we close this?

sevdestruct avatar Mar 07 '18 05:03 sevdestruct

This is possible with VirtualGameController framework. I did some testing a few weeks ago with their latest release. Seems to work. I might use it in my other code to make bluetooth controllers looks like MFi.

JoeMatt avatar Mar 08 '18 23:03 JoeMatt

@sevdestruct There doesn't seem to be any way to turn iPhones into virtual MFi controllers because iPhone does not support the HID bluetooth profile needed. At least not through CoreBluetooth. @JoeMatt VGC looks great, however it would need source changes to Provenance. It looks like it is designed to be a drop-in replacement, so it may not be a lot of changes. I'll try to make a fork that implements VGC when I get some time.

Vercantez avatar Apr 05 '18 08:04 Vercantez

Yeah VGC is the way to go. They have iCade support too, so instead of using our own iCade classes we should use theirs and add any missing iCade profiles they might not have and push those changes back upstream. The best way to do that is to fork them on GH and use a git submodule, then you can make a PR against the fork, and if they include the changes in their mainline, we just change the submodule URL to their repo. It's how we're doing cores now too in 1.5, transitioning as I update them.

JoeMatt avatar Apr 05 '18 23:04 JoeMatt

Any updates? Has anyone successfully used their iPhone to control Provenance on an Apple TV?

CobreDev avatar Apr 16 '19 17:04 CobreDev

Controller code is going under a refactor. That's stage 1.

Stage 2 would be adding in VirtualGameController (if it's still under active dev I haven't checked, or something similar).

Unless making a contribution, please don't use GitHub issues for "me too" or "any updates?" posts. If there were updates, the git commits would be tagged with this ticket and would show up here. Any discussion can be directed to Discord, linked on the main page.

JoeMatt avatar Apr 17 '19 18:04 JoeMatt

Ok, thanks. Alright, I'll try not to clutter this up. Thanks!

CobreDev avatar Apr 18 '19 00:04 CobreDev