RobLoach / raylib-umka

Umka language bindings for raylib.
https://robloach.github.io/raylib-umka/
zlib License
6 stars 2 forks source link
raylib umka

raylib-umka Logo

raylib-umka

Umka scripting language bindings for raylib, a simple and easy-to-use library to enjoy videogames programming.

Go to Playground

Example

import "raylib"

fn main() {
    screenWidth := 800
    screenHeight := 450

    raylib.InitWindow(screenWidth, screenHeight, "Hello World!")

    raylib.SetTargetFPS(60)

    for !raylib.WindowShouldClose() {

        raylib.BeginDrawing()

        raylib.ClearBackground(raylib.RAYWHITE)

        raylib.DrawText("Congrats! You created your first raylib-umka window!", 150, 200, 20, raylib.LIGHTGRAY)

        raylib.EndDrawing()
    }
    raylib.CloseWindow()
}
raylib-umka core_basic_window.um

Screenshot of core_basic_window.um

Features

Development

Some information about how to compile the Umka bindings.

API

To integrate the raylib Umka module into your own Umka instance...

#define RAYLIB_UMKA_IMPLEMENTATION
#include "raylib-umka.h"

// ...

umkaAddRaylib(umka);

Generator

The raylib-umka.h file is generated automatically via Node.js:

npm it

Compiling

While raylib-umka uses CMake, it could be used in other build systems.

Desktop

mkdir build
cd build
cmake ..
make
make test
./bin/raylib-umka ../examples/core/core_basic_window.um

Web

mkdir build
cd build
emcmake cmake .. -DPLATFORM=Web -DCMAKE_BUILD_TYPE=Release
emmake make

License

raylib-umka 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.