Raylib-cs 4.0.0

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

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

Raylib-cs Logo

Raylib-cs

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

GitHub contributors License

Chat on Discord GitHub stars

Build

Raylib-cs targets net5.0 and net6.0.

Installation - NuGet

This is the prefered method to get started - The package is still new so please report any issues.

dotnet add package Raylib-cs --version 4.0.0

NuGet

If you need to edit Raylib-cs source then you will need to add the bindings as a project (see below).

Installation - Manual

  1. Download/Clone this repo

  2. Add Raylib-cs/Raylib-cs.csproj to your project as an existing project.

  3. Download the native libraries for the platforms you want to build for using the official 4.0.0 release. NOTE: the MSVC version is required for Windows platforms

  4. (Recommended) Put the native library for each platform under Raylib-cs/runtimes/{platform}/native/ (Optional) If you want to handle the native libraries yourself, make sure they are either in the same directory as the executable and/or can be found in the search path. See https://www.mono-project.com/docs/advanced/pinvoke/ for details.

  5. Start coding!

Hello, World!

using Raylib_cs;

namespace HelloWorld
{
    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();
        }
    }
}

Documentation

Examples for Raylib-cs can be found at Raylib-cs-Examples.

Details about Raylib-cs can be found on the Raylib-cs wiki.

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 raylib directly (in contrast to this binding), please refer to the author's project repo.

License

See LICENSE for details.

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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,470 6/23/2024
6.1.0 456 6/20/2024
6.0.0 9,845 1/20/2024
5.0.0 5,411 11/5/2023
4.5.0.4 4,390 8/13/2023
4.5.0.3 1,613 7/29/2023
4.5.0.2 20,534 7/10/2023
4.5.0.1 2,583 6/4/2023
4.5.0 2,420 4/15/2023
4.2.0.2 2,101 3/5/2023
4.2.0.1 4,735 10/1/2022
4.2.0 938 10/1/2022
4.0.0.2 1,445 9/3/2022
4.0.0.1 5,016 3/1/2022
4.0.0 3,087 2/14/2022
3.7.0.1 4,320 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