Raylib-cs 3.0.1

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

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

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 (24)

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

rlImgui-cs

Bindings to use ImGui.net with raylib-cs

MooEngine

A basic 2D game engine based on Raylib-cs

Basalt.Raylib

Package Description

GitHub repositories (5)

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

Repository Stars
SebLague/Chess-Challenge
Create your own tiny chess bot!
DaveGreen-Games/ShapeEngine
My custom made engine based on the great Raylib Framework. Main focus is being performant and only using draw functions instead of textures.
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
andreakarasho/TinyEcs
A tiny bevy-like archetype-style ECS library for dotnet
Version Downloads Last updated
6.1.1 6,615 6/23/2024
6.1.0 456 6/20/2024
6.0.0 9,909 1/20/2024
5.0.0 5,425 11/5/2023
4.5.0.4 4,395 8/13/2023
4.5.0.3 1,613 7/29/2023
4.5.0.2 20,548 7/10/2023
4.5.0.1 2,583 6/4/2023
4.5.0 2,422 4/15/2023
4.2.0.2 2,104 3/5/2023
4.2.0.1 4,737 10/1/2022
4.2.0 938 10/1/2022
4.0.0.2 1,445 9/3/2022
4.0.0.1 5,020 3/1/2022
4.0.0 3,087 2/14/2022
3.7.0.1 4,322 10/2/2021
3.7.0 4,929 5/23/2021
3.5.0 4,514 1/15/2021
3.1.5 2,948 5/6/2020
3.1.4 905 5/6/2020
3.1.3 880 5/5/2020
3.1.2 857 5/5/2020
3.1.1 913 5/4/2020
3.1.0 901 5/3/2020
3.0.2 933 5/2/2020
3.0.1 881 5/1/2020
3.0.0 1,126 5/1/2020