Hacker News new | past | comments | ask | show | jobs | submit login
Raylib, a simple and easy-to-use library to enjoy videogame programming (raylib.com)
218 points by dgellow 39 days ago | hide | past | favorite | 33 comments

I've finished a couple projects in Raylib before and I really like it, however, the downside to Raylib for me is that there is no real documentation. You get a handful of examples an a "cheatsheet" of functions and nothing else. When you bring up the fact that Raylib's documentation is borderline non-existent the community almost takes it as a point of pride, points at the examples and goes "figure it out." This makes working with Raylib a very hacky, trial and error experience which just constantly reminded me of the phrase "do you want to make a game or a game engine?" I want to make games so I stopped using Raylib and moved on.

I think it's an important distinction - it's "easy to use" as in you can put things on the screen, play sound, etc without having to read documentation or deal with boilerplate logic/steps longer than the custom code needed. It's not "easy to use" as in Unity where you want to have some complex physics apply to some premade models with certain rendering effects so you learn where to go to get each of those things and how to drop them in together and bam you have a significant portion of a game made for you.

I.e. if you're goal is to make a more advanced game with some polish no it's not great. On the other hand if your goal is to get some simple stuff to appear on the screen in the way you want and interact with it it's great.

I get what you're saying and I agree up to a point but I don't necessarily believe the distinction is necessary. LOVE2D is very "easy to use", easier than Raylib in my opinion, and probably has the most extension documentation I've seen for a game framework.


i like about love2d that it doesn't prescribe certain way of setting up your code / pipeline.

projects like defold / godot a pretty neat but they are more opionionated: they have a hierarchal structure.

Yeah, I liked it too, right up until I tried to run some games made in it and they wouldn't run because my runtime was too new.

This so much! This is the main reason why I left using raylib. Whenever you ask about the documentation, the function cheatsheet was mentioned. Eventually I got tired of figuring it out, which sometimes took a lot of time.

There is a discord server where the developer is very active, you can join and ask your questions to contributors directly, in my experience they are very friendly and eager to help!

Discord servers are no substitute for documentation. I've found that avoiding projects with that mentality is a good heuristic that keeps me from wasting my time.

What did you move on to?

not OP, but I've tinkered with game development before, mainly for game jams, and Godot was by far my favourite engine to work in.

Must be the “git gud” philosophy :)

I'm currently using Rend3 [1] for that sort of thing. This is still in development, but it's far enough along to do reasonable work. This is for high-performance 3D using Vulkan, and it's all in Rust. It's for when you just need the rendering part and don't need all the extras of UE4 or Unity. The big win over raw Vulkan is that the Rust system handles the GPU memory management, which is otherwise a huge headache.

[1] https://crates.io/crates/rend3

I listened to a podcast interview with Ray and I loved his philosophy with this project. The part that struck a chord with me was the challenges he personally had to keep features out that he knew would add complexity to using the library. Something about a creator having a vision for their project and staying true to it just brings me joy!

If you're interested in a more personal talk [0], he gave one near the end of last year about what he does in his life to get into the right mindset.

As usual, a disclaimer that I am the host of these conferences.

[0] https://media.handmade-seattle.com/developing-a-handmade-min...

If curious, past thread:

Raylib: a simple and easy-to-use library to enjoy game programming - https://news.ycombinator.com/item?id=18932206 - Jan 2019 (29 comments)

So,.i went to check out the dlang bindings on the bindings page


The ones linked there 404s. But i found these bindings:


For a fork of raylib found here


From what i can tell though, this fork is 11 commits behind the master branch but was updated a few days ago so i'm a bit confused...

It's a C lib, generating bindings is super easy https://github.com/jacob-carlborg/dstep

There is no need to maintain bindings that can be automatically generated, wich can easily get outdated if the C project is actively developped

Anyways, someone went a ahead and updated it: https://github.com/Soaku/raylib-d

There is also this package: https://code.dlang.org/packages/dray

Though it looks like it is for Raylib 3.0 (latest is 3.5).

That looks like it's based on a different fork by the same person who made the other fork.

>no fancy interface, no visual helpers, no auto-debugging... just coding in the most pure spartan-programmers way.

Why is this being shown off as simple and easy to use? Or am I misunderstanding the project page's message?

You can always argue whether something is easy-to-use but having "no fancy interface, no visual helpers, ....." surely makes this simple doesn't it?

And from my personal experience with raylib I can attest that it is easy-to-use.

True. It does actually look really cool. I just thought it sounded like an oxymoron.

I disagree. It's easy to use and particularly easy to bind to other languages because it has a very simple and straightforward API. I'm using it in Go and it's fantastic, as long as your project is fine with its limitations. For most things you only need to take a look at the cheat sheet and you're done.

True, it does sound actually really cool. I started reading some examples in my lang, might use

because gamedev programmers are getting slowly shadowed by "scripters" since videogame industry is VERY lucrative, it attracts plenty of non-programmers

and you are exactly doing what a scripter would do:

"baahhh programming is daunting, can you give me some interface where i can click on things pls?"

I've been a professional game programmer for the last 16 years and this is a pretty wrong headed and naïve point of view.

Let's preface things by saying there is nothing wrong with raylib or the approach where you write everything yourself. But vanishingly few games were made without other tools in particular tools to help with spatial layout and data entry. Have you tried setting up a moderately complex set of blend trees in a state machine for animation in text? This is more significant the more data driven your engine, in particular with modern composable entities a text only view of the world becomes very hard to understand quite quickly.

All more featured IDEs give you is a set of modifiable tools that you don't need to write yourself.

The view that there is a distinction between scripters and programmers is also poisonous. It's antagonistic and sows division when making a game is a team sport.

"Scripting" is also nothing new and scripting languages for game development are almost as old as games themselves. We're all just laying out logic to get the computer to do things. Whether that's using a visual language to setup game levels and AI, or text to sort and submit render jobs. Some of the better gameplay engineers I know actually started programming in scripting languages for games. Building tools at the right level for people to do their jobs is basically a good 80% of a programmers job in game development.

Do you know any game developers? Because that’s just not true. People use the tools required for their job. What do you mean by “scripters”? Do you mean designers building gameplay systems out of the building blocks made by seasoned, experienced engineers so they can make fun games and not worry about the bare-metal stuff?

I've heard that videogame programmers have some of the absolute worst salaries and work the longest hours and have a huge burnout issue because there's always another warm body who wants to work on games.

In fact I think this is the first time I've ever heard anything positive about it without a laundry list of caveats.

There have even been stories here about devs being threatened by fans, iirc.

I enjoyed the Handmade Seattle talk last year about the process of creating the library: https://media.handmade-seattle.com/developing-a-handmade-min...

I love raylib. Cheatsheet has all the info you need. And I love that it's just a library and not a framework. The dev has also built a number of useful and simple gamedev tools like icon and sound effects editors. Also, he is super friendly and responsive.

For 2D, it's in the top 3 for me (GMS2 and Godot being the other 2). I have no idea if it's any good for 3D but it's cool that it even has VR support.

After compilation of the basic example core_basic_window.c AVG antivirus detect a Trojan Win32:TrojanX-gen.

The library owner on github site say about it: "Most probably a false positive. In any case, it's an open-source project, if you find malicius code, please report."

Very disappointed because now I need to examine all the source code and I just want to see a basic demo running.

I trust AVG because every day I'm running every app I found on the internet.

It is extremely common for anti virus software to label newly compiled executables as false positives. They use a bunch of heuristics and tune in favor of distrusting new executables they haven't seen before.

Did you double-check with a tool such as virustotal?

False positives can be quite common with anti-virus software, since they tend to err on the side of caution, and if it is indeed a false positive, you should report it to the antivirus company itself rather than the developer of the library.

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