Cocos2DMono.Samples 2.5.3

dotnet new install Cocos2DMono.Samples::2.5.3
                    
This package contains a .NET Template Package you can call from the shell/command line.

Cocos2D-Mono Project Templates

NuGet

A collection of project templates for quickly getting started with Cocos2D-Mono game development. These templates provide ready-to-use project structures for multiple platforms including Windows, Android, iOS, macOS, Linux, and DesktopGL.

Overview

Cocos2D-Mono is a 2D game framework built on top of MonoGame that provides additional features and functionality for 2D game development. These templates make it easy to get started with new Cocos2D-Mono projects on your platform of choice.

Features

  • Project templates for multiple platforms:
    • Android
    • Windows
    • iOS
    • macOS
    • Linux
    • DesktopGL (cross-platform OpenGL)
  • Core variants of each template that include precompiled content
  • Ready-to-use application structure with common game components
  • Consistent structure across all platforms for easier cross-platform development

Getting Started

Option 1: Install via .NET CLI

The templates are available as a NuGet package that can be installed with the .NET CLI:

dotnet new install Cocos2DMono.Samples

Once installed, you can create a new project using one of the following commands:

# Create a Windows project
dotnet new c2mwindows -n MyGame

# Create an Android project
dotnet new c2mandroid -n MyGame

# Create a DesktopGL project
dotnet new c2mdesktopgl -n MyGame

# Create an iOS project
dotnet new c2mios -n MyGame

# Create a Linux project
dotnet new c2mlinux -n MyGame

# Create a macOS project
dotnet new c2mmacos -n MyGame

For the core variants (with precompiled content):

# Use the core variants by adding 'core' to the template name
dotnet new c2mcorewindows -n MyGame
dotnet new c2mcoreandroid -n MyGame
# etc.

Option 2: Install via Visual Studio Extension

For Visual Studio users, we also provide a Visual Studio extension for easier project creation:

  1. Open Visual Studio
  2. Go to Extensions > Manage Extensions
  3. Search for "Cocos2D-Mono Project Templates"
  4. Click Download and install
  5. Restart Visual Studio

After installation, you can create a new project by:

  1. File > New > Project
  2. Search for "Cocos2D-Mono" in the project template search box
  3. Select the desired platform template
  4. Name your project and click Create

Template Types

Standard Templates

These templates include content files (.spritefont files, images, etc.) that need to be compiled during the build process:

  • c2mwindows - Windows project using DirectX
  • c2mandroid - Android project
  • c2mios - iOS project
  • c2mdesktopgl - Cross-platform desktop project using OpenGL
  • c2mlinux - Linux project
  • c2mmacos - macOS project

Core Templates

These templates include precompiled content (.xnb files) for faster build times and are ready to run immediately:

  • c2mcorewindows - Windows core project
  • c2mcoreandroid - Android core project
  • c2mcoreios - iOS core project
  • c2mcoredesktopgl - Cross-platform desktop core project using OpenGL
  • c2mcorelinux - Linux core project
  • c2mcoremacos - macOS core project

Building From Source

If you want to build the templates from source:

git clone https://github.com/brandmooffin/cocos2d-mono
cd cocos2d-mono-project-templates
dotnet pack ./Cocos2DMono.Samples/Cocos2DMono.Samples.csproj -o "./Nuget Packages"

License

These templates are released under the MIT License. See the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.5.3 132 6/5/2025
2.5.2.2 139 5/20/2025
2.5.2.1 141 5/20/2025

- Removed Ouya specific code
 - Fix .NET 8 target path for Android