Since Apple released a week ago a new SDK for the upcoming Apple TV I started to think how great would be to use Gideros to create games or other apps on this new platform. Since Apple TV runs iOS underneath, it should be easy to port Gideros to it.
I started looking around the Gideros code and I have been able to accommodate and compile the iOS libraries and tweak the iOS Template in order to work with Gideros. There are some classes unavailable like UIAlertView so I rewrote them using UIAlertController (in fact UIAlertView is deprecated on iOS8). And there are other API missing like CoreMotion or CoreLocation.
Here you can see the game I did some time ago with Gideros running on the AppleTV Simulator:
Unfortunately since AppleTV has no touch screen you need to use the new Apple Remote to control the AppleTV. This new remote should be recognized as a GCController (GCMicroGamepad profile), there are some code (Gideros Labs/Controller) already available to work with controllers but unfortunately I wasn't able to get it working with my (sort of) controller (I'm using a Wii controller through MFI Wrapper). So I decided to create my own plugin that should be compatible with MFI controllers (iOS7 and above). It works on my iPhone but it won't work on the AppleTV simulator because the available seed won't support GameController API yet... but it should work on an upcoming seed.
So I think most of the work is done and I would like to know if you people could be interested on this so I will try to integrate it on Gideros (by forking the code and doing a pull request). I'm not sure how difficult will that be since I don't know the structure of the code or how to compile everything, but if you are interested I will try to!
BTW, sorry but it won't allow me to post links
Comments
Surely would be interested and if you have any questions about code etc. Let us know.
If you can create a template for export I can add it as an export option. As I think there will be no way to create universal template, right?
@ar2rsawseen You can apparently make Universal apps that include iPad, iPhone and AppleTV. I don't know what is involved though.
https://deluxepixel.com
https://deluxepixel.com
If someone could check it, it would be great.
@ar2rsawseen & @SinisterSoft There is no way to create Universal apps including iPad, iPhone and AppleTV since the SDK is different (ios vs appletvos). However I *might* be able to create a universal template with two different targets... I will try to and get back to you.
@totebo I'm still defining the protocol but basically you will receive an event on connection or disconnection of the controller, on every button pressed/released and on dpad analog changes.
Other apps:
http://OwnSpy.com
http://iGotYa.com
Looks like it must be just 'universal purchase'...
"Empower customers to enjoy their favorite apps on both iOS and the new Apple TV with a single purchase by enabling universal purchase for your app on the App Store."
https://developer.apple.com/tvos/
https://deluxepixel.com
@ar2rsawseen I just created a pull request with the changes made. Please note that the new MFIController is alpha state, but it should work when the new XCode 7.1-beta seed is available. I'm uploading a compiled a functional template to dropbox but I can't post links, how should I send you?
@SinisterSoft you are right, there is no way to create Universal apps but you are able to link them on the iTunes Connect page so you can purchase both just once.
@totebo the first release of MFIController will be something like this:
Likes: SinisterSoft, vitalitymobile, totebo, MobAmuse
Other apps:
http://OwnSpy.com
http://iGotYa.com
It sounds a bit like WinRT where you have a universal solution that contains two projects, one for Windows and one for Windows Phone, and which can share most of the code. I think the iOS/tvOS thing is similar.. But correct me if I am wrong!
https://github.com/gideros/gideros
https://www.youtube.com/c/JohnBlackburn1975
I created a universal template that compile to iOS or AppleTV and works with the current Gideros Studio simply by replacing the iOS Template.
Unfortunately I don't have an AppleTV Dev Kit so I'm still waiting for the next tvOS SDK seed that will enable GCController API and confirm that the MFIController plugin I made will work fine on the tvOS.
I think this is very interesting but keep in mind your business strategy since ads won't work on the AppleTV because there is no browser! So if your game depends on ads you will need to think in something else...
Gideros is now the first Cross Platform Game Engine that supports the AppleTV!
Other apps:
http://OwnSpy.com
http://iGotYa.com
https://github.com/gideros/gideros/blob/master/plugins/controller/source/controllerbinder.cpp
So it would be the dropin replacement for those who use the plugin (or I can even merge and replace my ios part since it does not work anymore)
Likes: SinisterSoft
@ar2rsawseen mmm... the problem is that I need to implement other things like GCMotion and it is not defined on that binding... I think the best solution would be to replace the iOS part and extend the gcontroller to support motion... Unfortunately without an actual AppleTV to test it is going to be difficult to debug it... So I will try to replace your iOS part and handle the motion thing when the AppleTV is in my hands (I may need help then to fully understand the gcontroller class)
Other apps:
http://OwnSpy.com
http://iGotYa.com
Other apps:
http://OwnSpy.com
http://iGotYa.com
So it something like X = axis 1, y = axis 2, and z = axis 3?
http://docs.giderosmobile.com/reference/gideros/Accelerometer#Accelerometer
So if you have 2 controllers attached you will have 2 different acceleration data... So this is why we should deliver this information using the controller plugin, and not the Accelerometer class. I know that in most games where there is only one player this info will be the same and the game will just works... but it's not the right way.
Maybe we could do a lua lib to "translate" the controller motion to accelerometer data and therefore not to change a line of the current game code.
Other apps:
http://OwnSpy.com
http://iGotYa.com
Aren't there simply 2 sticks each with 2 axis and thumbs? or ios has some other controllers I am not aware of?
Or there is accelerometer in the controller allowing you detect how whole controller is moving?
Well it could be either wrapped in Stick axes or added new needed events to gcontroller plugin, so it would be easier for others to use. But it's up to you, I don't do iOS anymore
But I'm not doing it for the money, but for the fun
Likes: SinisterSoft, MobAmuse
https://deluxepixel.com
I think the new Apple TV will be a huge market. You know iOS people are use to purchase content so I think payable games will work. Also you can connect MFI controllers to it that will be better than the remote. You should port your OUYA games!
Also there is a limitation on the AppleTV: your app can't save data. Instead you need to use iCloud for that. Also your maximum app size is 200MB so you will need to download the content from iCloud to use it... Is it iCloud plugin available?
I guess that when you save data with the |D| prefix will fail on AppleTV...
Other apps:
http://OwnSpy.com
http://iGotYa.com
About cloud plugin, yes there was one in GamingInterface, but I am not sure again if it is still working
Likes: MobAmuse
https://deluxepixel.com
The main problem is that you can't store files on the device, so getting the player to work is a bit of a problem (files are sent to the device and stored locally). @ar2rsawseen is working on a possible solution and hopefully we will have Gideros fully working on AppleTV in the next few days.
Likes: totebo
https://deluxepixel.com