GithubHelp home page GithubHelp logo

angluca / raylib-ocen Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 246 KB

raylib + raygui game library for ocen language

Home Page: https://github.com/ocen-lang/ocen

C 99.90% Makefile 0.10%
ocen ocen-lang raylib c raygui

raylib-ocen's Introduction

raylib + raygui

https://github.com/raysan5/raylib
https://www.raylib.com/examples.html

  • Install glfw and build-copy raylib 5 include|lib to ./c/include|lib

  • raylib-template or raylib-examples set makefile -I include_path -L lib_path build it

cd raylib-examples

make run
make clean
import oc::raylib::*

const screen_width: i32 = 800
const screen_height: i32 = 450

def main() {
    SetExitKey(KEY_ESCAPE)
    InitWindow(screen_width, screen_height, "base_window")
    defer CloseWindow()
    SetTargetFPS(60)

    //loops --
    let dt: f32 = 0.0
    while(not WindowShouldClose()) {
        //update --
        dt = GetFrameTime()
        let key = GetKeyPressed()
        match key {
            0 => {}
            else => {
                println("Input key: %c", key)
            }
        }

        //draw --
        BeginDrawing()
            ClearBackground(DARKGRAY)

        EndDrawing()
    }
}
  • Use tool parse raylib.h, raymath.h gen ocen code if you want :)
./raylib_parser -i ./include/raylib.h -o raylib.oc -f CODE
./raylib_parser -i ./include/raymath.h -o raymath.oc -t RMAPI -f CODE

raylib-ocen's People

Contributors

angluca avatar

Stargazers

 avatar

Watchers

 avatar

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.