Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Archived Talk:Creating a New Cocos2d-x Project for Windows Phone 8

From Wiki
Jump to: navigation, search

Contents

Hamishwillee - Review/subedit

Hi

Just gave this a minor subedit for wiki style. I think its a really useful topic - particularly as Cocos is so widely used.

In terms of "room for improvement".

  1. Perhaps rename section "Differences between Windows Phone 8 and iOS applications" to "Porting from iOS to Windows Phone 8". Note that this feature of the article is not covered in the introduction, so worth adding a note that you offer advice on what needs to be changed
  2. The cocos2dx-wp8.sln file looks like a lot of "magic" numbers for project - are these always the same / will they ever change. Ie is this just a boilerplate change
  3. The image is for wPong app but the description is for helloworld. This is a bit confusing
  4. You do explain that this is a helloworld app, but might be worth explaining the integration with Cocos in just a little more detail.
    • Presumably this is a DirectX app - C++/Cx?
    • I'd really like to see a table listing the main folders of the Helloworld project (e.g. Assets, Box2s, Classes etc) along with an explanation of what is in them and what a port would do - e.g. "Assets- this contains images and textures of the test project. These can all be deleted as you'll need to add your own assets". This would be before your set - by step guide and help people understand what is the WP infrastructure, what is the Cocos infrastructure, and what is "your app".
  5. "Using Cocos-2d" section is very very thin. It would be great to point to any tutorials here as well explaining the Cocos-2d application framework. Again, a Cocos project is presumably the same across platforms and what you're trying to do is make it clear what is WP/cocos "framework" nuts and bolts and where you tie in your code. At that point, everything in the "default cocos tutorials " should take over.

Hope the comments makes sense/are helpful.

Regards

Hamsih

hamishwillee 06:30, 7 December 2012 (EET)

Hamishwillee - OK, just read "Porting Cocos2d-x Games for Windows Phone 8"

Hi Summeli

OK, so just read your companion article Porting Cocos2d-x Games for Windows Phone 8. It answers a lot of the questions I had here. I would be tempted to push all the porting stuff (ie the "Differences between Windows Phone 8 and iOS applications") into the other article. )

I am not quite sure where to "draw the line" between the two, but I think perhaps have architectural stuff in this one (like "Introduction for integrating WinRT components into your native c++ app") and at the end of this article you understand what makes a Cocos2d app on Windows Phone 8 and you have a "framework"/project which you can copy in your stuff for porting or write new code. The other article then talks about what assets get copied where.

Just a thought anyway.

regards

Hamish

hamishwillee 06:53, 7 December 2012 (EET)

CodeHelix - Won't deploy on Windows Phone 8 Device

I have tried to follow along but am only able to deploy to the emulator as it will not work when I try to deploy on my WP8 as I find the emulator not suitable for game development especially since I want to make a twin stick shooter. Is there another step that needs to be made to be able to deploy to a WP8 device?

CodeHelix 05:45, 11 December 2012 (EET)

Summeli - I don't have wp8 device

So I don't know what's the problem with the deployment. It seems to be working on the simulator itself, so it should be possible to deploy it also to the phone. Can you even debug i, and see if you're missing some assets or something?

summeli 08:29, 11 December 2012 (EET)

Summeli - Thanks for the feedback

Yes, my original idea was to keep this article as "minimalistic steps" for creating a cocos2d-x project for new game projects, and then have the other article focused on porting the existing applications. I guess that link to some cocos2d-x tutorial & to the proting article would work better.

summeli 08:33, 11 December 2012 (EET)

SandCu - Problems on wp8 Device

Hi I've tested cocos2D-X on my lumia 920 but it only draws at the left bottom side of the screen,I've already raise this problem as an issue on github but no one answered till now,so I wonder whether u've got any clues about this. thanks. here's the link to my issue on github,I've uploaded some screen snapshot,hopes help.

https://github.com/cocos2d-x/cocos2dx-win8/issues/20

SandCu 12:20, 24 January 2013 (EET)

Summeli - about the resolutions

Microsoft only added support for 800x480 resolution. It works really well with Nokia 820, but you have to do some extra work for other resolutions.

See the AppDelegate.cpp, and try changing the resolutions etc. Modifying this should help you a bit:

mainView->setDesignResolution(320, 533);

summeli 12:44, 24 January 2013 (EET)

SandCu - thanks for your reply

yeah,that does a resolution problem. lumia 820 use the WVGA resolution and the method CCEGLView->Create() use the default resolution so it works well on it,but the lumia 920 use the WXGA resolution and that's the problem,the problem could be found on the WXGA Emulator too.

thanks for your divice but the method 'setDesignResolution' seems not worked as expected.

SandCu 13:26, 24 January 2013 (EET)

Summeli - Try this hack

This one should work: http://www.cocos2d-x.org/boards/6/topics/18789?r=18987#message-18987

summeli 14:34, 24 January 2013 (EET)

SandCu -

That does help! thanks a lot,I'm gonna share this with other guys,thank again!

SandCu 09:44, 25 January 2013 (EET)

Eric2013 -

HI all, I have tried the above workaround, it works for 480x800 and 768x1280 devices, but still not working for 720x1280 device. Please advice.

Summeli -

Do you mean those small black borders in 768x1280 resolution? It's not so bad. Microsoft even approves your app to the marketplace with those. I would expect this issue to be fixed when microsoft gets the cocos2d-x port finalized.

summeli 08:43, 4 February 2013 (EET)

Blugrisoftware - XAML - Cocos2d-x sample

Hello,

do you also have a sample of Cocos2d-x with XAML ?

blugrisoftware (talk) 17:41, 3 October 2013 (EEST)

Summeli - no xaml

the Idea in this article is to use C/C++ with Cocos2d-X to keep the application portable. You could compile the game easily to Android and IOS to reach wider audience.

summeli (talk) 17:52, 3 October 2013 (EEST)

Blugrisoftware -

Thanks for the quick reply.

I agree on portability. The game I am working on is at this moment fully portable.

But it is a free to play game that requires ads. Unfortunately ad networks provide only a Silverlight SDK for Windows Phone :-(.

I have also looked at Cocos2D-XNA but that does also have problems with the integration with XAML.

Cheers,

Tom

blugrisoftware (talk) 18:13, 3 October 2013 (EEST)

Vinit77 - not getting run on device but on simulator.

Hi,

I have port a ios cocos2dx game in wp8. But when I am running it, its only running on simulator in release mode, not on device. On device its giving me the following error :

"error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v11.0\Microsoft.Windows.UI.Xaml.Cpp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets"

Can anyone tell me what is the mistake or anyone who faced the similar issue??

vinit77 (talk) 14:22, 18 November 2013 (EET)

Vinit77 - Update article.

Hi,

Can you please update this article for cocos2d-x 2.2 version as the files and extensions you are talking about are no more there in this version of cocos2d-x.

Thanks

vinit77 (talk) 14:36, 18 November 2013 (EET)

Hamishwillee - Vinit77 - archived

Hi Vinit77

I spoke to the author about this. Since the article was written the instructions on cocos2d-x site have improved. So even though this is a fairly good article and it would not be huge effort to update, we think it is better to archive this article and point to the official instructions.

This has now been done.

regards

Hamish

hamishwillee (talk) 03:13, 20 November 2013 (EET)

Salil - Not able to run the same in my window phone

I am able to run the Hello World But I am not able to run the same it in windows phone , Please can somebody guide me . As Whenever I try to run the same in windows phone I get the error : error LNK1181: cannot open input file 'freetype.lib'

Regards,

Salil

Salil (talk) 17:04, 17 December 2013 (EET)

Hamishwillee - Salil - Archived

Hi Salil

This article is archived. That means that it is no longer maintained and no one is actually watching it or trying to keep it up to date.

Regards

Hamish

hamishwillee (talk) 06:06, 7 January 2014 (EET)

Noblaky - Error when build on device

Please help me. It run very well on simulator but on device , have two errors :

Error LNK1181: cannot open input file 'freetype.lib'

EX4502: invalid vs_2_0 output semantic 'SV_TARGET'

noblaky (talk) 06:02, 18 February 2014 (EET)

This page was last modified on 18 February 2014, at 04:02.
24 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×