CocosSharp is a C# implementation of the Cocos2D and Cocos3D APIs that runs on any platform where MonoGame runs.
Перейти к файлу
Bill Holmes dd6637933c
Merge pull request #429 from terrajobst/code-of-conduct
Link Code of Conduct
2020-04-15 11:43:25 -04:00
CocosSharp.Content.Pipeline.Importers Update Pipeline Importers project to 4.5 so it will compile against WindowsDX 2015-10-08 15:37:23 +02:00
CocosSharp.Forms Update to version 1.7.1.0 2016-01-09 18:55:05 +11:00
Extensions Forms: Tests.WP8.1: Link up to use CCGameView 2015-09-19 17:26:10 +10:00
MonoGame@2953aff22b Update MonoGame forms_support branch 2015-11-28 08:42:06 +01:00
PCL Update to version 1.7.1.0 2016-01-09 18:55:05 +11:00
ProjectTemplates update template for xs6 2016-08-05 21:14:48 +10:00
ReleaseNotes Add v1.7.1.0 release notes 2016-01-09 19:13:12 +11:00
TestWin8Phone Merge branch 'master' of https://github.com/mono/CocosSharp into textfield 2015-08-07 10:04:22 +02:00
box2d [project.json] Fix VS2015 compile problems. The issue is that even when compiling non Windows Universal projects NuGet still tries to installs the .net Core 4.5 references from the project.json. This gives the following error: Microsoft.NuGet.targets(89,5): error : Couldn't find the required information in the lock file. Make sure you have .NETCore,Version=v4.5.1 mentioned in your targets. 2015-10-25 05:44:54 +01:00
docs Update CCNode documentation 2014-08-20 17:09:54 +02:00
src Update CCPhysicsBody.cs 2016-11-21 02:15:32 +01:00
testWin8Store Merge branch 'master' of https://github.com/mono/CocosSharp into textfield 2015-08-07 10:04:22 +02:00
testWin81Store Add Windows8.1 XAML implementation as well as test solution tests/CocosSharp.Tests.WindowsRT81.sln 2015-10-08 14:15:26 +02:00
tests Close #288 Audio engine: Add ability to check if effects are playing 2015-12-19 20:48:18 +11:00
tools Updating release version script to incorporate forms targets 2015-10-10 15:29:19 +11:00
.gitattributes initial commit 2012-10-26 16:54:50 -07:00
.gitignore Add /CocosSharp.Forms/packages to .gitignore to make sure the packages are not uploaded to git repo. 2015-10-28 06:43:42 +01:00
.gitmodules Add submodule ChipmunkSharp 2014-08-09 12:11:51 +02:00
CODE-OF-CONDUCT.md Link Code of Conduct 2020-04-07 19:28:31 -07:00
CocosSharp.Android.sln Fix for Android Linking 2015-07-08 07:35:08 +02:00
CocosSharp.MacOS.sln Make sure we only reference CS objects and wrap others for the PCL interface. 2014-08-10 18:17:54 +02:00
CocosSharp.Windows.sln Fix Build Script - Remove content build project from CocosSharp.Windows.sln 2015-01-16 06:57:35 +01:00
CocosSharp.Windows8.sln Fix windows 8 build process. 2014-08-29 17:02:55 +02:00
CocosSharp.Windows81.sln Add Windows8.1 XAML implementation as well as test solution tests/CocosSharp.Tests.WindowsRT81.sln 2015-10-08 14:15:26 +02:00
CocosSharp.WindowsDX.sln Include CCNodeGrid in Windows projects. 2015-02-25 07:31:43 +01:00
CocosSharp.WindowsGL.sln Fix references for WindowsGL projects - Need to reference Lidgren.xxx.WindowsGL project and not Lidgren.xxx.Windows. 2015-01-22 14:41:27 +01:00
CocosSharp.WindowsPhone.sln Make WP8 compile again due to regressions in the API 2014-07-30 12:16:12 +02:00
CocosSharp.WindowsPhone81.sln Modify WindowsPhone81 to compile with Any CPU which matches MG project. 2015-07-31 11:01:29 +02:00
CocosSharp.WindowsUWP.sln Rename Windows Universal projects to use UWP nomenclature which follows Microsoft naming instead of UAP which MG chose. 2015-10-15 14:58:27 +02:00
CocosSharp.iOS.sln Project updates from Windows - iOS Unified API 2015-01-14 08:56:58 +01:00
CocosSharp.sln Rename cocos2d.Content.Pipeline.Importers to CocosSharp.Content.Pipeline.Importers. 2014-11-24 07:30:58 +01:00
CocosSharpAPI.cs Add support to allow modifying of the LineHeight of the label SystemFonts are not supported. 2015-03-31 14:53:11 +02:00
Contributing.md Update 2014-01-21 22:01:22 -05:00
LicenseAndCredit.txt Update 2014-01-21 22:01:22 -05:00
MonoGame.build Add CocosSharp Windows 8.1 project definition. 2015-08-19 12:02:45 +02:00
README.md Update README to link to website 2016-07-18 00:43:07 +10:00
default.build Fix XS templates build. Still referencing CocosSharp.PCL.Shared.*.nupkg 2015-11-09 05:30:50 +01:00

README.md

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

Website

We have a dedicated website at http://mono.github.io/CocosSharp. In particular, check out the contribute section for how to be part of the CococsSharp community.

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 git@github.com: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.