Codesnippets > Inline / 3rd party

Raylib for GLBasic! (hosted on Github)

(1/5) > >>


i start a new Project, and it works nice so far! :)


This ( is a wrapper from this:
Instructions on Github. Feel free to help on this!
I also need maybe a better way to handle the Structs (Font, Image, Texture, Vector4, Vector3...) in GLBasic...
Any suggestions are welcome :)

Congratulations Schranz0r very very very interesting project.
I will try it to understand the potential that seems high.
One question: What about multi-platform? think of Android and others
Thank you so much

It's Cross platform, so it should be fine on Android.  :good:

So i changed the way to handle things!
The Types from GLBasic are now the same as the Structs from Raylib.
All functions and Types related to Raylib starting with the prefix "RL_"

Sample Code:

--- Code: (glbasic) ---LOCAL Title$ = "Raylib for GLBasic!"

RL_InitWindow(800,600, Title$)

LOCAL col_lightgray AS RL_Color
col_lightgray.Set(200, 200, 200, 255)

LOCAL col_raywhite AS RL_Color
col_raywhite.Set(245, 245, 245, 255)

LOCAL col_red AS RL_Color
col_red.Set(255, 0, 0,255)

LOCAL fnt_default AS RL_Font
fnt_default = RL_GetFontDefault()

LOCAL fnt_PermMarker AS RL_Font
fnt_PermMarker = RL_LoadFont("fonts/PermanentMarker.ttf")

WHILE NOT RL_WindowShouldClose()


RL_DrawText("Congrats! You created your first window!", 190, 200, 20, col_red)
RL_DrawTextEx(fnt_PermMarker, "Oh, hi...! I'm the new Font!", 200, 250, 40, 2, col_raywhite)



--- End code ---

Very interesting.. This may be huge for several reasons. As RayLib is cross platform, based on OpenGL and support WebGL and has 2d, 3d, music, net, compression, win related functions and so on. It all depends on how much it's mature or rather tested on real devices like mobiles and how much effort is put to keep it compatible with recent Android updates. I'm curious about that, due all current Android problems and absence of other platforms like Linux in GLB. Another big advantage over other such solutions is no dependencies for other libraries, no crazy problems with compilation.

For me important thing is that in contrast to many other 'game dev libraries' here You have access to more basic drawing routines, and some equivalent to GLB StartPoly / PolyVector can be written, so let's say some handmade spriteBatch functions - as this allows for multi layer animated tile map and so on. On other hand it goes on current GLBasic status with compilation for HTML5-WebGL (that could be used on iOS/MacOS), and all Android problems.

btw. using RL_ as prefix may be most readable and clean solution for GLB - adding some object interface can cause issues with other things.


[0] Message Index

[#] Next page

Go to full version