Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News CocosSharp: Xamarin Forks Cocos2D-XNA

CocosSharp: Xamarin Forks Cocos2D-XNA

This item in japanese


Xamarin has forked Cocos2D-XNA, a 2D/3D game development framework, creating a cross-platform library that can be included in PCL projects.

Xamarin has decided to stop contributing to Cocos2D-XNA, forking instead the framework and creating a new library called CocosSharp which is open sourced on GitHub under a MIT license. For the beginning, Xamarin has refactored the source code in order to create “an idiomatic version of Cocos2D for the .NET environment.” Changes include:

  • Removing idioms and practices inherited from Objective-C and C++
  • The Director object is no longer a singleton
  • Actions are now immutable recipes describing intents
  • The surface of the API has been reduced
  • The API can be consumed by PCL projects
  • Non-core functionality has been separated into extension modules
  • The hierarchy has been sanitized to support multiple views, windows and displays in the future
  • An event dispatcher delivers events in the order of the scene graph hierarchy using a node’s local and global z-order

Miguel de Icaza told InfoQ that in the future Xamarin wants to enhance CocosSharp with:

  • Physics/joints support with Chipmunk (partial work is already included, but not enabled by default)
  • Integrate our System.Drawing for graphics and text rendering inside actors.
  • Integrate Rami's work for simple 3D (this will never be a full 3D engine, but will have some 3D elements)
  • Integrate with Xamarin.Forms, to spice up your business app :-)
  • On platforms that support it, support video rendering into textures (usually camera captures, or video playback)

Xamarin provides a number of NuGet packages for multiple platforms including iOS, Android, Windows Phone, Windows, PCL, Mac OS. This enables game development for all major mobile and desktop platforms in Visual Studio or Xamarin Studio. A number of sample applications are available on GitHub.

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p