Cocos2d-x Now Supporting Windows Universal Apps

Following up to its earlier work to introduce support for WinRT 8.0, and then Windows Phone in Cocos2d-x, MS Open Tech has worked hard with the community to extend the support of the Cocos2d-x framework to Windows Universal Apps.

The Universal App functionality was just accepted in the Cocos2d-x main repository in the v3 branch, and it is now available for everybody to use. While older project types for Windows Phone 8.0 and WinRT 8.1 remain supported (WinRT 8.0 is only supported up to v2.2), by using the new Universal App template in Visual Studio 2013 developers will now be able to target both Phone and Modern apps in the same solution file. This will greatly simplify their coding efforts, and at the same time expand the reach of their games to multiple customer audiences in the Microsoft Store.

As an added benefit, the latest code integrated in v3 introduces numerous bug fixes and improvements requested by the community. Most notably, significant efforts went into improving performance in the MS Open Tech ANGLE fork that is used in Cocos2d-x. In some scenarios we have seen up to 400% frame rate improvements in our perf tests vs. the existing baseline. This will obviously be very welcome news for game developers who are creating complex scenes, with hundreds or thousands of objects displayed on screen.

To create your Universal app solution, just follow the regular steps outlined in the Cocos2d-x console documentation. At the end of the process, a new project folder will be created with the Universal App solution files.


Universal App folder in Cocos2d-x game template

Open the solution file in Visual Studio 2013 and you will see a typical Universal App solution with separate projects for Windows Phone and Windows.


Solution file as loaded in Visual Studio 2013

The solution builds in one pass. Just select the proper startup project to run your game in the corresponding platform (screenshots from Cocos2d-x test automation are shown below).


Windows Store 8.1 (WinRT)


Windows Phone 8.1

Supporting Windows Universal apps is a significant milestone for MS Open Tech’s investment in Cocos2d-x, but we certainly won’t stop here! We expect to follow up with other exciting news for game developers over the next weeks. In the meantime, a heartfelt thank you to everyone who provided suggestions and bug reports: keep them coming on GitHub! We look forward to helping you publish your next great game on the Windows Store.

Adalberto Foresti

Principal Program Manager Lead

Microsoft Open Technologies, Inc.

8 thoughts on “Cocos2d-x Now Supporting Windows Universal Apps

  1. Is the V2 API going to have this same goodness soon? (working on a port project, where porting from V2 to V3 API would be too costly)

  2. It is quite difficult to understand the process in the linked console documentation. Is there any sample project file for us to download ? I am using cocos2d-x ver 3.3rc0. Thanks.

    • That is good to know. We “” rely completely on timely updates from msopentech for WP8 And Windows8. Five apps running successfully on cocos2d-x on WP8/Windows8 for us. Keep up the good work.

  3. @Eric: you have fair point. We do intend to work with the community to improve the quality of the documentation over the coming weeks/months. In the meantime, try to follow these steps. If you have troubles, please open an issue in the MS Open Tech github repo, and we’ll help you out.

    git clone
    cd cocos2d-x
    git checkout v3.3-stable
    git submodule update –init
    open the cocos2d-win8.1-universal.sln and build
    [restart console]
    from the command line, use the cocos utility and generate a new project

    • @Adalberto I tried the steps outlined above. There doesn’t seem to be a branch v3.3-stable, but I went ahead with v3-stable. I see following error in the final link step:

      – Build started: Project: cpp-tests.Windows, Configuration: Debug Win32 ——
      2> Creating library C:\unix\home\chthakur\MsOpenTech\cocos2d-x\build\Debug\cpp-tests.Windows\cpp-tests.Windows.lib and object C:\unix\home\chthakur\MsOpenTech\cocos2d-x\build\Debug\cpp-tests.Windows\cpp-tests.Windows.exp
      2>LINK : warning LNK4098: defaultlib ‘MSVCRT’ conflicts with use of other libs; use /NODEFAULTLIB:library
      2>libSpine.Windows.lib(spine-cocos2dx.obj) : error LNK2001: unresolved external symbol “public: __cdecl cocos2d::KeyBoardWinRT::~KeyBoardWinRT(void)” (??1KeyBoardWinRT@cocos2d@@Q$AAA@XZ)
      2>pch.obj : error LNK2019: unresolved external symbol “public: __cdecl cocos2d::KeyBoardWinRT::~KeyBoardWinRT(void)” (??1KeyBoardWinRT@cocos2d@@Q$AAA@XZ) referenced in function “public: virtual void __cdecl cocos2d::KeyBoardWinRT::[Platform::IDisposable]::(void)” (?@?QIDisposable@Platform@@KeyBoardWinRT@cocos2d@@U$AAAXXZ)
      2>libSpine.Windows.lib(SkeletonRenderer.obj) : error LNK2001: unresolved external symbol “public: __cdecl cocos2d::KeyBoardWinRT::~KeyBoardWinRT(void)” (??1KeyBoardWinRT@cocos2d@@Q$AAA@XZ)
      2>libSpine.Windows.lib(SkeletonAnimation.obj) : error LNK2001: unresolved external symbol “public: __cdecl cocos2d::KeyBoardWinRT::~KeyBoardWinRT(void)” (??1KeyBoardWinRT@cocos2d@@Q$AAA@XZ)
      2>libSpine.Windows.lib(PolygonBatch.obj) : error LNK2001: unresolved external symbol “public: __cdecl cocos2d::KeyBoardWinRT::~KeyBoardWinRT(void)” (??1KeyBoardWinRT@cocos2d@@Q$AAA@XZ)
      2>C:\unix\home\chthakur\MsOpenTech\cocos2d-x\build\Debug\cpp-tests.Windows\cpp-tests.Windows.exe : fatal error LNK1120: 1 unresolved externals

      Any idea what could be causing that ?