robreuss / VirtualGameController

Software-based game controllers for iOS, tvOS, OS X and watchOS in Swift 4.2.
MIT License
462 stars 44 forks source link

Is this approach allowed by Apple? #4

Closed zouchaoqun closed 8 years ago

zouchaoqun commented 8 years ago

Hi, Great work! but it seems the Game Controller framework needs to work with a hardware controller? are you sure this is allowed by Apple and won't be rejected?

Thanks

robreuss commented 8 years ago

Thanks!

Apple does not seem to have any problem with software-based controllers (see the Crossy Road demo and from my perspective, wrapping the Game Controller framework to integrate a custom software-based controller is just good programming practice, since it means only having to write your game controller interaction code against a single input model.

VGC does not use any private APIs and does not sub-class any of Game Controller. The closest it may come to treading on private system areas is that it supports the same data format for snapshots as GCController. That means that snapshot files created with GCController are compatible with VgcController and the reverse. If you don't use snapshots, that's a non-issue.

That said, the framework is new (it's been on Github about a week) and so I'm not aware of anyone submitting with it yet. So I'm not sure an app created with it won't be rejected!

jakubknejzlik commented 8 years ago

We are planning to submit new game for tvOS. This framework suits our needs very well so I'll let you know in case of any issues :) . Also what about some king of generic gamepad available on store? For example we are going to need iphones as virtual controllers, so we have to create new app supporting this framework. Is it ok for you, if we create it as standalone "gamepad app" and use it for other games/projects?

robreuss commented 8 years ago

Happy to help you get things up and running. In particular, if you find yourself needing any additional notifications or access to anything currently implemented as private, particularly on the Peripheral side of things, let me know.

A generic gamepad sounds cool. The appIdentifier is designed around the assumption that the framework is implemented for a single game on both sides (Peripheral and Central). It would not be prohibitively difficult to enhance service browsing to change that assumption, so that a Peripheral could browse for games across app identifiers.

jakubknejzlik commented 8 years ago

That's great! :) I'll definitely get in touch in few days.

robreuss commented 8 years ago

Discussion of Generic Gamepad transitioned to this issue