Cocos2d-XNA: Build & Execute using Windows Phone 8
Time for blogging again. Today, I shall provide a step by step tutorial for building and executing cocos2d-xna code project in Microsoft Visual Studio 2012 for windows phone 8.
Prerequisites:
1) Knowledge of XNA content pipeline.
2) Knowledge of Cocos2d-XNA platform.
Lets not waste any further of our time and start with the tutorial.
1) Install XNA Game Studio 4.0 & its visual studio extensions via MXA Game Studio.
2) Install Git on your machine.
3) Go to Cocos2d-xna git repository and Download the master code base of cocos2d-xna through git by following the provided procedure.
Prerequisites:
1) Knowledge of XNA content pipeline.
2) Knowledge of Cocos2d-XNA platform.
Lets not waste any further of our time and start with the tutorial.
1) Install XNA Game Studio 4.0 & its visual studio extensions via MXA Game Studio.
2) Install Git on your machine.
3) Go to Cocos2d-xna git repository and Download the master code base of cocos2d-xna through git by following the provided procedure.
4) After downloading the "Cocos2D-xna" source code. Go to following path i.e. ~/MonoGame/, under this directory double click "Protobuild.exe" file to generate platform specific projects.
5) Open MS Visual Studio 2012 and click tools->extension &updates
6) Write "Cocos2d" in search box and install "Cocos2D-XNA Empty Game for Windows Phone".
7) Now create new project by using cocos2d-xna WP8 template and name it "SampleApp".
8) Remove 'box2d, cocos2d, ICSharpCOde.SharpZLib, MonoGame.Framework' references from your project.
9) Add the platform specific projects of 'box2d, cocos2d, ICSharpCOde.SharpZLib, MonoGame.Framework' projects from the downloaded code (Wp8 in this case). By Right click the project and click add->existing project. Then select WP8 project files for 'box2d, cocos2d, ICSharpCOde.SharpZLib, MonoGame.Framework' one by one.
6) Write "Cocos2d" in search box and install "Cocos2D-XNA Empty Game for Windows Phone".
7) Now create new project by using cocos2d-xna WP8 template and name it "SampleApp".
8) Remove 'box2d, cocos2d, ICSharpCOde.SharpZLib, MonoGame.Framework' references from your project.
9) Add the platform specific projects of 'box2d, cocos2d, ICSharpCOde.SharpZLib, MonoGame.Framework' projects from the downloaded code (Wp8 in this case). By Right click the project and click add->existing project. Then select WP8 project files for 'box2d, cocos2d, ICSharpCOde.SharpZLib, MonoGame.Framework' one by one.
<Grid x:Name="LayoutRoot" Background="Transparent"> <DrawingSurface x:Name="XnaSurface"/> <MediaElement></MediaElement> </Grid>
12) Now, right click the root of the projects and click add->new project, then add "Windows Phone Game library" project and name it "XNAContentPipeline".
'xcopy "$(ProjectDir)$(OutDir)Content\*.xnb" "$(SolutionDir)SampleApp\Content" /D /y /s /r' 'xcopy "$(ProjectDir)$(OutDir)Content\*.wma" "$(SolutionDir)SampleApp\Content" /D /y /s /r'
Enjoy!! Coding.
Thanks for sharing this information. I found it very informative as I have been researching a lot lately on practical matters such as you talk about..
ReplyDeletecocos2d game development
Thanks for sharing such huge content keep posting further
ReplyDeleteCity Book of Pakistan