Raylib-cs 3.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Raylib-cs --version 3.0.0
NuGet\Install-Package Raylib-cs -Version 3.0.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="Raylib-cs" Version="3.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Raylib-cs --version 3.0.0
#r "nuget: Raylib-cs, 3.0.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.
// Install Raylib-cs as a Cake Addin
#addin nuget:?package=Raylib-cs&version=3.0.0

// Install Raylib-cs as a Cake Tool
#tool nuget:?package=Raylib-cs&version=3.0.0

Raylib-cs Logo

Raylib-cs

C# bindings for raylib 3.0, a simple and easy-to-use library to learn videogames programming (www.raylib.com)

GitHub contributors

License Chat on Discord GitHub stars

.NET Core

Installation

  1. Add Raylib-cs to your project. See the Tests projects for reference.

  2. Download the native libraries using the official 3.0 release.

  3. Make sure the native library matches the platform you are using and can be found in the search path. See https://www.mono-project.com/docs/advanced/pinvoke/ for details.

  4. Start coding!

using Raylib_cs;

static class Program
{
    public static void Main()
    {
        Raylib.InitWindow(800, 480, "Hello World");

        while (!Raylib.WindowShouldClose())
        {
            Raylib.BeginDrawing();
            Raylib.ClearBackground(Color.WHITE);

            Raylib.DrawText("Hello, world!", 12, 12, 20, Color.BLACK);

            Raylib.EndDrawing();
        }

        Raylib.CloseWindow();
    }
}

Physac-cs and Raygui-cs

These are unfinished EXPERIMENTAL bindings to physac and raygui. They were initially added as a test to Raylib-cs but caused confusion and issues in project setup so they were moved into their own libraries Physac-cs and Raygui-cs that depend on Raylib-cs.

Examples

The Examples for Raylib-cs have moved and can be found at Raylib-cs-Examples.

Tech notes

  • Certain functions take a enum instead of a int such as IsKeyPressed.

  • Colours moved into the Color struct as static members. RED changes to Color.RED.

  • Uses string.Format instead of TextFormat.

  • Adds constructors for some of the structs(WIP).

  • Adds operator overloads for math structs.

Contributing

If you have any ideas, feel free to open an issue and tell me what you think. If you'd like to contribute, please fork the repository and make changes as you'd like. Pull requests are warmly welcome.

If you want to request features or report bugs related to the library (in contrast to this binding), please refer to the author's project repo.

License

raylib-cs (and raylib) is licensed under an unmodified zlib/libpng license, which is an OSI-certified, BSD-like license that allows static linking with closed source software. Check LICENSE for further details.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 is compatible. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 3.1

    • No dependencies.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages (22)

Showing the top 5 NuGet packages that depend on Raylib-cs:

Package Downloads
SharpEngine

Little 2D game engine built on RayLib

SharpEngine.Core

Core Package of SharpEngine - 2D Game Engine

MooEngine

A basic 2D game engine based on Raylib-cs

rlImgui-cs

Bindings to use ImGui.net with raylib-cs

Sparkle

A fast, Cross-platform .NET 8 C# 12 game engine.

GitHub repositories (3)

Showing the top 3 popular GitHub repositories that depend on Raylib-cs:

Repository Stars
SebLague/Chess-Challenge
Create your own tiny chess bot!
notgiven688/jitterphysics2
Fast, simple, and dependency-free physics engine written in C# with a clear and user-friendly API.
sinshu/meltysynth
A SoundFont MIDI synthesizer for .NET
Version Downloads Last updated
6.0.0 4,846 1/20/2024
5.0.0 4,508 11/5/2023
4.5.0.4 4,066 8/13/2023
4.5.0.3 1,536 7/29/2023
4.5.0.2 19,665 7/10/2023
4.5.0.1 2,459 6/4/2023
4.5.0 2,298 4/15/2023
4.2.0.2 1,968 3/5/2023
4.2.0.1 4,498 10/1/2022
4.2.0 886 10/1/2022
4.0.0.2 1,379 9/3/2022
4.0.0.1 4,836 3/1/2022
4.0.0 3,003 2/14/2022
3.7.0.1 4,138 10/2/2021
3.7.0 4,779 5/23/2021
3.5.0 4,094 1/15/2021
3.1.5 2,817 5/6/2020
3.1.4 875 5/6/2020
3.1.3 850 5/5/2020
3.1.2 824 5/5/2020
3.1.1 899 5/4/2020
3.1.0 870 5/3/2020
3.0.2 899 5/2/2020
3.0.1 848 5/1/2020
3.0.0 1,040 5/1/2020