Code Monkey home page Code Monkey logo

raylib-dart's Introduction

Raylib-Dart

Dart bindings for raylib 4.0.0, a simple and easy-to-use library to learn videogames programming www.raylib.com

Note

  • This project is still work in progress and a lot of APIs from raylib are not yet exposed correctly

  • Right now it only supports Windows and Linux (in theory Mac should also work perfectly fine).

  • This package uses a custom fork of raylib added as submodule under vendors. So stock raylib binaries might not work.

  • Some APIs from raylib are not exposed because I feel that dart already has native libraries to handle such things. For example:

    • Logging
    • File management (expect dropped file APIs)
    • MemAlloc and MemFree
  • For a full list exposed APIs, check the Cheatsheet

Usage

A simple usage example:

import 'package:raylib_dart/raylib_dart.dart';

int main() {
  // Might be a different path depending on your platform.
  final raylibPath = path.join(
    Directory.current.path, 'vendors/raylib/build/raylib/Release/raylib.dll');

  final raylib = Raylib(raylibPath);
  final core = raylib.core;

  core.initWindow(1280, 720, 'Hello Raylib!');
  core.targetFPS = 60;

  while (!core.shouldWindowClose) {
    core.beginDrawing();
    core.clearBackground(core.colors.black);
    core.endDrawing();
  }

  core.closeWindow();
}

Todo

  • Add idiomatic wrappers for all the auto-generated dart bindings.

  • (In progress) Add APIs to create native raylib structs (like Vector2, Color, Vector3) from dart. See structs example from dart ffi.

  • Figure out best way to distribute platform specific raylib binaries with this package. See sqflite for reference.

  • Get all the examples from raylib working with this package.

  • Add build instructions for the forked version of raylib.

  • Add instructions for development and contribution to this project.

For discussions

raylib-dart's People

Contributors

ufrshubham avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

nemesisx1

raylib-dart's Issues

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.