Ok, I’ll admit it: I’m starting to get a little tired of Breakout. That won’t stop me though, we’re rapidly approaching the end of this comparison and I intend to see it through to the end!

Here’s the customary gameplay video:

This one’s pretty similar to some of the earlier options, but I mixed some of the paddle velocity when bouncing the ball and I think the ‘mixed’ version is an improvement. It gives the player a little more control on the ball, while still providing a more precise option.

I wasn’t really sure what to expect from Raylib.It’s a framework that I was aware of, but had never really heard of anyone using… I was very interested in this though, since I have my own little C framework (DFGame, from week 1) and I wanted to see how some of the problems I ran into were addressed. Being an old low-level language, C has a lot of limitations to think about in game development. I had to come up with my own solutions in DFGame, but many of them weren’t ideal and I wanted to see how a more mature framework handled them.

Now that I’ve used Raylib for a bit, I have a pretty good answer: The framework seems to take a lot of cues from higher-level options like Monogame (but without the content pipeline), which relieves some of the wordiness with a simplified API. However, most of the other problems were ‘solved’ by being ignored outright.

The most egregious example of the bunch is asset paths. C doesn’t offer a built-in way of finding the executable’s location, so you have to use OS-specific system calls to find it instead. This is one of the factors locking DFGame to Linux, and it’s one of the primary things I want to avoid in any new engine/framework. Raylib answers this problem by being completely unaware of it, and naively using the working directory to load assets. If you launch your game from anywhere it didn’t expect, it will fail to locate your assets and crash.

This disqualifies Raylib for the purposes of the exercise, but I still wanted to play around with it. Let’s look at the rest.

Now, you probably think you know where I’m going next: “He’s going to moan about API documentation for a few paragraphs” You are wrong, of course, because Raylib doesn’t really have any sort of formal API docs. It has this “cheatsheet” which covers only a subset of the API, and to my knowledge there’s nothing more… not really much to say there.

Instead, I’ll talk about how Raylib feels to use. I think this is where Raylib shines, actually. Working in C made me feel at home like with DFGame, but since the API is much higher-level it felt a lot better to use. Honestly, I think if the dev can fix the lacking areas and put a good API doc in place Raylib could be a much more competitive option.

← Back to Blog