Settings

Theme

Raylib: a simple and easy-to-use library to enjoy game programming

raylib.com

153 points by njn 7 years ago · 30 comments

Reader

xashor 7 years ago

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 7 years ago

    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 7 years ago

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

Full API:

https://www.raylib.com/cheatsheet/cheatsheet.html

potiuper 7 years ago

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). Also, take a look at using the GLSL data types for vectors and matrices - https://www.khronos.org/opengl/wiki/Data_Type_(GLSL) along with explicit use of SSE when appropriate and supported.

thepete2 7 years ago

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

  • raysan5 7 years ago

    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 7 years ago

>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.

lbj 7 years ago

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

  • raysan5 7 years ago

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

dlivingston 7 years ago

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 7 years ago

    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 7 years ago

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 7 years ago

Sorry, but this site is illegible on mobile.

zerr 7 years ago

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

  • 75dvtwin 7 years ago

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

jteppinette 7 years ago

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

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection