In ourrecent blog post, we spoke about Universal Apps support coming to Cocos2d-x V3. The response of the community was positive and encouraging, but it often came with the same follow up question : “what about support for V2” ?
We recognize that while the maintainers of the Cocos2d-x framework stay busy adding new capabilities to the cutting-edge version of the technology, many game developers have accumulated assets and expertise in older versions (especially V2.X), and they reasonably wish to leverage those investments as much as possible.
So based on your feedback, during our Microsoft Virtual Academy live video session on "Build a Game with Cocos2d-x for Windows Devices Jump Start" ( Microsoft Virtual Academy ) we just announced Windows 8.1 Universal App support for cocos2d-x version 2.2.5. The new Universal App project for Cocos2d-x uses the latest version of ANGLE. It provides about 30% faster frame rates and uses half the memory for textures than the previous version.
With this new version of Cocos2d-x, developers can create projects for 4 different Windows device platforms at the same time!
The Universal App has one solution file (.sln) containing 2 projects:
· Windows 8.1
· Windows Phone 8.1
The other folders will contains the Windows 8.0 projects:
· Windows 8.0
· Windows Phone 8.0
With a Universal App developers can share up to 99% of their code between the different targets.
The following pictures show the same code running on Windows and Windows Phone:
To clone this version:
(This version is not yet merged with the master Cocos2d-x repo, so you need to use the MSOpenTech repo)
git clone https://github.com/MSOpenTech/cocos2d-x.git
git checkout v2-universal
git submodule update --init
Create and Test your Universal App Project:
create_project.py -project RocketMan -package com.foo.rocketman -language cpp
This will create a folder called RocketMan in your cocos2d-x\projects folder. The folder will contain the following cocos2d-x project directories:
The Universal App project is in the proj.win8.1-universal folder. The Windows Phone 8.0 project is in the proj-wp8-xaml folder and the Windows Store 8.0 project is in the proj.winrt folder.
Open RocketMan.sln in cocos2d-x\projects\RocketMan\proj-win8.1-universal\
Add your game project files to the Classes folder in the RocketMan.Shared project
Have fun with the new Universal App version of Cocos2d-x! As always, your feedback is important to us. Please open issues on the repo, or just leave comments on this blog…
Adalberto Foresti - Principal Program Manager Lead
Dale Stammen – Software Engineer
Eric Mittelette – Senior Technical Evangelist
Microsoft Open Technologies, Inc.