CocosSharp, as explained in my earlier post is a cross-platform library for building 2D games. CocosSharp is an open source library and is built on top of the MonoGame engine and the fine work from the Cocos2D, Cocos2D-x and Cocos2D-XNA communities.
Today, we will start our CocosSharp beginner series with an introduction on How to set up your machine for getting started with CocosSharp.
First of all, you can either use Xamarin studio or Visual studio as an IDE for your game development. The only difference is Xamarin studio can be installed on Windows and Mac. But visual studio can't be directly installed on a Mac, you need virtualization tools like parallels or VMWare etc. on top of which you should run windows OS.
So, zero on your IDE and install the same.
Using Xamarin Studio
Once you have xamarin studio installed, navigate to Add-in Manager
As it's already installed on my machine, you see a blue check mark on the top with Disable and Uninstall buttons on the right. If you have picked a fresh machine, with Xamarin Studio just installed, Click and install "CocosSharp Project Templates". Once installed successfully, click on the first tab (Installed) and you should see CocosSharp there.
On a machine running windows with Xamarin Studio installed, You will see only Android CocosSharp project types.
- CocosSharp showcase has boilerplate code with all required packages pre-installed to get started.
- CocosSharp empty game is a template to start your game from scratch.
On a Mac
For installing CocosSharp project templates, follow the steps mentioned above. Once installed successfully, specifically within the list of C# solutions you should now have CocosSharp projects for
- iOS/Classic API/iPad or iPhone or Universal
- Mac/Classic API
- Mobile Apps
provided you have all the necessary dependencies.
Using Visual Studio
The templates are being held in a custom Visual Studio Gallery held at Mobile Essentials.
In order to get the custom gallery into your Visual Studio, open Tools | Options and configure the page Environment > Extension Manager as follows, using the gallery url http://gallery.mobileessentials.org/feed.atom:
Once the Mobile Essential gallery is set up, you can go to Visual Studio’s Tools | Extensions and Updates... menu and a new Mobile Essentials node will appear under the Online category, where you can explore and install the tools:
- Click the Download button to install the highlighted extension.
Once the download is complete you will get a verification screen prompting you to install the template package.
Click the Install button:
Once installation is complete you will then see the CocosSharp Templates package marked with a little green arrow showing that it is installed.
This image has been resized to fit in the page. Click to enlarge.
Creating a new project
Now when creating a new project you will see a new section called CocosSharp with subcategories for:
If you have created an empty CocosSharp project, right-click on From Packages | Add packages and then select platform specific CocosSharp Nuget package to get started. After successful installation, your project hierarchy should look like the one showed below. Showcase project template will look like this by default as packages will be pre-installed.
Note: Check for updates before installing/updating latest packages.
Huff!!! hope everything went well with the machine setup for you. If you can't wait for the next chapter in our beginner series, Start exploring and share your experience via twitter @VidyasagarMSC
Game ON !!!!