raylib game framework

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
chi
Addict
Addict
Posts: 1087
Joined: Sat May 05, 2007 5:31 pm
Location: Austria

raylib game framework

Post by chi »

Me likey alot!


raylib is an open source C based cross platform game framework released under the zlib/libpng open source license (github)


Features:
  • NO external dependencies, all required libraries are bundled into raylib
  • Multiple platforms supported: Windows, Linux, MacOS, Android, HTML5... and many more!
  • Written in plain C code (C99) in PascalCase/camelCase notation
  • Hardware accelerated with OpenGL (1.1, 2.1, 3.3 or ES 2.0)
  • Unique OpenGL abstraction layer (usable as standalone module): rlgl
  • Multiple Fonts formats supported (XNA fonts, AngelCode fonts, TTF)
  • Outstanding texture formats support, including compressed formats (DXT, ETC, ASTC)
  • Full 3D support, including 3D Shapes, Models, Billboards, Heightmaps and more!
  • Flexible Materials system, supporting classic maps and PBR maps
  • Animated 3D models supported (skeletal bones animation)
  • Shaders support, including model and postprocessing shaders.
  • Powerful math module for Vector, Matrix and Quaternion operations: raymath
  • Audio loading and playing with streaming support (WAV, OGG, MP3, FLAC, XM, MOD)
  • VR stereo rendering support with configurable HMD device parameters
  • Huge examples collection with +95 code examples!
  • Bindings to +25 programming languages!
Quick Overview: https://www.youtube.com/watch?v=h3ObspaasBA

Tutorials: https://www.youtube.com/watch?v=JE7F7DL ... 0mTGYTUHDn

UI: raygui, rGuiStyler, rGuiLayout
Last edited by chi on Wed Jun 05, 2019 6:34 pm, edited 1 time in total.
Et cetera is my worst enemy
User avatar
Kuron
Addict
Addict
Posts: 1626
Joined: Sat Oct 17, 2009 10:51 pm
Location: Pacific Northwest

Re: raylib game framework

Post by Kuron »

One can only dream... :mrgreen:
Best wishes to the PB community. Thank you for the memories. ♥️
User avatar
idle
Always Here
Always Here
Posts: 5839
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: raylib game framework

Post by idle »

looks easy to port.
Windows 11, Manjaro, Raspberry Pi OS
Image
User avatar
Kuron
Addict
Addict
Posts: 1626
Joined: Sat Oct 17, 2009 10:51 pm
Location: Pacific Northwest

Re: raylib game framework

Post by Kuron »

For some of us, it would be one of the best things to ever happen to PB.
Saboteur
Enthusiast
Enthusiast
Posts: 272
Joined: Fri Apr 25, 2003 7:09 pm
Location: (Madrid) Spain
Contact:

Re: raylib game framework

Post by Saboteur »

idle wrote:looks easy to port.
but please, a multiplatform port. ;)
[:: PB Registered ::]

Win10 Intel core i5-3330 8GB RAM Nvidia GTX 1050Ti
User avatar
idle
Always Here
Always Here
Posts: 5839
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: raylib game framework

Post by idle »

Saboteur wrote:
idle wrote:looks easy to port.
but please, a multiplatform port. ;)
Binary releases for Windows, Linux and macOS are available at the Github Releases page.
So we only need to import the headers but I don't really have time to do it at the moment as I'm full time
on a project developing a hydrofoil flight control system.
Windows 11, Manjaro, Raspberry Pi OS
Image
Cyllceaux
Enthusiast
Enthusiast
Posts: 510
Joined: Mon Jun 23, 2014 1:18 pm

Re: raylib game framework

Post by Cyllceaux »

So...

I started to port… But it's not that easy. Most The functions from this lib have "byval" paramaters. purebasic doesn't support this kind of parameters. I ported ~50%. The 2D and UI-part is full ported… But not the 3D.
User avatar
Derren
Enthusiast
Enthusiast
Posts: 316
Joined: Sat Jul 23, 2011 1:13 am
Location: Germany

Re: raylib game framework

Post by Derren »

PB supports both.

What's the situation like, where you think it doesn't?

Code: Select all

EnableExplicit 
Define a=4
Define b=4

Procedure ByVal(variable)
	variable = 5
EndProcedure 

Procedure ByRef(*variable)
	PokeI(*variable, 5)
EndProcedure 

ByVal(a)
Debug a ;still 4, as the procedure didn't touch the variable "a" but only copied its value into the local variable "variable"

ByRef(@b) ;submit a pointer to variable, instead of the variable itself.
Debug b ;it's now 5, because the procedure was able to modify the original variable because it knows the memory-address of the variable in the main scope
User avatar
yuki
Enthusiast
Enthusiast
Posts: 101
Joined: Sat Mar 31, 2018 9:09 pm

Re: raylib game framework

Post by yuki »

Derren wrote:PB supports both.

What's the situation like, where you think it doesn't?
I haven't taken a close look at the library in question, but I'm guessing that Cyllceaux refers to passing structures byval. In this case, one would have to manually push through structure field values individually in order to interface with the library. Nothing some helper functions couldn't solve.
Cyllceaux
Enthusiast
Enthusiast
Posts: 510
Joined: Mon Jun 23, 2014 1:18 pm

Re: raylib game framework

Post by Cyllceaux »

Yes... It's the structure problem.

I looked in the forum with a lot of possibilities to solve the problem, but non of them workes good enough. I don't want to write wrapper methods or expand the DLL just for PB.
User avatar
chi
Addict
Addict
Posts: 1087
Joined: Sat May 05, 2007 5:31 pm
Location: Austria

Re: raylib game framework

Post by chi »

Cyllceaux wrote:So... I started to port…
Nice!

Which 3D functions are you referring to? https://www.raylib.com/cheatsheet/cheatsheet.html
Et cetera is my worst enemy
Cyllceaux
Enthusiast
Enthusiast
Posts: 510
Joined: Mon Jun 23, 2014 1:18 pm

Re: raylib game framework

Post by Cyllceaux »

chi wrote:
Cyllceaux wrote:So... I started to port…
Nice!

Which 3D functions are you referring to? https://www.raylib.com/cheatsheet/cheatsheet.html

I stopped working on it, cause of: viewtopic.php?f=13&t=66466

But I try some things. But you can say, every function with a Vector3 did not work cause of the ByVal Structure.
User avatar
chi
Addict
Addict
Posts: 1087
Joined: Sat May 05, 2007 5:31 pm
Location: Austria

Re: raylib game framework

Post by chi »

Last edited by chi on Thu Apr 02, 2020 1:05 am, edited 2 times in total.
Et cetera is my worst enemy
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: raylib game framework

Post by IdeasVacuum »

Hi chi

Looks fairly straight forward to use.

Where are the example games hidden?
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
chi
Addict
Addict
Posts: 1087
Joined: Sat May 05, 2007 5:31 pm
Location: Austria

Re: raylib game framework

Post by chi »

IdeasVacuum wrote:Where are the example games hidden?
Updated my previous post ;)

If you can't see the examples, you might want to have a look at uBlock, AdBlock & Co
Et cetera is my worst enemy
Post Reply