CoreEssentials-MonoGame 0.19.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package CoreEssentials-MonoGame --version 0.19.0
                    
NuGet\Install-Package CoreEssentials-MonoGame -Version 0.19.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CoreEssentials-MonoGame" Version="0.19.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CoreEssentials-MonoGame" Version="0.19.0" />
                    
Directory.Packages.props
<PackageReference Include="CoreEssentials-MonoGame" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CoreEssentials-MonoGame --version 0.19.0
                    
#r "nuget: CoreEssentials-MonoGame, 0.19.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CoreEssentials-MonoGame@0.19.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CoreEssentials-MonoGame&version=0.19.0
                    
Install as a Cake Addin
#tool nuget:?package=CoreEssentials-MonoGame&version=0.19.0
                    
Install as a Cake Tool

CoreEssentials-MonoGame

NuGet Build Status License

A comprehensive framework built on top of MonoGame that provides essential building blocks for game development. CoreEssentials-MonoGame accelerates game development by offering ready-to-use systems for common game development challenges.

Features

  • 🎮 Scene Management: Easily create, transition between, and manage game scenes
  • 👾 Entity System: Object-oriented approach to game entity management
  • 🔄 Coroutine System: Simplify asynchronous operations with Unity-like coroutines
  • 🎯 Input Handling: Event-driven input system for keyboard, mouse, and gamepad
  • 🎵 Audio Management: Flexible audio playback with XML-defined sound properties
  • 🛠️ Debugging Tools: In-game console, logging, and visual debugging aids
  • 🧩 Game System Architecture: Modular, extensible game systems
  • 💪 Physics Integration: Built-in physics using Aether.Physics2D
  • 🖼️ GUI System: Clean, engine-agnostic UI abstraction layer with factories and interfaces
  • 🎨 Asset Management: Simplified asset loading, caching and management
  • 📚 IntelliSense Support: Full XML documentation for improved developer experience
  • 📷 Orthographic Camera: Flexible camera system with zoom, pan and coordinate transformation

Getting Started

Installation

CoreEssentials-MonoGame is available as a NuGet package:

# Via Package Manager Console
Install-Package CoreEssentials-MonoGame

# Via CLI
dotnet add package CoreEssentials-MonoGame

Basic Usage

Here's a simple example to get you started:

using CoreEssentials;
using Microsoft.Xna.Framework;

namespace YourGame
{
    public class Game1 : MainGame
    {
        public Game1() : base() 
        { 
            // Configure game properties
            Window.Title = "My Game";
        }

        protected override void Initialize()
        {
            base.Initialize();
            
            // Load your initial scene
            SceneManager.LoadScene(new MainMenuScene());
        }
    }
}

Documentation

Comprehensive documentation is available in the docs folder:

Playground Examples

The repository includes a CoreEssentials.Playground project with example scenes that demonstrate various features:

  • Character Scene: Demonstrates sprite animation, character entities, and audio management
  • Physics Entity Scene: Shows physics simulation with multiple dynamic bodies
  • GUI Examples: Includes Canvas usage for creating UI layouts and interactive elements
  • Camera Scene: Shows orthographic camera functionality with zoom, pan, and entity tracking

To run the examples:

# Clone the repository
git clone https://github.com/LeoTheLegion/core-essentials-monogame.git

# Navigate to the repository
cd core-essentials-monogame

# Build and run the playground
dotnet build
dotnet run --project CoreEssentials.Playground

Code Examples

Creating a UI with Canvas

using CoreEssentials.GUI;
using CoreEssentials.GUI.Factory;

// Create a screen-space canvas for HUD elements
ICanvas hudCanvas = CanvasFactory.CreateScreenSpace();
hudCanvas.SetPosition(new Vector2(20f, 20f));

// Add widgets using the factory (returns interface types)
ILabel healthLabel = WidgetFactory.CreateLabel("Health: 100");
hudCanvas.AddChild(healthLabel);

IButton inventoryButton = WidgetFactory.CreateTextButton("Inventory");
inventoryButton.Clicked += (btn) => { /* navigate to inventory */ };
hudCanvas.AddChild(inventoryButton);

// Update canvas each frame for camera transforms
hudCanvas.Update(gameTime);

// Clean up when done
hudCanvas.CleanUp();

Building from Source

# Clone the repository
git clone https://github.com/LeoTheLegion/core-essentials-monogame.git

# Build the solution
dotnet build

# Run tests
bash ./scripts/test.sh

# Publish the NuGet package
bash ./scripts/publish.sh

Contributing

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

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • MonoGame - The base framework that makes this all possible
  • Aether.Physics2D - The physics engine integrated into CoreEssentials
  • Myra - The UI library used for the GUI system
  • MonoGame.Extended - For additional MonoGame extensions

Contact

Michael Mena - @LeoTheLegion

Project Link: https://github.com/LeoTheLegion/core-essentials-monogame

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
0.22.0 95 10/4/2026
0.21.3 115 10/4/2026
0.21.2 83 10/4/2026
0.21.1 87 10/4/2026
0.21.0 84 10/4/2026
0.20.1 84 10/4/2026
0.20.0 87 10/4/2026
0.19.1 84 10/4/2026
0.19.0 85 10/4/2026
0.18.0 83 10/4/2026
0.17.0 83 10/4/2026
0.16.0 82 10/4/2026
0.15.0 82 10/4/2026
0.14.0 84 10/4/2026
0.13.2 81 10/4/2026
0.13.1 80 10/4/2026
0.13.0 85 10/4/2026