Raylib-cs
6.1.1
dotnet add package Raylib-cs --version 6.1.1
NuGet\Install-Package Raylib-cs -Version 6.1.1
<PackageReference Include="Raylib-cs" Version="6.1.1" />
paket add Raylib-cs --version 6.1.1
#r "nuget: Raylib-cs, 6.1.1"
// Install Raylib-cs as a Cake Addin #addin nuget:?package=Raylib-cs&version=6.1.1 // Install Raylib-cs as a Cake Tool #tool nuget:?package=Raylib-cs&version=6.1.1
Raylib-cs
C# bindings for raylib, a simple and easy-to-use library to learn videogames programming (www.raylib.com)
Raylib-cs targets net6.0 and uses the official 5.0 release to build the native libraries.
Installation - NuGet
This is the prefered method to get started.
- Pick a folder in which you would like to start a raylib project. For example "MyRaylibCSProj".
- Then from a terminal (for example a VSCode terminal), whilst in the directory you just created run the following commands. (Please keep in mind .NET should already be installed on your system)
dotnet new console
dotnet add package Raylib-cs
If you need to edit Raylib-cs source then you will need to add the bindings as a project (see below).
If you are new to using NuGet (or you've forgotten) and are trying to run the above command in the command prompt, remember that you need to be inside the intended project directory (not just inside the solution directory) otherwise the command won't work.
Installation - Manual
Download/clone the repo
Add Raylib-cs/Raylib-cs.csproj to your project as an existing project.
Download/build the native libraries for the platforms you want using the official 5.0 release. NOTE: the MSVC version is required for Windows platforms
Setup the native libraries so they are in the same directory as the executable/can be found in the search path.
Start coding!
Hello, World!
using Raylib_cs;
namespace HelloWorld;
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();
}
}
Contributing
If you have any ideas, feel free to open an issue. 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 | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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. |
-
net6.0
- System.Numerics.Vectors (>= 4.5.0)
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 |
|
Basalt.Raylib
Package Description |
|
MooEngine
A basic 2D game engine based on Raylib-cs |
GitHub repositories (6)
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.
|
|
amerkoleci/JoltPhysicsSharp
JoltPhysics C# bindings
|
|
sinshu/meltysynth
A SoundFont MIDI synthesizer for .NET
|
Version | Downloads | Last updated |
---|---|---|
6.1.1 | 8,780 | 6/23/2024 |
6.1.0 | 498 | 6/20/2024 |
6.0.0 | 10,204 | 1/20/2024 |
5.0.0 | 5,549 | 11/5/2023 |
4.5.0.4 | 4,459 | 8/13/2023 |
4.5.0.3 | 1,623 | 7/29/2023 |
4.5.0.2 | 20,714 | 7/10/2023 |
4.5.0.1 | 2,593 | 6/4/2023 |
4.5.0 | 2,456 | 4/15/2023 |
4.2.0.2 | 2,131 | 3/5/2023 |
4.2.0.1 | 4,779 | 10/1/2022 |
4.2.0 | 946 | 10/1/2022 |
4.0.0.2 | 1,456 | 9/3/2022 |
4.0.0.1 | 5,079 | 3/1/2022 |
4.0.0 | 3,107 | 2/14/2022 |
3.7.0.1 | 4,361 | 10/2/2021 |
3.7.0 | 4,963 | 5/23/2021 |
3.5.0 | 4,549 | 1/15/2021 |
3.1.5 | 2,962 | 5/6/2020 |
3.1.4 | 911 | 5/6/2020 |
3.1.3 | 886 | 5/5/2020 |
3.1.2 | 863 | 5/5/2020 |
3.1.1 | 919 | 5/4/2020 |
3.1.0 | 907 | 5/3/2020 |
3.0.2 | 939 | 5/2/2020 |
3.0.1 | 887 | 5/1/2020 |
3.0.0 | 1,146 | 5/1/2020 |