Learning Corona by Re-Skinning Tilt Monster

Hey all, thanks for welcoming me into your community. I really like Corona and LUA has so far been pretty good to me.

So far I’ve completely re-skinned the entire Tilt Monster app and have added/removed some of my own functions. However, I’m running into an issue that may have been discussed but I haven’t found anything about it.

I’m not sure if it’s because it’s not compatible with the new SDK or another issue, but when the character dies, the game over screen does not show, audio does not stop, however all other functionality ceases. It does not throw an error in the console and it looks as though the function is being called.

My code is located at https://bitbucket.org/gibbyxdesign/dairy_app/

Thanks for any help! [import]uid: 225650 topic_id: 36138 reply_id: 336138[/import]

Hi @gibby,
Welcome to Corona, nice to see you’re learning by “dissecting”. :wink:

Tilt Monster being an extremely old app, no doubt it uses APIs which have been deprecated or removed entirely. I know that it used OpenFeint, and maybe some old audio APIs. Also, it likely used one of the original versions of Director which might have issues now.

You can continue with this code, but you’ll be better off following some of the more current tutorials and guides located here:
http://www.tandgapps.co.uk/resources/coronalabs-resources/

Any other questions, please ask, the community is a great source for support and idea sharing.

Best of luck!
Brent Sorrentino

[import]uid: 200026 topic_id: 36138 reply_id: 143549[/import]

That’s what I’m afraid of @Brent Sorrentino. I’m really finished with this app with the exception of the game-over screen. I’m not sure we can afford to start over on this. We have invested in corona though, so I know there will be plenty of more options for me to do it right.

This is the error I’m now able to produce

/Applications/AMPPS/www/dairy\_app/maingame.lua:1492: Passed unexpected parameter type to audio.stop()  
stack traceback:  
 [C]: ?  
 [C]: in function 'stop'  

Is that a deprecated audio function? It appears in the API… [import]uid: 225650 topic_id: 36138 reply_id: 143586[/import]

Hi @gibby,
OK, this one is easy enough… the game is probably passing 0 to the audio.stop() API to stop ALL audio channels. The method for that was changed some time ago: to stop all audio channels, you should pass no parameter whatsoever. You can still stop the audio on a specific channel by passing an integer 1-32 (32 being the total number of channels), but to stop all channels, pass nothing instead of 0.

Regards,
Brent [import]uid: 200026 topic_id: 36138 reply_id: 143611[/import]

Yep! That’s what I did, I now have it functionally finished!

Just have to fine-tune it.

Corona is pretty great, I look forward to using it more. [import]uid: 225650 topic_id: 36138 reply_id: 143615[/import]

Hi @gibby,
Welcome to Corona, nice to see you’re learning by “dissecting”. :wink:

Tilt Monster being an extremely old app, no doubt it uses APIs which have been deprecated or removed entirely. I know that it used OpenFeint, and maybe some old audio APIs. Also, it likely used one of the original versions of Director which might have issues now.

You can continue with this code, but you’ll be better off following some of the more current tutorials and guides located here:
http://www.tandgapps.co.uk/resources/coronalabs-resources/

Any other questions, please ask, the community is a great source for support and idea sharing.

Best of luck!
Brent Sorrentino

[import]uid: 200026 topic_id: 36138 reply_id: 143549[/import]

That’s what I’m afraid of @Brent Sorrentino. I’m really finished with this app with the exception of the game-over screen. I’m not sure we can afford to start over on this. We have invested in corona though, so I know there will be plenty of more options for me to do it right.

This is the error I’m now able to produce

/Applications/AMPPS/www/dairy\_app/maingame.lua:1492: Passed unexpected parameter type to audio.stop()  
stack traceback:  
 [C]: ?  
 [C]: in function 'stop'  

Is that a deprecated audio function? It appears in the API… [import]uid: 225650 topic_id: 36138 reply_id: 143586[/import]

Hi @gibby,
OK, this one is easy enough… the game is probably passing 0 to the audio.stop() API to stop ALL audio channels. The method for that was changed some time ago: to stop all audio channels, you should pass no parameter whatsoever. You can still stop the audio on a specific channel by passing an integer 1-32 (32 being the total number of channels), but to stop all channels, pass nothing instead of 0.

Regards,
Brent [import]uid: 200026 topic_id: 36138 reply_id: 143611[/import]

Yep! That’s what I did, I now have it functionally finished!

Just have to fine-tune it.

Corona is pretty great, I look forward to using it more. [import]uid: 225650 topic_id: 36138 reply_id: 143615[/import]

Hi @gibby,
Welcome to Corona, nice to see you’re learning by “dissecting”. :wink:

Tilt Monster being an extremely old app, no doubt it uses APIs which have been deprecated or removed entirely. I know that it used OpenFeint, and maybe some old audio APIs. Also, it likely used one of the original versions of Director which might have issues now.

You can continue with this code, but you’ll be better off following some of the more current tutorials and guides located here:
http://www.tandgapps.co.uk/resources/coronalabs-resources/

Any other questions, please ask, the community is a great source for support and idea sharing.

Best of luck!
Brent Sorrentino

[import]uid: 200026 topic_id: 36138 reply_id: 143549[/import]

That’s what I’m afraid of @Brent Sorrentino. I’m really finished with this app with the exception of the game-over screen. I’m not sure we can afford to start over on this. We have invested in corona though, so I know there will be plenty of more options for me to do it right.

This is the error I’m now able to produce

/Applications/AMPPS/www/dairy\_app/maingame.lua:1492: Passed unexpected parameter type to audio.stop()  
stack traceback:  
 [C]: ?  
 [C]: in function 'stop'  

Is that a deprecated audio function? It appears in the API… [import]uid: 225650 topic_id: 36138 reply_id: 143586[/import]

Hi @gibby,
OK, this one is easy enough… the game is probably passing 0 to the audio.stop() API to stop ALL audio channels. The method for that was changed some time ago: to stop all audio channels, you should pass no parameter whatsoever. You can still stop the audio on a specific channel by passing an integer 1-32 (32 being the total number of channels), but to stop all channels, pass nothing instead of 0.

Regards,
Brent [import]uid: 200026 topic_id: 36138 reply_id: 143611[/import]

Yep! That’s what I did, I now have it functionally finished!

Just have to fine-tune it.

Corona is pretty great, I look forward to using it more. [import]uid: 225650 topic_id: 36138 reply_id: 143615[/import]

Hi @gibby,
Welcome to Corona, nice to see you’re learning by “dissecting”. :wink:

Tilt Monster being an extremely old app, no doubt it uses APIs which have been deprecated or removed entirely. I know that it used OpenFeint, and maybe some old audio APIs. Also, it likely used one of the original versions of Director which might have issues now.

You can continue with this code, but you’ll be better off following some of the more current tutorials and guides located here:
http://www.tandgapps.co.uk/resources/coronalabs-resources/

Any other questions, please ask, the community is a great source for support and idea sharing.

Best of luck!
Brent Sorrentino

[import]uid: 200026 topic_id: 36138 reply_id: 143549[/import]

That’s what I’m afraid of @Brent Sorrentino. I’m really finished with this app with the exception of the game-over screen. I’m not sure we can afford to start over on this. We have invested in corona though, so I know there will be plenty of more options for me to do it right.

This is the error I’m now able to produce

/Applications/AMPPS/www/dairy\_app/maingame.lua:1492: Passed unexpected parameter type to audio.stop()  
stack traceback:  
 [C]: ?  
 [C]: in function 'stop'  

Is that a deprecated audio function? It appears in the API… [import]uid: 225650 topic_id: 36138 reply_id: 143586[/import]

Hi @gibby,
OK, this one is easy enough… the game is probably passing 0 to the audio.stop() API to stop ALL audio channels. The method for that was changed some time ago: to stop all audio channels, you should pass no parameter whatsoever. You can still stop the audio on a specific channel by passing an integer 1-32 (32 being the total number of channels), but to stop all channels, pass nothing instead of 0.

Regards,
Brent [import]uid: 200026 topic_id: 36138 reply_id: 143611[/import]

Yep! That’s what I did, I now have it functionally finished!

Just have to fine-tune it.

Corona is pretty great, I look forward to using it more. [import]uid: 225650 topic_id: 36138 reply_id: 143615[/import]