Porting to Windows Phone 8.1

Hi,

I’ve a game working with Android, and now I want to try port it to windows phone 8.1

I’m using Visual Studio 2015 Community Update 2, cocos2d-x v3.10 and Windows 10 x64 in my PC (with developer mode activated)

I’m able to open the windows 8.1 solution, compile and deploy it, even run and debug without problems, but:

  1. If I try to run it directly from my phone instead of debugging from inside Visual Studio, it crashes. No matter if my phone is attached to the PC or not.
  2. Also, in the windows dev center says that I must upload an .xap, .appx, .appxbundle and.appxupload file (guess it’s the equivalent of android’s apk), but
    I’ve made a recursive search in my project’s root folder and haven’t found any of these files.

So, what may be happening with 1) and what should I do to generate required files in 2)?

Thanks in advance

PS: If developing it for win10 might be easier than win8.1 it’s ok for me, i’m just trying to figure how to get it working on some of these microsoft devices

what did you do to make it deploy to windows desktop? am having issues there but on android its running well

@kasweshi, I just openned the solution from proj.win8_1 and added the required src files in the Shared project/Classes folder.

As for uploading app to store, after some googling I’ve found that there is a ‘Store’ menu when you right-click on the project that seems to be the one that compiles and prepares those files. When I’ve time to try it I’ll post the results… Thate menu it’s also located in the Project menu, but you need to open the proj.win8.1 solution or it won’t show.

alright thanks i’l include those cpp files first

Hi,

What file format do you use for sounds?
I am using mp3 but I have a crash when I play background music with

CocosDenshion::SimpleAudioEngine::getInstance()->playBackgroundMusic(...)

Do you know how to speedup startup of Win8_1? Currently it needs around 5s to compile shaders

Regards,
CHP

Hi
I use both mp3 and wav. I do use PreloadBackgroundMusic(…) and PreloadSoundEffect though.

No idea about how to start up win8_1. Honestly, I didn’t even knew it was coz shaders, I thought it was just slow loading the plist+png (I’m testing with a Lumia 435, duh!).

Do you use new audio engine?

Nope, as you, I’m using CocosDenshion::SimpleAudioEngine::getInstance()

And what version of cocos? I am using cocos2dx-3.10. For my game I have to diable background music for windows 8.1/10 (it crashes)

CHP

Hi @CrazyHappyGame

Yeah, I’m using cocos2d-x v3.10 and I’m using SimpleAudioEngine. I’m testing on a Microsoft Lumia 435. I did my first tests when my phone was wp8.1 and now i’ve upgraded it to windows 10 and it’s still working (both wav and mp3) and both projects (wp8.1 and win10-universal).

Haven’t done anything strange to make it work, I’ve only added the cpp and h files to my solution and compiled/deployed to phone. I’ve read somewhere that mp3 wasn’t supported, but all my sound effects are mp3 and they play fine, and my music was mp3 too (now wav) and played fine when it was mp3, and now plays fine as wav so I just thought that info was outdated.

I used audacity to create/edit/normalize volume of my mp3 files and currently I have different bit rates (64kb, 128 kb, …) depending of the place I downloaded the audio. Think they’re all constant bitrate though.

Are you using an emulator for testing? Or a real device?

I think i’l just try using v3.10 as i am using 3.9 and everything is compiling just alright i can even see the splash screen when the game is starting but the menu is blank it it shows that the GL verts are constantly increasing by 10s of thousands until it crashes