Skip to content

Latest commit

 

History

History
102 lines (77 loc) · 4.73 KB

home.md

File metadata and controls

102 lines (77 loc) · 4.73 KB
title description published date tags editor dateCreated
Main Page
Welcome to Chroma Framework!
true
2023-06-05 13:23:25 UTC
markdown
2021-09-03 13:00:31 UTC

This documentation is still under construction. Things will be added, changed or completely removed without any warning! {.is-warning}

Introduction

Ever thought to yourself the following as a C# developer?

Man, I wish I could just download a single library and start writing the game of my dreams without worrying about all the dependencies and stuff...

The wait is over! Chroma is a fast, intuitive and powerful 2D game development framework with focus on quick prototyping and simplicity without sacrificing functionality. Additionally, you can build and run your game on any supported platform using just a single codebase!

Chroma is licensed under the very permissive MIT license, which essentially means that you have a choice of extending the framework and sharing your changes with the public, or keeping these completely to yourself. Same goes for your game's code, of course!

Sounds too good to be true, huh?

I don't believe you

GameCore.cs

using System.Numerics;
using Chroma;
using Chroma.Graphics;

namespace MyGame
{
	public class GameCore : Game
  {
  	public GameCore() 
    	: base(new(false, false))
    {
    }
    
    protected override void Draw(RenderContext context)
    	=> context.DrawString("Hello, world!", new Vector2(16, 16));
  }
}

Program.cs

using System;

namespace MyGame
{
	static class Program
  {
  	static void Main(string[] args)
    	=> new GameCore.Run();
  }
}

That's it. This is the minimum required to get something drawn on screen. Convinced yet?

I still don't believe you

nugeticon.png

Fine. Have the entire list of available examples.

Why would I use Chroma over MonoGame, Love2DCS or any other framework already out there?

Chroma is designed for the new .NET from the ground up. It does not try to act as a replacement for any pre-existing engines or frameworks and instead tries to take small, good parts of each and make them work together while adding some much needed convenience to aid with quick set-up and cut the boilerplate on the game developer's side of things. It is the answer to the author's frustration with the existing .NET game development libraries:

  • MonoGame Too broad for the author's liking. Stays in the box of the "XNA way of doing things". Trivial tasks that should be available out-of-box need external libraries to get done.
  • Love2DCS It's taking something designed for Lua into .NET. Essentially playing a catch-up game every time Love2D makes a change or adds a new feature.
  • Ultraviolet Framework It almost scratched the author's itch, but it was not intuitive enough. There is a trade-off between simplicity and modularity. Ultraviolet takes the latter over the former.

While other libraries certainly have their own strengths and advantages - for example MonoGame and Ultraviolet support mobile platforms, 3D capabilities are a first-class feature, all of them also have their own thriving communities, there is one weakness connecting them all. They are a hassle to set up and maintain.

Supported platforms

Right now Chroma supports Linux, Windows and macOS. 32-bit processors are not supported. Mobile platform support is hesitantly considered, but not being worked on yet. If you need these right now, then it may be better for you to look into one of the frameworks listed above.

Requirements

All Chroma needs is a working .NET 6 (or newer) installation. Once you got that working you can get to the next section.

Acquiring the library

The library is available for download from the NuGet package gallery.

In order to add a package to an existing project, run: dotnet add package Chroma --version 0.57.1

API reference

API reference is generated automatically and is available at https://chroma-2d.github.io.

I found a bug

Wow, paint me surprised! You are most welcome to publish a Github issue!

I want to help

It would be great to have you on board! Fork Chroma, make your changes and - when you are done - submit a pull request. Then we can talk what can be done about it.

If you would like to contribute to this documentation effort, shoot me a message. I certainly could use some help writing and then maintaining all of this.