raylib 0.2.0+1 raylib: ^0.2.0+1 copied to clipboard
raylib is a simple and easy-to-use library to enjoy videogames programming.
Raylib #
Dart bindings for raylib, a simple and easy-to-use library to enjoy videogames programming.
Note: This package was written for raylib
version 4.x and higher, older versions are not supported.
Currently this library does not support the following platforms:
- iOS,
raylib
is built on top of OpenGL and that isn't supported on iOS. - macOS,
raylib
creates windows natively but on macOS that is only possible if you do it from the main thread but sadly the Dart VM is not the main thread. For more information check this issue and this one.
Usage #
Add raylib
as a dependency to your pubspec.yaml file (what?).
Importing raylib
:
import 'package:raylib/raylib.dart';
You need to tell the package where it can find your raylib library:
initLibrary(
linux: '../include/libraylib.so',
windows: '../somewhere/else',
);
See the example directory for examples.
Development #
Linux #
You need to have both make
and git
installed:
sudo apt install build-essential git
After that you can check out the submodules:
git submodule update --init --recursive
With the submodules downloaded you can start compiling raylib
:
cd vendor/raylib/src
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED
Then copy the compiled library to the example folder:
cp ../libraylib.so.4.0.0 ../../../example/include/libraylib.so