Raylib-cs
3.1.8-pre2
See the version list below for details.
dotnet add package Raylib-cs --version 3.1.8-pre2
NuGet\Install-Package Raylib-cs -Version 3.1.8-pre2
<PackageReference Include="Raylib-cs" Version="3.1.8-pre2" />
paket add Raylib-cs --version 3.1.8-pre2
#r "nuget: Raylib-cs, 3.1.8-pre2"
// Install Raylib-cs as a Cake Addin
#addin nuget:?package=Raylib-cs&version=3.1.8-pre2&prerelease
// Install Raylib-cs as a Cake Tool
#tool nuget:?package=Raylib-cs&version=3.1.8-pre2&prerelease
Raylib-cs
C# bindings for raylib 3.0, a simple and easy-to-use library to learn videogames programming (www.raylib.com)
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
Currently supported are netstandard2.0 (which should include Framework 4.7.2+) and netcore3.1
If you need to edit Raylib-cs source then you will need to add the bindings as a project (see below).
Installation - Manual
Download/Clone this repo
Add Raylib-cs/Raylib-cs.csproj to your project as an exisitng project. See the Tests projects for reference.
Download the native libraries for the platforms you want to build for using the official 3.0 release.
NOTE: the MSVC version is required for Windows platforms(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.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 toColor.RED
.Uses
string.Format
instead ofTextFormat
.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 | Versions 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 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.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. |
-
.NETStandard 2.0
- Microsoft.NETCore.Platforms (>= 3.1.1)
- System.Numerics.Vectors (>= 4.5.0)
-
.NETStandard 2.1
- Microsoft.NETCore.Platforms (>= 3.1.1)
- System.Numerics.Vectors (>= 4.5.0)
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 | 5,363 | 1/20/2024 |
5.0.0 | 4,547 | 11/5/2023 |
4.5.0.4 | 4,076 | 8/13/2023 |
4.5.0.3 | 1,543 | 7/29/2023 |
4.5.0.2 | 19,714 | 7/10/2023 |
4.5.0.1 | 2,461 | 6/4/2023 |
4.5.0 | 2,304 | 4/15/2023 |
4.2.0.2 | 1,974 | 3/5/2023 |
4.2.0.1 | 4,503 | 10/1/2022 |
4.2.0 | 886 | 10/1/2022 |
4.0.0.2 | 1,379 | 9/3/2022 |
4.0.0.1 | 4,839 | 3/1/2022 |
4.0.0 | 3,005 | 2/14/2022 |
3.7.0.1 | 4,138 | 10/2/2021 |
3.7.0 | 4,779 | 5/23/2021 |
3.5.0 | 4,101 | 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 |