foreignsasquatch / raylib-hx

Haxe bindings for raylib, a simple and easy-to-use library to learn videogame programming
https://raylib.com
zlib License
55 stars 13 forks source link
bindings cross-platform gamedev haxe raylib

raylib-hx Logo

raylib-hx

Stars License Forks

Haxe bindings for raylib, a simple and easy-to-use library to learn videogame programming.

Check out the examples folder to see some code!

Requirements

Installation

Usage

This is a basic example of the bindings which creates a window. In your project make a Build.hxml file with the following:

-cp [source folder]
-cpp [output folder]
-lib raylib-hx
-main [Main file]

Sample code:

class Main {
  static function main() {
    Raylib.initWindow(1280, 720, "Hello World!");

    while(!Rl.windowShouldClose()) {
      Raylib.beginDrawing();
      Raylib.clearBackground(Rl.Colors.WHITE);
      Raylib.endDrawing();
    }

    Raylib.closeWindow();
  }
}

For an example running on android, check out this repo!

On Linux it's possible to use a system wide installation of Raylib instead of the source code provided with this repo.

Just add the --define shared_libs flag to your *.hxml file or to the command line.

Tip: To hide the Raylib console window on desktop, add the no_console compiler flag.

Consider supporting

ko-fi