BT

CocosSharp: Xamarin Forks Cocos2D-XNA

by Abel Avram on Aug 13, 2014 |

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.

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.

Tell us what you think

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

Email me replies to any of my messages in this thread
Community comments

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

Email me replies to any of my messages in this thread

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

Email me replies to any of my messages in this thread

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT