Bennu Game Development

English Forums => Helpdesk => Topic started by: blabla on September 13, 2014, 07:33:37 PM

Title: OUYA button crash the whole game
Post by: blabla on September 13, 2014, 07:33:37 PM
Hello,
i was unable to update Rubby Bird on OUYA for months because the OUYA team keeps telling me that pressing the OUYA button crash the whole game.
The last time i got to work , i had no idea how i did it.
Apparently , this has to do with the guarda_opciones(); but even when i put it in my code , pressing the OUYA button keeps crashing the game.
This does not happen on MOJO.
I'm using the latest pixplantilla version.

The source code in question can be found here : http://goo.gl/0jnpHe
And the assets can be found here : http://goo.gl/hV2hHu

Any ideas on how to fix it ?
Title: Re:OUYA button crash the whole game
Post by: panreyes on September 14, 2014, 09:02:59 AM
Hi! I changed the way it worked for OUYA. Now, instead of exiting the game, I pause it with this code:


Function salir_android();
Begin
pause_game();
while(!focus_status) frame; end
resume_game();
End


Function pause_game();
Begin
signal(ALL_PROCESS,s_freeze);
if(exists(father)) signal(father,s_wakeup); end
from i=0 to 9;
timer_store[i]=timer[i];
end
pause_song();
End


Function resume_game();
Begin
signal(ALL_PROCESS,s_wakeup);
from i=0 to 9;
timer[i]=timer_store[i];
end
resume_song();
End
Title: Re:OUYA button crash the whole game
Post by: blabla on September 14, 2014, 04:34:23 PM
Thanks for the code pixel but i have assigned no function , nothing to the OUYA button.
When they manually exit the game , it exists gracefully.
But when they press the OUYA button (i have assigned nothing to that) , the game crashes.

If you want to see it yourself , sideload my apk :
https://dl.dropboxusercontent.com/u/81783879/Multiplatform/Rubby%20Bird/Android/rubbybird-OUYA.apk (https://dl.dropboxusercontent.com/u/81783879/Multiplatform/Rubby%20Bird/Android/rubbybird-OUYA.apk)

And try to press the OUYA button.

There was also some problems with the source code , i fixed those and attached it.


Title: Re:OUYA button crash the whole game
Post by: panreyes on September 14, 2014, 09:24:09 PM
Puff... Sorry then.


Anyway, just wait a little longer as BennuGD's going to have a lot of awesome changes thanks to Josebita, SplinterGU and SDL2!
Title: Re:OUYA button crash the whole game
Post by: blabla on September 15, 2014, 02:22:25 AM
Quote from: PiXeL on September 14, 2014, 09:24:09 PM
Puff... Sorry then.


Anyway, just wait a little longer as BennuGD's going to have a lot of awesome changes thanks to Josebita, SplinterGU and SDL2!
Cool ! I'll just wait then.
I'm sorry that your project failed but at least the whole community will benefit from it :)
Title: Re:OUYA button crash the whole game
Post by: panreyes on September 15, 2014, 08:24:06 AM
Well, our Kickstarter failed and our graphics artist left the team, but that doesn't meant the project has failed!


I'm still working on it, programming and giving it a few new, and awesome, features. And after all the code is done, we will look for a new graphics artist.
Title: Re:OUYA button crash the whole game
Post by: blabla on September 29, 2014, 09:02:54 PM
I submitted a new version with the code you gave me and it worked, thanks !
Looks like i was wrong...

Quote from: PiXeL on September 15, 2014, 08:24:06 AM
Well, our Kickstarter failed and our graphics artist left the team, but that doesn't meant the project has failed!
I'm still working on it, programming and giving it a few new, and awesome, features. And after all the code is done, we will look for a new graphics artist.
Good thing you are still working on it !
I really would like to have that 'GIF recording' for my game...