Hacker News new | past | comments | ask | show | jobs | submit login

Hey! Just saw an increment in raylib github stargazers and raylib Discord members and someone point me to HN!

I'm the author of raylib, feel free to ask me about it if you want.




No questions, just wanted to say thank you for helping to make gamedev actually fun again. I had no idea raylib existed till now. Unity and Unreal Engine have formed such a depressing monoculture that it’s no wonder gamedev has gone out of fashion in the last decade, and projects like yours help to rekindle it.

Oh, one question, I was hoping to convert a bunch of models to raylib’s format. Right now my exporter goes from Heroes of Newerth format to Collada. What would be the best way to import from there into raylib? (They’re rigged character meshes with 15+ animations for each, so it’s a bit tricky since there’s no universal simple format like obj.)


Thank you very much! Glad you enjoy raylib! I know it's not that popular like the big engines but, actually, next month raylib will be 10 years old! :D

raylib supports several 3d model formats (obj, gltf/glb, iqm, m3d, vox), I think Blender has exporters for most of them. Note that some formats support must be enabled in raylib/src/config.h file!


Okay, I’ll try converting the meshes to iqm. Thanks.

I edited in some context — they’re rigged character meshes with animations, so a few formats are unusable here (like obj) since it can’t handle skeletons. Would you guess that iqm is the best one to look into out of the ones you listed? Otherwise I guess I’ll buckle up and look at all of them.

(Kind of sheepish that the only formats I’ve heard of are obj and m3d…)


Not author but if you're sharing these assets, distributing them in the gltf (json/ascii, not binary) format is really helpful, as it seems to quite easily be imported into tools like blender and threejs.


Awesome, thank you! That’s really helpful to know. The context is over here https://news.ycombinator.com/item?id=36613343 but it’s basically 80 rigged characters with a dozen or so anims, along with normal/diffuse/specular maps. The aim is to distribute them as widely as possible into as many engines and programs as I can, but it’s been hard to figure out what people actually use for their art and engine pipelines nowadays. I’ll prioritize gltf.


> Unity and Unreal Engine have formed such a depressing monoculture.

That's because those got finished and shipped. There are a huge number of hobbyist small game engines that made it to about 80% of useful before the creator got bored. This is the "0.x" curse of open source. In the Rust gamedev world, it's said that there are five games and fifty engines.

In Rust land, if you want to do something that will get used, get behind WGPU, Bevy, and Rend3, and push. It won't be easy, because they've solved the easy problems and are now working on the hard ones. Progress is way too slow.


Hey Ray! Thank you for raylib. I'm learning a ton just from working with it/watching others use it (shout out Tsoding on Twitch—did you see he's been calling raylib from Fortran recently?).

Not to impose upon you with a technical question, but I have one for you if you're up for it.

I'm working with a very small indie language implemented in C that has bindings to raylib as a "first party" library/language extension. I'm trying to get raygui working with those bindings.

If I bundle raygui.h together with the rest of the raylib bindings library, everything seems to work. But, if I create a separate bindings library for raygui and try to import both libraries in the same program, then raygui functions seg fault immediately when called (valgrind points to, as an example, GuiCheckBox -> DrawRectangle -> rlSetTexture).

I don't know enough about C programming to trace this all the way down (I've only learned what I know by trying to cobble together extensions for this language) but it seems like when raygui is compiled apart from the main raylib bindings library, raygui somehow isn't able to share the OpenGL context created by the main library? That diagnosis might be a completely off-base, but that's what it seems like anyway.

Is this a familiar situation at all that you've seen in any other language with bindings for raylib? Any advice for what I could try to get this working?

I know it's hard to say anything conclusive without looking at actual code, but at the same time I don't want to take up any more than the bare minimum of your time.


Thanks! Glad you are learning with it! That was the original objective of the library! Yeah, I learn about Tsoding recently and saw some of the videos! Really nice! About the issue with raygui you comment, it seems related to calling some raygui function before raylib InitWindow(), an OpenGL context is required to call rlSetTexture()... ok, I see you got to a similar conclusion, yeah, it could be that raygui as a separate library can not access the raygui library OpenGL context.

My recommendation is to compile raygui together with raylib, afair, the default raylib Makefile includes an option to add ragui module into raylib on compilation.


This is a great effort, valuable endeavor. Lot of programmers starting out are just overwhelmed by the number of options. Having something streamlined to just coding is great.


Thanks! raylib was originally created to teach gamedev programming basis to young arts students, I tried to keep it as simple as possible but still focused on code writing and able to learn low-level concepts.


Hey, I've been checking out raylib on and off for some time.

I'm currently making an isometric pixel art game using SFML [0]. Technically this is not possible since SFML does not use a depth buffer/z value, but I found a way around this.

I still feel limited in SFML in many ways, like being forced to use the color channels to pass custom codes to the GPU for shaders (while still needing to use color)

Is it possible to setup a custom vertex array in raylib? Beyond world pos, texture pos, and color, is it easy to pass additional information to the GPU for customizing assets in the shader?

Most (all?) of the examples I've see are 3D, but I imagine raylib would have no problem handling a 2D game? Or is specifically designed for 3D and 2D is an afterthought/non-existant?

[0] https://twitter.com/YesboxStudios/status/1676924625912045568


Actually, afaik most raylib users use it for 2d games/tools; it has a batching system to minimize draw calls that works very good with sprites (but also used with 3d shapes). About shaders, raylib provides a Mesh structure with some predefined vertex attribute arrays but you can use them for custom data if required. Also, you can use the lower-level library rlgl for a more fine grain control over the buffers.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: