Windows Game Developer Contest and some beginner questions

Hi guys,

Sharing a Windows Game Developer Contest in case some of you don’t know about it.

http://www.wpdevcenteroffers.com/home/contest

Also, I have some silly newbie question and can’t find the answers with know-it-all google, appreciate if anyone can help out, thanks in advance!

  1. Do I need a windows phone or just test with the emulator will do?

  2. How to make the rate it/review my app button? Use system.openURL()? (I read there is a rate-my-app Windows Phone component)

  3. How long is the review process?

  4. From the documents the audio doesn’t support .mp3, so I have to convert to ogg?

  5. Back button, do we need a “confirm you want to quit” pop out? Since the system.popup is not supported we have to make a scene on our own?

I can’t answer all of these, but for #1, the emulator requires certain hardware features to run.  This setting isn’t all that common to Windows machines.  If your CPU doesn’t support this virtualization mode, then you will need a device to test on.

Here’s the Window’s system requirements for this:  https://msdn.microsoft.com/en-us/library/windows/apps/ff626524%28v=vs.105%29.aspx#hyperv

#2.  We don’t support native.showPopUp() in CoronaCards, so you’re left to your own means to accomplish this.  I don’t know if system.OpenURL will work or not.  Since you’re compiling in native space, if there are native SDK calls to rate your app, you should be able to call them.  See:  https://msdn.microsoft.com/en-us/library/windows/apps/hh394030%28v=vs.105%29.aspx

#4, yes, you will have to convert to .wav or .oog. 

#5, I opened several apps and backspaced my way out.  I was never prompted for a “Are you sure you want to quit” type box. 

Rob

I have a sample windows phone app that adds the corona Hook to communicate with the lua code and a native popup message box.

You would do #2 the same way but call Microsoft’s rate app component.

I can find the link so you can download it if you want it.

Larry

Actually I just did #2 using Microsoft’s rate app component in an app I submitted.  It was pretty easy.  See:

https://msdn.microsoft.com/en-us/library/windows/apps/hh394030%28v=vs.105%29.aspx

Rob

Thanks Rob & Larry

  1. It requires windows 8.1 PRO which I don’t have so I end up getting a nice new phone lumia 535  at sgd $199 abt S145 usd

  2. I like to implement the Microsoft’s rate app component, how do I communicate with c+ language? Sorry I have no experience outside lua. After reading this page I still have no idea how to proceed, like where to put the C file in visual studio etc 

http://docs.coronalabs.com/coronacards/wp8/communication.html#class-framework

Can Rob spoonfeed me the code please?  :stuck_out_tongue:

  1. converted to ogg, music works well on windows phone

I followed this wonderful guide by fellow corona user http://scottadelman.com/2014/12/01/lessons-learned-bringing-my-corona-apps-to-window-phone/ and successfully tested the game on lumia.

Now the text is indeed a big problem on windows, so I have spent the past two days learning how to make bitmap font’s and implementing them with multi lines(I have a lot dialogue boxes in game).

Update:

So the rate it is actually very simple to implement.

system.openURL(“zune:reviewapp?appid= yourappid”)

email is easy too:

system.openURL(“mailto: testing@yourdomain.com”) 

open native app twitter and facebook

system.openURL(“fb://profile/ yourfbID”)

system.openURL(“twitter://user?id= yourtwitterID”)

Just found out how to edit the tiles and add splash screen. :rolleyes:  

If you want to do it the native way, its pretty easy.  Add this to your MainPage.cs file near the bottom as a child function of MainPage():

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /// \<summary\>Called by Lua when it is requesting a login popup to be shown.\</summary\> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /// \<param name="sender"\>The CoronaRuntimeEnvironment that dispatched this event.\</param\> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /// \<param name="e"\>Provides the Lua vent table's fields/properties.\</param\> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /// \<returns\>Returns a boxed object to Lua.\</returns\> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private CoronaLabs.Corona.WinRT.ICoronaBoxedData rateApp( &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CoronaLabs.Corona.WinRT.CoronaRuntimeEnvironment sender, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CoronaLabs.Corona.WinRT.CoronaLuaEventArgs e) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MarketplaceReviewTask marketplaceReviewTask = new MarketplaceReviewTask(); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; marketplaceReviewTask.Show(); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // This returns nil to Lua. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return null; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }

At the top, in the “using” area add this line:

using Microsoft.Phone.Tasks;

In the OnCoronaRuntimeLoaded function add:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private void OnCoronaRuntimeLoaded( &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; object sender, CoronaLabs.Corona.WinRT.CoronaRuntimeEventArgs e) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Keep a reference to the Corona runtime environment. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // It's needed so that your login window's results can be dispatched to Corona. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fCoronaRuntimeEnvironment = e.CoronaRuntimeEnvironment; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fCoronaRuntimeEnvironment.AddEventListener("rateApp", rateApp); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }

Then in your Lua code for the touch/tap handler for your Rate button do:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; local requestRateApp = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name = "rateApp", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Runtime:dispatchEvent(requestRateApp)

Rob

Thanks Rob for the code! Very helpful as I plan to implement highscore charts and some other window native features, and I had no idea where to start.

For Rate It button I’ll stick with system.openURL(“zune:reviewapp?appid= yourappid”) cause it shows up pretty much the same as native.

I can’t answer all of these, but for #1, the emulator requires certain hardware features to run.  This setting isn’t all that common to Windows machines.  If your CPU doesn’t support this virtualization mode, then you will need a device to test on.

Here’s the Window’s system requirements for this:  https://msdn.microsoft.com/en-us/library/windows/apps/ff626524%28v=vs.105%29.aspx#hyperv

#2.  We don’t support native.showPopUp() in CoronaCards, so you’re left to your own means to accomplish this.  I don’t know if system.OpenURL will work or not.  Since you’re compiling in native space, if there are native SDK calls to rate your app, you should be able to call them.  See:  https://msdn.microsoft.com/en-us/library/windows/apps/hh394030%28v=vs.105%29.aspx

#4, yes, you will have to convert to .wav or .oog. 

#5, I opened several apps and backspaced my way out.  I was never prompted for a “Are you sure you want to quit” type box. 

Rob

I have a sample windows phone app that adds the corona Hook to communicate with the lua code and a native popup message box.

You would do #2 the same way but call Microsoft’s rate app component.

I can find the link so you can download it if you want it.

Larry

Actually I just did #2 using Microsoft’s rate app component in an app I submitted.  It was pretty easy.  See:

https://msdn.microsoft.com/en-us/library/windows/apps/hh394030%28v=vs.105%29.aspx

Rob

Thanks Rob & Larry

  1. It requires windows 8.1 PRO which I don’t have so I end up getting a nice new phone lumia 535  at sgd $199 abt S145 usd

  2. I like to implement the Microsoft’s rate app component, how do I communicate with c+ language? Sorry I have no experience outside lua. After reading this page I still have no idea how to proceed, like where to put the C file in visual studio etc 

http://docs.coronalabs.com/coronacards/wp8/communication.html#class-framework

Can Rob spoonfeed me the code please?  :stuck_out_tongue:

  1. converted to ogg, music works well on windows phone

I followed this wonderful guide by fellow corona user http://scottadelman.com/2014/12/01/lessons-learned-bringing-my-corona-apps-to-window-phone/ and successfully tested the game on lumia.

Now the text is indeed a big problem on windows, so I have spent the past two days learning how to make bitmap font’s and implementing them with multi lines(I have a lot dialogue boxes in game).

Update:

So the rate it is actually very simple to implement.

system.openURL(“zune:reviewapp?appid= yourappid”)

email is easy too:

system.openURL(“mailto: testing@yourdomain.com”) 

open native app twitter and facebook

system.openURL(“fb://profile/ yourfbID”)

system.openURL(“twitter://user?id= yourtwitterID”)

Just found out how to edit the tiles and add splash screen. :rolleyes:  

If you want to do it the native way, its pretty easy.  Add this to your MainPage.cs file near the bottom as a child function of MainPage():

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /// \<summary\>Called by Lua when it is requesting a login popup to be shown.\</summary\> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /// \<param name="sender"\>The CoronaRuntimeEnvironment that dispatched this event.\</param\> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /// \<param name="e"\>Provides the Lua vent table's fields/properties.\</param\> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /// \<returns\>Returns a boxed object to Lua.\</returns\> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private CoronaLabs.Corona.WinRT.ICoronaBoxedData rateApp( &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CoronaLabs.Corona.WinRT.CoronaRuntimeEnvironment sender, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CoronaLabs.Corona.WinRT.CoronaLuaEventArgs e) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MarketplaceReviewTask marketplaceReviewTask = new MarketplaceReviewTask(); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; marketplaceReviewTask.Show(); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // This returns nil to Lua. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return null; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }

At the top, in the “using” area add this line:

using Microsoft.Phone.Tasks;

In the OnCoronaRuntimeLoaded function add:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private void OnCoronaRuntimeLoaded( &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; object sender, CoronaLabs.Corona.WinRT.CoronaRuntimeEventArgs e) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Keep a reference to the Corona runtime environment. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // It's needed so that your login window's results can be dispatched to Corona. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fCoronaRuntimeEnvironment = e.CoronaRuntimeEnvironment; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fCoronaRuntimeEnvironment.AddEventListener("rateApp", rateApp); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }

Then in your Lua code for the touch/tap handler for your Rate button do:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; local requestRateApp = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name = "rateApp", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Runtime:dispatchEvent(requestRateApp)

Rob

Thanks Rob for the code! Very helpful as I plan to implement highscore charts and some other window native features, and I had no idea where to start.

For Rate It button I’ll stick with system.openURL(“zune:reviewapp?appid= yourappid”) cause it shows up pretty much the same as native.