Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/robloach/raylib-umka
Umka language bindings for raylib.
https://github.com/robloach/raylib-umka
raylib umka
Last synced: 17 days ago
JSON representation
Umka language bindings for raylib.
- Host: GitHub
- URL: https://github.com/robloach/raylib-umka
- Owner: RobLoach
- License: zlib
- Created: 2022-10-08T07:43:35.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-03-18T19:41:46.000Z (almost 2 years ago)
- Last Synced: 2023-04-09T06:57:33.047Z (over 1 year ago)
- Topics: raylib, umka
- Language: C
- Homepage: https://robloach.github.io/raylib-umka/
- Size: 3.17 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![raylib-umka Logo](examples/textures/resources/raylib_logo.png)](https://robloach.github.io/raylib-umka/)
# raylib-umka
[Umka](https://github.com/vtereshkov/umka-lang) scripting language bindings for [raylib](https://github.com/raysan5/raylib), a simple and easy-to-use library to enjoy videogames programming.
> [Go to Playground](https://robloach.github.io/raylib-umka/)
## Example
``` umka
import "raylib"fn main() {
screenWidth := 800
screenHeight := 450raylib.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()
}
`````` bash
raylib-umka core_basic_window.um
```[![Screenshot of core_basic_window.um](examples/core/core_basic_window.png)](examples/core/core_basic_window.um)
## Features
- [x] raylib
- [x] raymath
- [ ] raygui
- [ ] reasings
- [x] rlgl## Development
Some information about how to compile the Umka bindings.
### API
To integrate the raylib Umka module into your own Umka instance...
``` c
#define RAYLIB_UMKA_IMPLEMENTATION
#include "raylib-umka.h"// ...
umkaAddRaylib(umka);
```### Generator
The [raylib-umka.h](include/raylib-umka.h) file is generated automatically via [Node.js](https://nodejs.org):
``` bash
npm it
```### Compiling
While raylib-umka uses CMake, it could be used in other build systems.
#### Desktop
``` bash
mkdir build
cd build
cmake ..
make
make test
./bin/raylib-umka ../examples/core/core_basic_window.um
```#### Web
``` bash
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](LICENSE) for further details.