Cocos2d-x and XBOX One

Cocos2d-x and XBOX One
0.0 0


It was announced during today’s BUILD conference that any XBOX One can become a development device.

So now that that’s the case, what are the chances of getting an open source version of cocos2d-x ported to this thing?


I am very excited with the possibility of run my cocos2dx game in a xbox one.

In “theory” an UWP app should work in any windows 10 device. So a game created with cocos2dx should work in a xbox one. Bu you have to implement the game controller support. There are several solutions in this forum.

The cocos2dx team have a version of their engine running in a xbox one:

Maybe they could share more information about this now.


Are we sure that they allow c++? I remember reading a while back that this might be c# only and if you wanted to use c++ you needed to be approved by ID@XBox program.

I can tell you that it is possible to make a Cocos2d-x app for Xbox One.


@jalfonsosm, @slackmoehrle my original post was poorly worded. I was just hoping that the xbox one dev mode would allow for the xbox one branch to be open sourced.

Unfortunately though, the more I look into this the less I’m sure you can even write games using the new dev mode. It appears to be for people who want to write apps for the platform, and it’s not related to game development at all. I think I got people excited for nothing :frowning:


The new dev mode does appear to be for games as well as apps, although they recommend signing up for ID@Xbox if you want to publish your game on the Xbox or want to use Xbox Live on PC. Also, it does appear to support C++.

Xbox Dev Mode is Here!

If you want to get started experimenting with deploying UWP games and apps to Xbox One, and designing games and apps for a living room experience, we’re excited to announce Xbox One Dev Mode, which enables you to deploy UWP games and apps to your Xbox One! You don’t need help from ID@Xbox to begin experimenting with Dev Mode – just download the Dev Mode Activation app on your Xbox One to get started! Read more here.

If you’d like to enable Xbox Live for your UWP game on PC, or ship a UWP game commercially on Xbox One, you will need to be part of the ID@Xbox program. And of course all developers are welcome and encouraged to join ID@Xbox to get the latest news for independent game developers from Microsoft!

also if you are a C++ developer make sure that you choose Custom install and select C++ too

But I haven’t used it yet, so I can’t personally verify any of this.


I don’t think so, In this link you can read some information about this topic. And summarizing, you can develop c++ games on xbox with some constrains.

But, you need to enroll with ID@Xbox if you want to publish and sell a game on this platform.


You can use c++ w/DirectX 11. I’ve tested a simple “game” out and ran it on my XBox One in dev mode. Note that this type of app (Windows Universal Application/Platform).

I’ve also ran the ANGLE template sample, with one change. Sadly this means using the software renderer, but hopefully the ANGLE team will fix the issue.

I plan to try out the empty cocos2d-x c++ test project this next week.

Edit: you don’t need to be in the ID@XBox program to test out the apps and supposedly you’ll be able to publish to the “windows store” without enrollment either, but if you really want your game on the XBox it would be smart to apply.


Yo @stevetranby – Keep us updated on the progress. Very exciting!

I’m installing Windows 10 + Visual Studio 2015 now. Fingers crossed y’all!


Update 1: I’ve got the basic ANGLE template project building and running on my Xbox using the software renderer. Next step is to plug it into cocos.


Wow, I guess ANGLE is already being used in recent versions of cocos2d-x ?

  1. Setup a new cocos2d v3.10 project
  2. Launched the Win10 VS2015 solution
  3. Changed line 117 in OpenGLES.ccp to use warpDisplayAttributes (Software rendering)
  4. Success!


Yes, in our Windows version, it is. I think starting rather recently. If you have technical questions, perhaps @stammen can help us out. Do you have an XDK or are you using a retail console?


@slackmoehrle Right on! Yea, this is running on a retail console.


@Rusty, nice yeah the Cocos New project is very similar to the ANGLE hello world project in its simplicity, so glad to see you got it working. I’m going to try and get the full test suite working this week, unless you beat me to it, which would also be great! ANGLE has been used since the initial WP8 support as it is used in-place of direct DirectX rendering (which would’ve been better, but required writing a 2nd renderer (there is a D3D project likely no longer updated on the forums somewhere).


And … it works (full cpp-tests). Shouldn’t be surprised, but I figured one of the libraries wouldn’t work for some reason. Only the main menu comes up so I’ll try adding a gamepad input support for the “auto test” button action.

Edit: note that I had to use the Release mode build. Not sure why. Possibly debug version hits an app size limit or something like that.


The AutoTest runs successfully!


  • Release Mode only (Debug has deploy issues)
  • x86 (x64 has a few compile issues)
  • Audio engine’s m_soundEffectSourceVoice field is sometimes NULL causing crash
  • A threading crash in TestController::traverseThreadFunc occured when starting “Begin traverse TestSuite:66:Transitions”

Some test scenes have low frame rate. This may be due to many things and may be an issue related to the auto test sequence. It may be shaders don’t work well with the software renderer (WARP)

Hopefully the ANGLE team or the cocos2d-x community will fix whatever issue is causing ANGLE to not work yet with the GPU renderer.


Wow @stevetranby! That’s great to hear!

Switching build flavors can cause deployment failures. It’s actually a bug with the current Preview release of UWP for Xbox one. So maybe the x64 compile failure is because of that?

I guess the next step is to get a game running? :smiley:


I couldn’t get SimpleAudioEngine to work due to unhandled exceptions. However, experimental::AudioEngine works just fine with ogg, wav, and mp3, but I wouldn’t be surprised if there are some issues with too many concurrent sounds or whatever, so YMMV on everything I’ve mentioned :smiley:

@Rusty nice tip, thanks. I was able to deploy with debug mode a new project HelloWorld after uninstalling it from the console. I was able to build and run the HelloWorld app in Release mode without uninstalling a previous deploy as Debug mode.

The x64 compiler errors are easily fixed, but the pesky linker error of missing 64-bit libogg.lib won’t get an attempted fix until 3.11 … “x64 builds will be after v3.11” - some MSOpenTech github user.

So as with many things in preview, it’s a bit of a waiting game. I will probably stop working on this and wait to retry every 3-4 weeks. It’s just as easy to test on desktop with a gamepad so might as well only worry about the specific-console issues.

DirectX11, 500MB RAM (later 1GB), and 45% CPU/GPU is fine for anything I plan to create this year so as long as the GPU renderer is added I’m not too concerned now about requiring many changes beyond a Win32 build.


Ah, good to know. I’ll forge ahead with an x86 build. Very curious how Astro Duel will run with software rendering. Fingers crossed.


Ok! I was able to get a basic version of Astro Duel running. However I found the performance of the software render unusable. So I think I’ll wait to see if the ANGLE team fixes the GPU rendering for now:


@stammen do you have any thoughts on this issue @rusty created?