So, OUYA. Will YA?

Previous topic - Next topic

kanonet

Do you need Java to get the max. texture size? OpenGL in INLINE should do the job, something like glgetintegerv(gl_max_texture_size), should be easy to look it up in detail.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

fivesprites

Ok, I couldn't sleep last night so got up very early and built rudimentary support for the OUYA. 

I managed to get all of the controller buttons and joysticks working quite well.  I tried this in one of my own games and it worked nicely.

Hopefully this weekend I can tidy up and add IAP support.

I'm also going to put AndroidExtras onto GitHub so other people can contribute as I don't have much free time.

//Andy

spacefractal

#62
onNativeKeyDown() and onNativeKeyUp() om SDLActivity.java is quite buggy and not doing as they should. So im do need to comment them out and doing own input rutine throught ANDROIDEXTRAS instead to make sure ALL buttons can works, and its dosent get confuction about "Unknown Keys", cause some buttons not working currectly.

So Gernot, its would been pretty nice, if you could change your code in those two functions, so they ONLY devir keycodes directly to KEY() completly unchanged, or a least could do that with second argument (etc onNativeKeyDown(20, 1)) . Howover by now they can been used trought a javacall instead.

Using OnKeyDown() and onKeyUp() seen get inputs pretty nice. So its matter on time im get a java communication code to get keyevents instead.

Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

fivesprites

Yeah, the key processing via SDL is wonky.  I've implemented all of the controller buttons/sticks/analogue buttons within AndroidExtras and it works ok.

Jonás Perusquía

That's nice fivesprites! :D
Keep up the good work :) also i will try to integrate IAP :)
<HTML><BASIC><EC>
Be free and do good things

spacefractal

does ouya uses software or hardware accelerated?

Its look like its only uses software acceleration, due the paint() uses around 45ms() and only can render 10-15 fps, even im only use 2048x2048 upscaled textures..... strange.

Im did also got the controller to work, but have still not implemented Analog controller (which is simply due Greedy Mouse dont use that).
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

fivesprites

I've got most of the IAP code done but there is one big issue....

Once a user has purchased (upgraded) your game/app then every time you start your game, you either:

a) Check the purchase against the OUYA receipt (has to be done online so therefore this is an always-online requirement)

or

b) Store encrypted information on the OUYA (using the putData call).  You would have to do this yourself, and in your own format.  I've already added code to AndroidExtras to support the put/get calls and additional calls to get the unique console ID and game ID.  The problem with this approach though is that you have to be careful how you protect that data - and also, the OUYA data store does not guarantee your data will stay there - it can delete it if large or hasn't been used in a long while!

Apparently, the OUYA developers are looking to implement a local receipt cache; if the console can't go online to check for a receipt it will check the local cache instead. 

For now, I'm always checking for receipts on game startup.  You can disable this and check for your own via getData.  As soon as local cache is available then you shouldn't need to record data any more.

//Andy



fivesprites

Quote from: spacefractal on 2013-Jul-05
does ouya uses software or hardware accelerated?

Its look like its only uses software acceleration, due the paint() uses around 45ms() and only can render 10-15 fps, even im only use 2048x2048 upscaled textures..... strange.


The OUYA is hardware accelerated.  I'm getting a solid 60fps (1920x1080 on 42" screen) so far, but my texture atlases are 1024x1024 - they're simple textures so no need for high definition! :)

https://dl.dropboxusercontent.com/u/32204670/getaway_ss1.png

I'm also working on an editor:

https://dl.dropboxusercontent.com/u/32204670/alphaed.png

which also ran brilliantly on the OUYA - even when I enabled hundreds of effects and had them animated :)

//Andy

erico

Great work you guys are pulling! :good:  :nw:

Quote from: spacefractal on 2013-Jul-05
...
Im did also got the controller to work, but have still not implemented Analog controller (which is simply due Greedy Mouse dont use that).

For map scrolling maybe? like you said before with the touch pad?

fivesprites

Grrr.... wanted to test this IAP stuff but I need to submit the form w-8ben.  Can't do that without an EIN number and I can't get that as the IRS office is closed (something to do with a USA public holiday) ;)

Sorry chaps - will release the updated AndroidExtras next week with the OUYA support.  It has full controller support and, hopefully, fully working IAP :D

//Andy



erico

Take your time five! maybe time for a nap now? :-[

I say it because I managed 2h bad sleep today, but I did not manage such great feats...all I did was draw a few monkey sprites :(

spacefractal

Fivesprite, do you use POLYVECTORS or draw directly? The game is still slow here and im uses a lots of POLYVECTOS here for the tilesdraw (up to 3 layers). Howover im do think im do have done a better frameskip meassure.

Im might do map scroll thing with the analogue thing, but first at all, im want the game in the playable state.

Im wish there was a NativeHD, which could have draw the whole thing about 50% faster, and then its would been 25-30fps playable. The console dont support 4096x4096 anyway, so as you upscaling using one or other way dont matter.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

fivesprites

I'm using a single start/endpoly for one full frame, with a LOT of polyvectors in-between (3 layers).  I scale the polyvector params according to the resolution.

I do not use createscreen/usescreen as that has really bad performance issues.

spacefractal

#73
deleted a post to avoid hijack (moved to the bug section).

Im do have some strange polyvectors issue, but its seen its was Windows only. Im got bettter control over framerate skips (before its was insane slowdowns), and im needed to zoom abit more in, and set framerate cap to 25fps (Greedy Mouse was designed with 30fps in mind). Then the game have been playable on OUYA. This is a puzzle game, so a lower framerate is actuelly ok. Still its could been better and see other ways im can optimize it (im removed a lots of LEN(). Then im can also update the regular android version as well after that. This console is a good reference for that kind.

Howover im do cant avoid upscaling for fullud, due 2048x2048 limit.

Howver the icon size seen also a bit different on this console.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

fivesprites

Very strange how you're getting such poor performance.  I just sideloaded the android port (without any changes) to the ouya and it ran perfectly.