Codesnippets > Inline / 3rd party
Raylib for GLBasic! (hosted on Github)
Schranz0r:
HUHU,
i start a new Project, and it works nice so far! :)
GITHUB
This (https://github.com/SliverLIVE/Raylib-for-GLBasic) is a wrapper from this: https://www.raylib.com
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 :)
Qedo:
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
Ciao
Schranz0r:
It's Cross platform, so it should be fine on Android. :good:
Schranz0r:
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$)
RL_SetTargetFPS(60)
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_BeginDrawing()
RL_ClearBackground(col_lightgray)
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)
RL_EndDrawing()
WEND
RL_CloseWindow()
--- End code ---
dreamerman:
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.
Navigation
[0] Message Index
[#] Next page
Go to full version