How To Use CoCos 2d with Silverlight ?

Topics: Compatibility, Windows Phone 8
Nov 14, 2013 at 1:24 PM
Hi Devs,

I have developed a game , I got a problem in Populating scores , One solutions I found is Creating a Hybrid Project for Silverlight-Xna . But cocos2d doesnot supports in silverlight.

A chinese guy here edit a cocos2D library :

But I'didn't got his chinese solution. I just need to know is there's any silverlight version of Cocos2d, if not , How do we edit to use in Silverlight ? becoz there's always a solution for a problem.

Kindly suggest a Hint / Code to Accomplish this task. Any kind of Help will be Appreciated.

Pardeep Sharma
Nov 16, 2013 at 10:44 PM
hello, we don't follow what your problem is. if you could post your problem in the form of a description of a problem, then maybe we can help.
Nov 21, 2013 at 11:38 AM
totallyevil wrote:
hello, we don't follow what your problem is. if you could post your problem in the form of a description of a problem, then maybe we can help.
HI Totally Evil,

I want to Create a Hybrid Project in Windows phone 7.1 using Silverlight+xna template. But the problem is Cocos2DX doesn't support in Silverlight . Cocos2D only supports for XNA gaming, but a chinese guy HERE made some changes in existing Cocos2Dx version to make it work in silverlight version.

I'd create a Hybrid Project HERE named under : SIXnaApp1 , and I Created an Object of CCApplication in gamepage.xaml.cs like this :

CCApplication app = new HelloCocos2d.AppDelegate(" // this parameter should Game Class Object ", "// This param should be GraphicsDeviceManager");

but CCApplication Constr accepts game object and GraphicsDeviceManager as its parameter which is not feasible in Silverlight.

Someone told me that I need to make Substantial changes in Cocos2Dx library to make it work in Silverlight , but i don't know How to do such changes.
Kindly suggest a way to come through it, and try to reply ASAP, ur reply in questions are very late.

Pardeep Sharma
Dec 7, 2013 at 6:57 PM
Hi Pardeep,

none of us are Silverlight experts and our support of Windows 7.1 is waning fast thanks to all of us migrating to windows 8.1 ...

I wonder if this problem would be similar to using the limited XNA implementation provided by the Windows Phone 8 SDK's game template ...
Dec 8, 2013 at 6:30 AM
I started converting one of our WP7 games over to Silverlight + XNA WP7 to put ads in it. The Game XAML page becomes your Game class and then some changes need to be made to CCDrawManager and CCApplication. I am sure there is an easier way to do this so that no changes are required. the Silverlight runtime does not have a GraphicsDeviceManager like XNA has, so that makes up most of the changes - making CCDrawManager use the SilverlightSharedGraphicsDeviceManager which is an IGraphicsDeviceService implementation.

We will work on this steadily, but it will be some time before we have a fully supported version of cocos2d-xna working with Silverlight-xna on WP7 that demonstrates all of the tests properly.
Dec 16, 2013 at 10:41 AM
Hi Pardeep,

Did you solve your problem?

I'm callin sos give me some help。