Coder Social home page Coder Social logo

njlr / raylib-cs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chrisdill/raylib-cs

0.0 0.0 0.0 71.56 MB

C# bindings for raylib, a simple and easy-to-use library to learn videogames programming

Home Page: http://www.raylib.com/

License: zlib License

C# 100.00%

raylib-cs's Introduction

Raylib-cs Logo

Raylib-cs

C# bindings for raylib, 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 and uses the official 4.5.0 release to build the native libraries.

Installation - NuGet

This is the prefered method to get started.

  1. Pick a folder in which you would like to start a raylib project for example "MyRaylibCSProj"
  2. Then from a terminal (for example a VSCode terminal), whilst in the folder dir you just created run the following commands. (Please keep in mind you should have .NET already installed on your system)
dotnet new console
dotnet add package Raylib-cs

NuGet

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

  1. Download/clone the 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.5.0 release. NOTE: the MSVC version is required for Windows platforms

  4. Setup the native libraries so they are in the same directory as the executable/can be found in the search path.

  5. 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 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.

raylib-cs's People

Contributors

chrisdill avatar 9parsonsb avatar msmshazan avatar mrscauthd avatar anggape avatar jupiterrider avatar nickymcdonald avatar fallbork avatar wraithglade avatar benbeshara avatar graphnode avatar germanhoyos avatar jarroddoyle avatar lazaroblanc avatar spec-chum avatar tylerdm avatar metlhedd avatar yxure avatar nailuj29 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.