So, OUYA. Will YA?

Previous topic - Next topic

Jonás Perusquía

Thanks :D i thought that you had a box for everything in your game and scaled as required, (to mantain proportional scaling).
<HTML><BASIC><EC>
Be free and do good things

spacefractal

im just detect width of the screen and doing some division how many tiles its should shown and uses that as scaling factor. Howover its variered from platform to platform on that detection (etc on android its zoom abit more in than iOS does). So the game was designed with any resoulutions in mind. howover only recentely the game can been upscaled from the medium graphics as well. Its can been avoid on this console.

Its a nice console and fun to play on a bigger screen. Im hope this console get some sort of succes. its got better release than most other im saw (example GameGadget, which failed very much on launch).

When ouya stuff works, then im thinks its should been pretty easy to port to other android consoles with minimum effort.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Marmor

got one ! need a how to run glb proggys

spacefractal

#93
that coming soon :-D. The reason is im are currectly implement a inapp way for Greedy Mouse. You can now virtually get items in windows version and seen calls the dummy methods currect, so its soon to get that to work for the OUYA part.

By now you should upgrade glbasic sdk so its uses api-14 and/or api-16 which is explainded in the bonus section. So look there for that. Im have included the java communication in c++ part, so only the templateproj is required when done to been downloaded.

fivesprite should post addidations to the ANDROIDEXTRAS for full controller support (im have still not got it to test, but its ok to put it directly to the ANDROIDEXTRAS section for other to enjoy :-D.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

spacefractal

today, done with inapp purchasese in the virtual way on Windows and calls seen ok, so in this weekend im seing getting inapp purchase working (if not fivesprites do that before me, hehe). When that is done, im will look how google play inapp works.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Ian Price

Excellent news. Good luck  :good:
I came. I saw. I played.

spacefractal

im are still on the w8 ben issue, so im cant go future right now about inapp purchase, while rest work. Anyway its a its a bit hot weather here, and have not do very much latectly here with programmering work. So im have delayed the game as well doing other ting in the summer period. Howover im will back soon again and do the OUYA job finished (if not fivesprite release that for me, he have done that too, so do that).

So, glbasic can run on OUYA, just with some modification to the SDK (which im have posted in the bonus section) and ANDROIDEXTRAS installed. OUYA uses API-16, but API-14 is pretty fine.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

erico

Nice, space, enjoy the sun.
The joystick is also working fine I guess?

spacefractal

as fivesprites and me have pointed, joypad works fine, and fivesprite also implemented inapp purchases (which im cant look on right now).

Howover you cant use glbasic own key handler with KEYS(), which cause only half of them works and a lots of "unknown Key" accour in logcat. Instead im did my own java keyhander in SDLActicity.java, and then send all pressed/unpressed keys back by using a single javacall (except those analoge controls, but they are pity easy to been done), which hold a 256 chars long string. Im thinks that would even works for Xperia Play (which caused a similar issue).

This is what im did and works fine. Since Fivesprite have made his own, he might have do a different way.

Im hope he send that soon to me, so im can test the differents out and then upload them to ANDROIDEXTRAS, even API-14+ would been required.

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

fivesprites

I've been so overloaded with work and trying to find time for Vita development that I've just not had time to test the OUYA code.  Controller is fully supported (including the analogue triggers and sticks), but I've not tested inapp purchasing at all.

I'm hoping to get some free time this weekend and will push out an update to AndroidExtras - even if it's just the controller support for now.

//Andy

spacefractal

im can first test the inapp thing when im a day done for the w8 crap. Im have sendt a support mail, without got a answear (and im have currectly no printer as well). Howover you could just do that part without inapp for the first version, so glbasic games can been tested on that. etc if you mail that,then im could look for the different from your and mine code, then im can release that after test.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Marmor

Come on , i cant wait ! ;)

spacefractal

Today.

Back to work on the controller thing on OYUA. Im just also get all controller buttons to work in java sdl, both digital and analogue.

Also im got a issue where the digital and left joypad controller sendt same KeyEvent code key, but im also found a way to prevent that (checking using KeyScanCode()).

Now im just need the java call part in glbasic, so its can been used in glbasic.

Also im dedicated try doing the generic motion way using he id Google Document prefer doing when doing onGenericMotionEvent(). Its seen this joypad have implemented that correct. So importing tv.ouya.console.api.OuyaController was not even required.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Marmor

create a ouya only game , make a kickstarter for and get double money !
see ouya.tv.

spacefractal

#104
for thoses in US and Canada only as aware, so im cant do that.

The controller is now works inside the game (all buttons seen works now). Even im use the generic onGenericMotionEvent(MotionEvent event) callback without using Ouya ODK, but a least SDK api-12 will been required. With that in mind, its cannot work with standard glbasic, which uses api-8, so you need to upgrade the sdk in glbasic first (which im have did that in the bonus section).

Im will prepere it to been used for the current ANDROIDEXTRAS in one of the follow day and release that. Here is the glbasic code part (output will been -1000 to 1000 integer, not a float, due im not trust floats when strings is used for converts):

Code (glbasic) Select

FUNCTION ControllerAndroid: Command$, Argument=0
STATIC ANDROIDKEYS$=""
STATIC ANDROIDJOY$=""

// this require before invoking keys, example after a SHOWSCREEN or in your controller code.
SELECT Command$

CASE "Update"
ANDROIDKEYS$=CallJava$("getKeys")
ANDROIDJOY$=RIGHT$(ANDROIDKEYS$, LEN(ANDROIDKEYS$)-255)
// ANDROIDKEYS$=LEFT$(ANDROIDKEYS$, 255)
// keyCode from a key, just like KEYS()
CASE "KeyCode"
LOCAL Keys$=MID$(ANDROIDKEYS$, Argument, 1)
RETURN Keys$
CASE "JoyLeftX"
RETURN HtmlTag$(ANDROIDJOY$, "JLX")
CASE "JoyLeftY"
RETURN HtmlTag$(ANDROIDJOY$, "JLY")
CASE "JoyRightX"
RETURN HtmlTag$(ANDROIDJOY$, "JRX")
CASE "JoyRightY"
RETURN HtmlTag$(ANDROIDJOY$, "JRY")
CASE "LeftTrigger"
RETURN HtmlTag$(ANDROIDJOY$, "LT")
CASE "RightTrigger"
RETURN HtmlTag$(ANDROIDJOY$, "RT")
ENDSELECT
ENDFUNCTION
FUNCTION HtmlTag$: Line$, Tag$
LOCAL cmd$, tag$, name$, value$
FOR i=1 TO 10
cmd$=StringField$(Line$, i, " ")
cmd$=REPLACE$(cmd$, CHR$(34), "")
cmd$=REPLACE$(cmd$, "<", "")
cmd$=REPLACE$(cmd$, ">", "")
IF cmd$="" THEN RETURN
name$=StringField$(cmd$, 1, "=")
IF name$=Tag$
name$=StringField$(cmd$, 2, "=")
IF RIGHT$(name$,1)="/"
name$=LEFT$(name$,LEN(name$)-1)
ENDIF
RETURN name$
ENDIF
NEXT
ENDFUNCTION


The first version will only supports one player (all controllers is threated just like one controller). This code should also works with various other controllers as well (example on Xperia Play, none tested).
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/