GithubHelp home page GithubHelp logo

foreignsasquatch / raylib-hx Goto Github PK

View Code? Open in Web Editor NEW
51.0 3.0 11.0 6.05 MB

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

Home Page: https://raylib.com

License: zlib License

Haxe 99.89% C 0.11%
gamedev haxe bindings raylib cross-platform

raylib-hx's Introduction

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

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

Installation

  • git clone https://github.com/ForeignSasquatch/raylib-hx --recurse-submodules -j8
  • haxelib dev raylib-hx raylib-hx

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

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.