Code Monkey home page Code Monkey logo

cocossharp's Introduction

CocosSharp

CocosSharp is an easy to use library for simple games using C# and F#. It is a .NET port of the popular Cocos2D engine, derived from the Cocos2D-X engine via Cocos2D-XNA.

This library is MIT licensed.

coverity

Forums

Xamarin is hosting forums for CocosSharp here:

http://forums.xamarin.com/categories/cocossharp

Learn More

To learn more, see the https://github.com/mono/CocosSharp/wiki

License

This project is open source, freely available, and free of royalties or encumberance. The software is released under the highly permissive MIT License.

Git

When you first check out, run

git clone --recursive [email protected]:xamarin/CocosSharp

so you will have all the submodules checked out for you.

With existing checkouts, run

git submodule update --init --recursive

to make sure you get the latest changes in the submodules. Repos that were checked out recursively will do this automatically, but it doesn't hurt to run this manually.

To pull external changes into a submodule

cd <submodule>   
git pull origin <branch>   
cd <top-level>; git add <submodule>   
git commit

To make changes in a submodule

cd <submodule>

  • By default, submodules are detached because they point to a specific commit. Use git-checkout to put yourself back on a branch.

git checkout <branch>

work as normal, the submodule is a normal repo

git commit/push new changes to the repo (submodule)
cd <top-level>; git add <submodule> # this will record the new commits to CocosSharp MonoGame submodule
git commit
  • To switch the repo of a submodule

    edit '.gitmodules' to point to the new location

git submodule sync -- <path of the submodule> # updates .git/config

  • I think this will checkout from the new location, internally. It may take a while for big repos.
git submodule update --recursive
git checkout <desired new hash> # This changes the pointer of the submodule

The desired output diff is a change in .gitmodule to reflect the change in the remote URL, and a change in / where you see the desired change in the commit hash

You now have everything you need to start start developing with CocosSharp

Getting Started

Solutions & Projects - MonoGame

After clone you will need to generate the MonoGame projects.

The solution and project files are generated by Protobuild when you double-click Protobuild.exe on Windows from or run mono Protobuild.exe under Mac OS or Linux.
Note: that the previous needs to be done in the MonoGame directory.

To modify the projects you must edit the .definition file in the Build/Projects/ folder and re-execute Protobuild.

For more information and advanced usage, please refer to the Protobuild wiki.

Test Bed

We have created solutions for all the supported platforms that serves as our TestBed for each platform.

You can find those in the tests directory

CocosSharp.Tests.Android.sln	
CocosSharp.Tests.Windows.sln	
CocosSharp.Tests.Windows8.sln	
CocosSharp.Tests.WindowsDX.sln	
CocosSharp.Tests.WindowsGL.sln	
CocosSharp.Tests.WindowsPhone.sln	
CocosSharp.Tests.WindowsPhone7.sln	
CocosSharp.Tests.iOS.sln
CocosSharp.Tests.MacOS.sln	

Samples

As the saying goes "A picture is worth a thousand words" well sample code can be just as effective.

So to get started we have placed a number of samples here: Samples

Statistics

There is a special case for Xamarin iOS MonoTouch running on the simulator where they aggressively call garbage collection themselves. This should not affect the devices though. On the Simulator the GC label will always be 0 (zero)

History

This project is a fork of the Cocos2D-XNA project, which is a port of the C++-based Cocos2D-X API, which in turn is a cross-platform port of the cocos2d-iphone project.

The focus of this fork is to create a library that is idiomatically correct for C# and remove many of the historical warts inherited from the straight ports from C++ and Objective-C.

cocossharp's People

Contributors

alexsorokoletov avatar atsushieno avatar denis-minchuk avatar doubleday avatar gdwneo avatar gena-m avatar hlywp8 avatar joelmartinez avatar kalitaalexey avatar katiejanekilian avatar kjpou1 avatar migueldeicaza avatar mvdev1 avatar netonjm avatar omd avatar orthographic-pedant avatar oxosi avatar pawelklimczyk avatar picticon avatar rtabbara avatar sergey-mukhamedshin avatar therzok avatar tonisson avatar totallyevil avatar totallyeviljake avatar yongweisun avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.