[go: up one dir, main page]

hxRaylib

Haxe bindings for raylib, a simple and easy-to-use library to learn videogame programming
https://github.com/ForeignSasquatch/hxRaylib

To install, run:

haxelib install hxRaylib 4.0.0 

See using Haxelib in Haxelib documentation for more information.

README.md

Raylib Logo

Haxe bindings for raylib, a simple and easy-to-use library to learn videogame programming. If you want to work on the binding feel free to fork and make a pull request.

Requirements

  • Haxe 4.0.0 or above
  • (Windows only) MSVC v142 - VS 2019 C++ x64/x86 build tools
  • (Windows only) Windows 10 SDK

Installation

To install hxRaylib just run haxelib install hxRaylib.

Usage

In your project make a Build.hxml file with the following:

-cp src
-cpp bin
-lib hxRaylib
-main Main
# Uncomment for the platform
#-D mac
#-D windows
#-D linux

Put a Main.hx file in the src/ directory with your Main class such as the example below.

Example

This is a basic example of the binding which creates a window

import Raylib.*;
import Raylib.Colors.*;

class Main
{
    static function main()
    {
        InitWindow(800, 450, "hxRaylib");

        while (!WindowShouldClose())
        {
            BeginDrawing();
                ClearBackground(RAYWHITE);
                DrawText("Congrats! You created your first window using hxRaylib!", 100, 100, 20, BLACK);
            EndDrawing();
        }

        CloseWindow();
    }
}

License

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

Thanks to:

Contributors
logo4poop
ForeignSasquatch
Version
4.0.0
Published
4 years ago
Dependencies
License
MIT

All libraries are free

Every month, more than a thousand developers use Haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on GitHub!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on GitHub