1. supersuraccoon's Avatar
    I think you all know the "cocos2d-x", it's a C++ port of cocos2d game engine. Multi-platform, light weight, developer-friendly, free and open source.

    The win32 version allows the developer to work under the Xp with VS2008, if you do not have a mac and still want to do some developing (for fun or for learning or whatever the reason), this is the perfect chooice for you.

    PS:
    The latest version is cocos2d-0.99.5-x0.8.2 which supports the project template with VS2008, VS2010 express version.

    The tutorial here uses the VS2008+cocos2d-0.99.4-x-0.7.1 for example

    Here gose the tutorial, if you found something wrong please let me know, I'll fix it and if you fave any question you can contact me as well, I'm glad to help ^_^

    1.Download VS2008 and Install(You only need the C++ module)

    2.cocos2d-x install and deploy

    1)Download the cocos2d-x code:cocos2d-0.99.4-x-0.7.1.zip
    2)Install the cocos2d-x template
    Unzip the source code to anywhere in your computer(eg:E:\cocos2d-0.99.4-x-0.7.1)
    Enter the directory:E:\cocos2d-0.99.4-x-0.7.1\template\CCXAppWiz.vs
    Double click the "setup_vs2008.js" file to install the template
    There will be a messagebox showing the installation result

    3)compile the cocos2d-x HelloWorld example
    Enter the directory:E:\cocos2d-0.99.4-x-0.7.1
    Open the cocos2d-win32.sln with VS2008
    The the HelloWorld project as "Active project"
    compile in the debug mode
    Then run it
    compile in the release mode
    Then run it

    4)compile the cocos2d-x libCocosDenshion(It will be needed when you use the template to create a new
    project and you want to use the Simple Audil Engine in Cocos Denshio)
    Set the libCocosDenshion project as "Active"
    compile in the debug mode
    compile in the release mode

    5)compile the cocos2d-x tests examples
    Set the tests project as "Active"
    compile in the debug mode
    Then run it
    compile in the debug mode
    Then run it

    6)Test the project template
    Right click the solution
    Add new project
    Choose the cocos2d-win32 Application
    Enter the project name
    The wizard will popup
    Here do not use any phsical engine
    Set it as "active project"
    compile in the debug and release mode then run

    3.Create a cocos2d-x project alone

    1)Close all the solutions and projects
    2)Create a new solution (any where you like)
    3)Fnish the wizard(do not use any phsical engines)
    4)Copy the folder "E:\cocos2d-0.99.4-x-0.7.1\cocos2dx" to the new project's directory "D:\ProjectDemo\cocos2dx"
    5)Copy the following libs in the folder "E:\cocos2d-0.99.4-x-0.7.1\Debug.win32":
    libcocos2d.lib
    libEGL.lib
    libgles_cm.lib
    libxml2.lib
    libzlib.lib
    to "D:\ProjectDemo\ProjectDemo"
    6)Then compile the project it should be OK.
    7)Copy the libs in the "E:\cocos2d-0.99.4-x-0.7.1\Debug.win32":
    libcocos2d.dll
    libEGL.dll
    libgles_cm.dll
    libxml2.dll
    libzlib.dll
    to "D:\ProjectDemo\Debug.win32"
    8)Run && OK ^_^
    9)PS:This project is compiled and run in the debug mode,so we use the libs under the "Debug.win32" folder,
    if you need to run it in the release mode please use the libs under the "Release.win32" folder

    4.Sample project(According to the project in the 3rd chapter of 《Learn iPhone and iPad Cocos2D Game Development》)

    PS:
    1.All the images are contained in the attachment
    2.I used the chinese version of VS2008(sorry) so the the images are in chinese but I think that's no big problem here
    3.The sample project souce dose not contain the cocos2dx foler(it's way too big)

    You can download all the attachments from the post in my site:
    cocos2d-x-Win32 Install&&Deploy Tutorial | SuperSuRaccoon's World
    04-25-2011 03:25 AM
LINK TO POST COPIED TO CLIPBOARD