Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Ouya Adventures

Author
Message
apocolyp4
14
Years of Service
User Offline
Joined: 10th Jun 2010
Location:
Posted: 26th Jun 2013 18:22 Edited at: 26th Jun 2013 18:23
Yesterday my Ouya arrived and one of the first things i did was sideload the AppGameKit Player Beta 13 onto the device. The Android AppGameKit Player will install onto the Ouya without any issues. After a little bit of tinkering I got one of my current AppGameKit projects Zombie Hangover 82 partially working. Here is a video of it running on the Ouya.



At the end of the video the game crashes. I don't know exactly why the game does this on the Ouya, but it always happens the same way. The controls will lock so it keeps detecting the last button I press for a few seconds then it crashes. That doesn't happen on any other device. Ill need to do further tests to find out exactly why it crashes.

As you can see in the video the controller almost fully works. All the buttons bar the Ouya home button work fine, and you can even use its track pad. The AppGameKit currently doesn't detect the Ouya controller as a joystick so the analogue sticks don't work, but the D-pad does. Here is a list of the Ouya controller buttons and their AppGameKit keycodes:

D-pad up = 38
D-pad down = 40
D-pad left = 37
D-pad right = 39

L1 = 102
L2 = 104
L3 (left thumbstick pressed) = 106 (turns to 0)

R1 = 103
R2 = 105
R3 (right thumbstick pressed) = 107 (turns to 0)

O = 79
U = 85
Y = 89
A = 65 (turns to 27)

Three of the button have brackets that say (turns to) and then a number. That because when you check their keycode using GetRawLastKey() it will show one value then instantly change. It only happens with those 3 buttons. This might be an issue with any one who uses the escape key on a keyboard to pause to a menu or exit a game. This is because pressing the button A on the controller will be detected as the escape key as well as the A button.

You can also plug in a XBox 360 controller and it will work with AppGameKit games, though the AppGameKit wont detect the controller. This means you cant use the analogue sticks just like the Ouya controllers.

I hope this post will help anyone who wants to develop on the Ouya using the AGK. Ill keep it updated with my progress on Ouya AppGameKit development. I will be using Tier 1 only to develop for the Ouya for the time being.
RickV
TGC Development Director
24
Years of Service
User Offline
Joined: 27th Apr 2000
Location: United Kingdom
Posted: 26th Jun 2013 18:30
Great to see this apocolyp4. I have order my Ouya today and can't wait to see some AppGameKit apps on it.

Rick

Financial Director
TGC Team
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 26th Jun 2013 18:36 Edited at: 26th Jun 2013 18:41
I need an ouya now.... lol Good work on the scan codes too.

*edit* The only problem with Ouya, is that in america it costs £66 pounds. ($99.99) But in England it costs £99 pounds.

I'd rather buy one from America and save money.

This is my current project, check it out! [href]forum.thegamecreators.com/?m=forum_view&t=204576&b=8[/href]
This is my website, check it out! [href]http:\\www.TeamDefiant.co.uk[/href]
XanthorXIII
AGK Gold Backer
13
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 26th Jun 2013 19:03
I've had my Ouya for about a month but haven't done much with it.
System appears to be pretty decent but the wireless networking on it needs fixed, it is way too slow and this is sitting right next to my Wireless Router that is pretty powerful. Not an AC version but its an N with pretty decent range and frequencies.
Maybe they missed the part about the antenna or the fact its in a metal case that is causing the issue.
Alebrije
11
Years of Service
User Offline
Joined: 27th May 2013
Location: Toluca
Posted: 26th Jun 2013 19:58
@apocolyp4

This is so great, I was considering getting an Ouya as well, but I wasn't sure because I didn't know if a game made with AppGameKit would run.

Did you have to do any setup or special configuration to your games in order to run on ouya?

I see that you're using tier 1, so you can actually use the same code to program it?

Your game looks great!

Classics games, modern wonders
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 26th Jun 2013 20:11
Great news if it works ! i'm also waiting for my Ouya too can't wait to test it with my current Speed Racer game
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 26th Jun 2013 20:46
Quote: "The AppGameKit currently doesn't detect the Ouya controller as a joystick so the analogue sticks don't work, but the D-pad does."


Using GetRawTouchCurrentX( 1 ) and GetRawTouchCurrentY( 1 ) should work for getting the left joystick and GetRawTouchCurrentX( 2 ) and GetRawTouchCurrentY( 2 ) should work for getting the right joystick. It works like that for me.

For me the AppGameKit player works, but it will crash every other time I launch it.

Sean

Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 26th Jun 2013 21:18 Edited at: 26th Jun 2013 21:21
I had problems with my shipping address but my Ouya is on the way and I can't wait. Both for trying my own AppGameKit game on it but also for some of the cool indie titles on it.

Thanks for sharing apocolyp4

apocolyp4
14
Years of Service
User Offline
Joined: 10th Jun 2010
Location:
Posted: 26th Jun 2013 21:51
Hockeykid Can you post your code with GetRawTouchCurrentX( 1 ) working please? I've tried using it but nothing happens.
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 26th Jun 2013 22:23
My mistake, you're right. I forgot, I used this main.c to made by "dveyarangi" to hack in joystick support: https://github.com/dveyarangi/interpreter_ouya/blob/master/jni/main.c

Unfortunately it often causes the AppGameKit Player to crash.

Sean

apocolyp4
14
Years of Service
User Offline
Joined: 10th Jun 2010
Location:
Posted: 26th Jun 2013 22:23
A small update about my AppGameKit eventually crashing while running on the Ouya. It seems to be input related. Every time you press a button or use the trackpad there's a chance the game will crash and exit. It seems to be random as it can be from the first button press or over 200 but it'll eventually crash. Even when you just load up the AppGameKit Player and start pressing buttons it will crash.

The patterns the same every time the game will still run for a few seconds but it wont read in any new inputs before crashing.
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 26th Jun 2013 23:28
you don't have a debugging console in ouya to check that ?
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 27th Jun 2013 00:15
Quote: "A small update about my AppGameKit eventually crashing while running on the Ouya. It seems to be input related. Every time you press a button or use the trackpad there's a chance the game will crash and exit."


I can confirm this too. After some debug, it would seem to be caused by constant input. Could you test this for me by holding down one of the controller buttons for around 15 - 30 seconds? This should cause it to crash.

Sean

apocolyp4
14
Years of Service
User Offline
Joined: 10th Jun 2010
Location:
Posted: 27th Jun 2013 01:29
Ok I just did the hold the button test and it crashes between 30 - 40 seconds of holding the button. I don't know if its constant input that's the cause as I've had it crash after only a few button presses.
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 27th Jun 2013 01:44 Edited at: 27th Jun 2013 02:12
I assume the issue is the same as the one reported here:https://code.google.com/p/android/issues/detail?id=41755

When Android gets too many inputs from external input devices it gets "backlogged" and fails to respond which causes Android to shutdown the app.

I've tried the fix proposed in the comment section, however the issue still occurs.

EDIT: I've found that the solution above works if you use it with the latest android NDK version 8e which can be downloaded from here: http://developer.android.com/tools/sdk/ndk/index.html

Sean

Funnell7
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 27th Jun 2013 14:17 Edited at: 27th Jun 2013 14:17
I haven't received my Ouya yet, I ordered in March and haven't heard anything

Thanks for sharing this apocolyp4, this will certainly help when it finally arrives!
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 27th Jun 2013 20:52
ho ! my Ouya

Quote: "
Your Order Has Been Shipped!
"


\o/
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 28th Jun 2013 17:16
I've attached a build of my AppGameKit Player. It supports all 4 controllers and is able to get joystick input along with digital input for L2 and R2. I modified the player so it passes the data into memblocks ( 1 - 4 depending on which player) as floats which can then be grabbed in Tier 1 through GetMemblockFloat( ).

Below is a set of functions that I wrote to simplify grabbing data from the memblocks.



It should be noted that sometimes it will take multiple tries to get the player to open. It will often open and immediately close, at the moment I have no idea why this is happening. My current thought is that when double tapping the Ouya button to return to the dashboard, the app isn't exiting itself properly.

Sean

Attachments

Login to view attachments
apocolyp4
14
Years of Service
User Offline
Joined: 10th Jun 2010
Location:
Posted: 28th Jun 2013 18:45 Edited at: 28th Jun 2013 18:45
Thanks Hockeykid that code runs great. I noticed that just using the two thumbsticks doesn't crash the game.

Here's a video of it working with the FPS example.



I had a better version with jumping and the ability to look up, but I stupidly overwriten it when I installed AppGameKit beta 14.
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 28th Jun 2013 19:03
Quote: "I noticed that just using the two thumbsticks doesn't crash the game."


My player should of fixed the crashing from having to many inputs. Try holding down a button again for 30 - 40 seconds and see if it crashes.

Sean

apocolyp4
14
Years of Service
User Offline
Joined: 10th Jun 2010
Location:
Posted: 28th Jun 2013 21:51 Edited at: 28th Jun 2013 21:51
Hockeykid what ever you did work. I can test my games without it crashing!
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 28th Jun 2013 22:07
Quote: "Hockeykid what ever you did work. I can test my games without it crashing!"


Awesome. Do you happen to have the issue I described here?:

Quote: "It should be noted that sometimes it will take multiple tries to get the player to open. It will often open and immediately close, at the moment I have no idea why this is happening. My current thought is that when double tapping the Ouya button to return to the dashboard, the app isn't exiting itself properly."


Sean

apocolyp4
14
Years of Service
User Offline
Joined: 10th Jun 2010
Location:
Posted: 28th Jun 2013 23:04
Yeah I have the same issue. Though it happens more with your build than with mine. My build (basic beta 13 build) will fail first time then always work the second time. Your build can take 5-6 attempts to work.
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 28th Jun 2013 23:22
Quote: "Yeah I have the same issue. Though it happens more with your build than with mine. My build (basic beta 13 build) will fail first time then always work the second time. Your build can take 5-6 attempts to work."


Interestingly enough, the player works fine on any other android device. I went through the logcat and looked up the error, it would appear that Unity had the same issue when one of the Ouya firmware updates came out.

Sean

xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 29th Jun 2013 13:24
Great apocolyp4,
this is why i also wanna buy an Ouya and use AppGameKit there immediately.
I think AppGameKit must support Ouya in this moment because i see the other console going down and the new little console have the look to catch people around the world.

There is a way to use MAC to code for Ouya?

Long life to Steve!
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 30th Jun 2013 22:43
My Ouya arrived to Sweden today. Now I am excitedly expecting a delivery next week. I hope customs doesn't take too long. It's sadly delivered by DHL and they suck, but they are cheap.

Funnell7
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 1st Jul 2013 02:55 Edited at: 1st Jul 2013 19:39
My Ouya finally arrived!

Naturally, the first thing I did, was install the AppGameKit Player! I was then messing about with Happy Chick to make it Ouya friendly. The only changes I really needed to make was how to navigate through the menus. I opted for having a 'selection' sprite. Here is a video of it in action...



I'm so happy the stretch goal was reached for Ouya!!
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 1st Jul 2013 05:18
lol great funell !
apocolyp4
14
Years of Service
User Offline
Joined: 10th Jun 2010
Location:
Posted: 1st Jul 2013 22:57
Ive been working on porting my game Neon Prime to the Ouya. Heres a video of the game running on the Ouya.



I need to edit the game to fit TV screens correctly and I need to redo the menus. Apart from that the games almost ready.
RickV
TGC Development Director
24
Years of Service
User Offline
Joined: 27th Apr 2000
Location: United Kingdom
Posted: 1st Jul 2013 23:04
Hi, it looks great on Ouya! The perfect sort of game for the console.

Rick

Financial Director
TGC Team
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 1st Jul 2013 23:26
looks awesome apocolyp4 with prime on ouya

Android 2.3 , ZTE Skate , 480x800 , 800 mhz , Samsung Galaxy Y , 240x320 , 832 mhz , Sony ericson arc 480x854 , 1 ghz
Android 4.0 , Dmtech 3g 9738B , 1024x768 , 9.7 inches , 1.2 ghz
basjak
14
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 1st Jul 2013 23:53
that's awesome guys. well done.

Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 2nd Jul 2013 00:06
I hope those who backed v2 can get better Ouya support soon. I know it said October on the KS page. But at least full support for the controller would be very welcome in the first beta. That way people can start to develop for the Ouya early.

Nice one Apocolyp4

Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 2nd Jul 2013 04:25
Quote: "I hope those who backed v2 can get better Ouya support soon. "


For now, my modified AppGameKit Player works pretty well, except for the crash that happens. I've been looking into the error over the past few days and all I know is that it's a segmentation error caused by attempting to access memory that the app doesn't have permission to. It's odd because the app works fine on my Droid X2, but apparently Android 4.0 and higher are stricter when it comes to memory.

Does anyone happen to know if AppGameKit works on an Android phone running Android 4.1?

I'll continue looking for a fix, but at the moment it isn't looking to good.

Sean

Lavaflyer
12
Years of Service
User Offline
Joined: 2nd Jul 2012
Location: Wisconsin, U.S.
Posted: 2nd Jul 2013 05:00
So I jumped on the bandwagon, shelled out the cash, and ordered an Ouya through gamestop(with extra fast shipping). It's supposed to arrive between 3:00-4:30 tomorrow I look forward to using Hockeykids' modified player. I have a few questions thou:
Quote: "For now, my modified AppGameKit Player works pretty well, except for the crash that happens. I've been looking into the error over the past few days and all I know is that it's a segmentation error caused by attempting to access memory that the app doesn't have permission to."

Here, you're referring to the player sometimes crashing on startup, right? - cause I've actually had that issue sometimes on the normal ios and android players (it may not be your fault).

And second, I'm a little confused as to how you're accessing the action/normal buttons via memblocks (I've never used memblocks) and tell me if I'm wrong but your custom ouya input function only returns the button state -could you by any chance post similar functions that return the button pressed/released for me and other forum mates! Thanks. Long live the Ouya!
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 2nd Jul 2013 05:05 Edited at: 2nd Jul 2013 05:07
Quote: "cause I've actually had that issue sometimes on the normal ios and android players "

What version of Android is the Android device running?

Quote: "I'm a little confused as to how you're accessing the action/normal buttons via memblocks (I've never used memblocks)"


In the interpreter on input events I had it capture the device id which is then passed to the Ouya ODK to grab the player number. From there I took the player number which points to the proper memblock, and had it set the memblock's position (which depends on the button that's pressed) to the appropriate value. These values can then be grabbed through Tier 1's GetMemblockFloat( ) commands (my code snippet in the post above has simplified functions).

Quote: "could you by any chance post similar functions that return the button pressed/released for me and other forum mates!"

You could probably easily make these functions in Tier 1.

Sean

Lavaflyer
12
Years of Service
User Offline
Joined: 2nd Jul 2012
Location: Wisconsin, U.S.
Posted: 2nd Jul 2013 05:08 Edited at: 2nd Jul 2013 05:10
My android n70s tablet (a cheap unknown device I got merely for AppGameKit android reasons) is running 4.1.1 android.
Quote: "You could probably easily make these functions in Tier 1."

Actually now that I think about it all-I'd have to do is wait 1frame then start passing 0 rather than 1 just like the actual button/pointer functions
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 2nd Jul 2013 05:12
Quote: "My android n70s tablet (a cheap unknown device I got merely for AppGameKit android reasons) is running 4.1.1 android."


I have a feeling the issue has something to do with Android 4.1.1 (Ouya uses the same version). Hopefully Paul knows about this, and if he does maybe there will be a fix in Beta 15.

Sean

Lavaflyer
12
Years of Service
User Offline
Joined: 2nd Jul 2012
Location: Wisconsin, U.S.
Posted: 2nd Jul 2013 05:13
Quote: "I have a feeling the issue has something to do with Android 4.1.1 (Ouya uses the same version). Hopefully Paul knows about this, and if he does maybe there will be a fix in Beta 15. "


Alrighty, good to know.
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 2nd Jul 2013 06:06 Edited at: 2nd Jul 2013 23:40
I've added GetOuyaControllerPressed( playerNumber,key$ ) and GetOuyaControllerReleased( playerNumber,key$ ) functions. If you plan on using these, you'll need to call UpdateOuyaController( ) with your sync. Also, l2 and r2 are digital, so I don't think they will work to well with the pressed and released functions. It should be noted, that I didn't test these functions to vigorously, so let me know if there's an issue.

I've also added a deadzone for the joysticks (0.25 which came from the ODK documentation).

There is also a GetOuyaExists( ) function (just make sure you don't use Memblocks 1 - 4 for anything in your code).




Sean

MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 2nd Jul 2013 13:27
Sean ! i can't test it for the moment (waiting for my ouya) but already thanks for your help
apocolyp4
14
Years of Service
User Offline
Joined: 10th Jun 2010
Location:
Posted: 2nd Jul 2013 13:35
Hockeykid is it possible for you to post your AppGameKit player project here so that I could build apk file of my Ouya games? Im going to be taking part in a game jam on Friday and I hope to make a game for the Ouya during it.
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 2nd Jul 2013 16:42
Quote: "I have a feeling the issue has something to do with Android 4.1.1 (Ouya uses the same version)"

I will be checking this out once I get my hands on an Ouya, if it arrives before the end of this week it might make it into beta 15.
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 3rd Jul 2013 04:47 Edited at: 3rd Jul 2013 04:47
Quote: " thanks for your help"


No Problem!

Quote: "Hockeykid is it possible for you to post your AppGameKit player project here so that I could build apk file of my Ouya games?"


I do plan on releasing it, but I'd rather have the crash fixed before I do.

Quote: "I will be checking this out once I get my hands on an Ouya, if it arrives before the end of this week it might make it into beta 15."

If it helps below in the two code snippets are readable stack traces of the crash(es) (it would seem different things can cause a similar crash, such as motion input on start-up).





Sean

Lavaflyer
12
Years of Service
User Offline
Joined: 2nd Jul 2012
Location: Wisconsin, U.S.
Posted: 3rd Jul 2013 08:13
Stupid question, just got my ouya today and after trying out a few games I want to load up your modified player on it--but for the life of me I cant figure out how to bring up the on-screen ouya keyboard (note: I don't have a keyboard plugged in but I cant figure out how to get that working either) to enter something into an editbox on the ouya browser. I'm trying to navigate to the agk forum-log in, and download your modified player apk. However I just cant click into and enter in the email adress/password fields-if I use my touchpad and click the editbox-the page reloads asif I had clicked the login.
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 3rd Jul 2013 08:29
Quote: "Stupid question, just got my ouya today and after trying out a few games I want to load up your modified player on it--but for the life of me I cant figure out how to bring up the on-screen ouya keyboard (note: I don't have a keyboard plugged in but I cant figure out how to get that working either) to enter something into an editbox on the ouya browser. I'm trying to navigate to the agk forum-log in, and download your modified player apk. However I just cant click into and enter in the email adress/password fields-if I use my touchpad and click the editbox-the page reloads asif I had clicked the login."


Here you go, I've uploaded it to Mediafire so you don't have to mess around with logging into the forums.

http://www.mediafire.com/?rlt7t0phs9vhy2s

Sean

RickV
TGC Development Director
24
Years of Service
User Offline
Joined: 27th Apr 2000
Location: United Kingdom
Posted: 3rd Jul 2013 13:55
I'm about to try and connect my AppGameKit with Ouya! Thanks Hockeykid and apocolyp4 for showing the way!

Rick

Financial Director
TGC Team
Impetus73
13
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 3rd Jul 2013 15:11
Be sure to wear safety goggles, hardhat, and thick gloves! People have died from less.

----------------
AGK programmer
Did Amiga / AMOS programming in the 90's.
RickV
TGC Development Director
24
Years of Service
User Offline
Joined: 27th Apr 2000
Location: United Kingdom
Posted: 3rd Jul 2013 17:30 Edited at: 3rd Jul 2013 18:08
OK, with some great help from the early AppGameKit devs who have things up and running I can show my results (nothing special):



And after a few key strokes I had Snake Snacker playing!



Rick

Financial Director
TGC Team
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 3rd Jul 2013 17:59
Pretty cool stuff.

The Ouya compatibility opens up a very different market and really does add to the cross platform capability.

Too bad the Ouya doesn't have an accelerometer (at least not that I can see from the Wikipedia page and other searches).

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master

Login to post a reply

Server time is: 2024-11-25 01:32:54
Your offset time is: 2024-11-25 01:32:54