Skip to main content

raylib

Raylib is a simple and fairly low level API for making games.

Starting a new C# project with raylib

dotnet new console
dotnet add package Raylib-cs

Hello world with this super simple API:

Raylib.InitWindow(800, 480, "Hello World");

while (!Raylib.WindowShouldClose())
{
// the game loop
Raylib.BeginDrawing();
Raylib.ClearBackground(Color.White);

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

// note this method will automatically handle managing the framerate
// set the framerate with SetTargetFPS(60) during init
Raylib.EndDrawing();
}

Raylib.CloseWindow();