
Raylib: a simple and easy-to-use library to enjoy game programming - njn
https://www.raylib.com/
======
xashor
I use it for playing around with some game ideas, really liked the ease of it.
Clean, compact API.

Only nuisance is that SUPPORT_BUSY_WAIT_LOOP is defined in the defaults, so I
can't use the package from my distribution but have to compile it myself – as
I don't want 100% CPU usage when prototyping (where I can happily live with
inaccuracies of the timers). I considered opening an issue and forgot about
it. But you, Ray, seem to be reading this thread anyway. :-) Thanks, by the
way!

~~~
raysan5
Hey, yeah, actually there have been a couple of issues about it... Using a
busy wait loop is the only way to keep a quite stable timming measure,
depending on OS, clock granularity could be up to 10 ms (despite raylib tries
to enable a hi-res clock with granularity of 1ms), it means, some undesired
timming issues...

In any case, you can just comment that line in src/config.h (or even uncomment
SUPPORT_EVENTS_WAITING) and recompile the lib. raylib has been designed with
customization in mind.

------
ArtWomb
Loving the minimal aesthetic. Will give it a try this weekend ;)

Full API:

[https://www.raylib.com/cheatsheet/cheatsheet.html](https://www.raylib.com/cheatsheet/cheatsheet.html)

~~~
raysan5
Actually cheatsheet is a bit outdated, raylib is growing fast, several
functions have been added in latest version 2.4-dev, you can check current API
directly in raylib.h:
[https://github.com/raysan5/raylib/blob/master/src/raylib.h](https://github.com/raysan5/raylib/blob/master/src/raylib.h)

------
potiuper
Prefer the use of types over preprocessor defines - ex: static const vs
#define PI, RAD2DEG, etc.
([https://github.com/raysan5/raylib/blob/master/src/raymath.h](https://github.com/raysan5/raylib/blob/master/src/raymath.h)).
Also, take a look at using the GLSL data types for vectors and matrices -
[https://www.khronos.org/opengl/wiki/Data_Type_(GLSL)](https://www.khronos.org/opengl/wiki/Data_Type_\(GLSL\))
along with explicit use of SSE when appropriate and supported.

------
thepete2
Could you use this for bigger projects? Or would I run into (performance?)
problems and have to port the project to another engine?

~~~
raysan5
raylib is not an engine. It's a quite low level library intended to enjoy
coding, probably better small games. You can use for a big project but it
lacks lots of required elements that engines have, to name some: Screen
Manager, Content Manager, Objects Manager. In any case, you can test it and
evaluate if it could fit your needs.

------
jpfed
>Bindings to Lua (raylib-lua), Go (raylib-go) and more!

Is there a list of other bindings somewhere? I didn't see one in my admittedly
cursory look.

~~~
raysan5
yes, actually there are bindings to +15 languages, here it is a list:
[https://github.com/raysan5/raylib/blob/master/CONTRIBUTING.m...](https://github.com/raysan5/raylib/blob/master/CONTRIBUTING.md#raylib-
bindings)

~~~
jpfed
Cool, thanks!

------
lbj
Looks awesome, but unfortunately a few of the examples don't work for me. Is
Firefox not supported?

~~~
raysan5
Web examples are not updated, still using raylib 1.8. But all should work on
any browser, which ones fail on Firefox?

------
dlivingston
Very cool - the syntax reminds me of Blitz3D, the language of choice for 15
year old me :)

Does this work with Swift and iOS - namely, is embedding this library as a
dependency likely to pass Apple's App Store review process?

~~~
raysan5
Sorry, no iOS support, it can be ported but I don't have an iOS or a MAC.
raylib is plain C and uses OpenGL, lately Apple ecosystem doesn't like those
techs.

------
azhenley
Looks fun! I have been moving towards using Go for everything so this might be
a good excuse for me to figure out how to use C libraries.

------
genjipress
Sorry, but this site is illegible on mobile.

~~~
raysan5
Sorry, already working on an updated web.

------
zerr
What would be the similar cross-platform (including mobile) lib in C++?

~~~
75dvtwin
I think this library, is exactly that. Cross platform in (C), and works on
mobile, browsers, as well as desktop environments.

~~~
zerr
Yes, but I'd prefer something similar in C++, not C :)

~~~
sandov
SFML is great and has a rather big community.

------
jteppinette
Does anyone know how the C code is ported to the web in the examples?

~~~
VikingCoder
Looks like emscripten:

[https://github.com/raysan5/raylib/blob/master/games/Makefile](https://github.com/raysan5/raylib/blob/master/games/Makefile)

~~~
raysan5
yes, emscriptem, compiled to WASM... but current web examples are still
asm.js. Web needs some update...

