Open source, clone https://github.com/ouya/ouya-sdk-examples/tree/master/Construct2
@OUYA - (Construct 2 on OUYA Forums) - http://forums.ouya.tv/categories/construct2-on-ouya
[VirtualControllers] - Maps OUYA controllers to virtual controllers.
Construct 2 - https://www.scirra.com/construct2
Supported Platforms - https://www.scirra.com/manual/168/supported-platforms
PhoneGap - https://build.phonegap.com/
CocoonJS - http://ludei.com/
Construct 2 is an visually programable engine that publishes HTML5.
Publishing to the OUYA requires that you package the generated HTML into PhoneGAP or CocoonJS.
Make your own [JavaScript plugins] with the JavaScript SDK.
PhoneGap has a [plugin API] that allows adding custom HTML tags with callbacks to interface HTML5 with Java for two-way communication.
With PhoneGap, you can customize your Android.manifest and embed your custom plugins to work with your HTML5 from Construct 2.
https://crosswalk-project.org/
- Create yourself a free developer account on https://ludei.com
- Install CocoonJS Launcher on OUYA. Go to dev portal (create a project) and click 'Compile Launcher' under COMPILATION. You'll get an email in a few mins with zip. Unzip it and
adb install
debug apk of CocoonJS Launcher.
-
Create an empty project directory
-
Make index.html:
<html>
<body>
<canvas/>
<script>
var canvas = document.getElementsByTagName('canvas')[0];
var ctx = canvas.getContext('2d');
ctx.fillStyle = 'white';
ctx.font = '6px Arial';
ctx.fillText('Hello World', 10, 10);
</script>
</body>
</html>
-
Zip it:
zip -r hello_world.zip *
-
Copy it to OUYA:
adb push hello_world.zip /mnt/sdcard/
-
Now go to OUYA / MAKE / SOFTWARE and open CocoonJS Launcher
Pro tip: Use real mouse to work in CocoonJS Launcher as it does not listen to gamepad and using OUYA's touch pad is a real pain.
-
If this is your first time, you'll need to log in to your free https://ludei.com/ account. Also, click cogwheel at the top right and make sure DEBUG option is checked and ORIENTATION is Landscape.
-
Click 'YOUR APP', you should see hello_world.zip in 'ZIPS IN SD CARD'. Run it. You'll see 'Hello World' in a really blurry font.
Pro tip: To quickly reload an app after you've made changes click 'fps:NN' box at the top left, click 'Actions' and 'Reload'.
- Edit your html/js/css files locally and test them in browser
zip -r <project-name>.zip *
adb push <project-name>zip /mnt/sdcard/
On OUYA first time:- Open Launcher
- Go to 'YOUR APP'
- Open .zip On OUYA when your app is already open:
- Click 'FPS:nn' in the top-left corner, 'ACTIONS', 'RELOAD'.
zip -r <project-name>.zip *
- Go to dev portal and 'Compile Project'
- Upload your zip
- Select 'Ouya' in 'Compile project for'
- Agree to their 'Upload Conditions'
- Submit
You'll get email in a few minutes with zip. Two apks inside.