
Raylib is a lightweight, beginner-friendly, and open-source C library for game development, known for its simplicity and lack of external dependencies. It’s designed to streamline the creation of 2D and 3D games,
Loading summary
Ramon Santa Maria
Raylib is a lightweight, beginner friendly and open source C library for game development, known for its simplicity and lack of external dependencies. It's designed to streamline the creation of 2D and 3D games and has an.
Joe Nash
Intuitive API for managing graphics, audio and input.
Ramon Santa Maria
Ramon Santa Maria is the founder and.
Joe Nash
Lead developer of RayLib.
Ramon Santa Maria
He joins the show with Joe Nash to talk about the Raylib project. Joe Nash is a developer, educator and award winning community builder who has worked at companies including GitHub, Twilio, Unity and PayPal. Joe got his start in software development by creating mods and running servers for Garry's mod and game development remains his favorite way to experience and explore new technologies and concepts.
Joe Nash
Ray, welcome to the show. Thank you for joining me today.
Ramon Santa Maria
Hello Joe, thanks for having me. It's a pleasure.
Joe Nash
So as we mentioned, you are a developer of raylib, which I'm sure lots of our audience are familiar with a fantastic C library for, you know, game development and all kinds of other, I guess, graphical application development. What I want to start with is the path leading up to Raylib, which as I understand it is 11 years old today, so we've got quite a journey. Where did your interest in game development come from? Like way back before Raylib? What led you to where we are today?
Ramon Santa Maria
Well, actually before Raylib I was working in video games development. I worked in EA for some years and also worked in small companies. I also tried to create my own company, published a couple of mobile games for Windows Phone at that moment. And after that I got a job as a professor in a private education institution. Actually it was the first one to start teaching video games. An official video game development course here in Spain I think actually. And my task was teaching video games programming to mostly art students. Yeah, that was a challenge because, well, usually the art students were not that interested in programming. The first option was using some kind of no code tool like drag and drop. At the moment it was kind of the beginning of Unity getting into the market. But I decided to go low level and I really tried to teach actual programming to art students. And to do so I did some tests. I started with C and I checked some libraries out there. After some months of trying different approaches, I found one that actually worked. That was a very, very old library called Borlan BGI Graphics. That's from the 70s maybe. And surprisingly it worked extremely well because it was super simple, like Init Close draw, it was super simple. After that first year teaching I decided to create an alternative to BGI but more adapted to Modern times. Well, modern times at the moment mean OpenGL. And I did. So it was a weekend project actually, Raylib. And just in a couple of months I got a first version quite complete with a lot of functionality to do some 2D, to do some 3D and everything. I started testing or using it with the students. And also surprisingly, it worked super, super good. The students were super engaged with the library and almost all the students were able to create a poll at that moment was the assignment in the subject. And they really enjoyed programming, but not only they enjoyed creating games, but they enjoyed the fact of writing code. Writing code in a quite raw way with Notepad and compiling and running their games. And yeah, that was the origin of the library. But from there I start getting a lot, a lot of feedback because the students were quite excited about the library. I started asking for improvements, reporting bugs, letting other students from other institutions know about the library. And the library started growing and well, at that point I thought that it could be interesting to keep working on it. I actually released it as open source because I thought it was the best option for education and to reach a wider audience. And yeah, and it started growing at that moment I was reactivating my company, the previous one that I had published Windows Phone games. But at that moment I started working in the library with fewer students. The plan was keep working on games development. Actually we released a PS Vita game that time, but most of the day was working in Raylib. So it was like six hours per day working in the school teaching with Raylib. But then there was another six hours every day working in the office with some students developing Greylib. Incredible. Yeah, and it went for about six years that way. Something like that. Five, six years. Yeah. And really kept growing and growing and growing. And then at some point after those first five, six years, I got an email from Google that they were giving me an award for the open source project. And yeah, the library start getting recognition in lot of places and start to grow really, really well, becoming really, really big. And yeah, since that moment, for the last five years, actually I quit at that moment teaching to focus 100% in the company to not only develop rail, but also develop an ecosystem around Rayleigh with some auxiliary libraries and to develop tools focused for video games development, but always using railib as the base technology. So the technology kept growing along all the other products around it also were built. Yeah, that's mostly today. That's at this moment really it's super big. Yeah, it's unbelievable the point it has reached right now. It's unbelievable that I've been living years doing that.
Joe Nash
Yeah, it's a huge achievement. I think I saw so. And we'll be talking about it a bit today. But you've just released Raylib 5.5 and I think I saw. Was it 150 contributors to 5.5?
Ramon Santa Maria
Yeah, about 150 for this release alone.
Joe Nash
Yeah.
Ramon Santa Maria
But about 650 overall on the years.
Joe Nash
Yeah, that is a huge achievement. And also, you know, just going back to that, you know, the early days in that first class, I think you must have had the most engaged class of students in the world to share the library and start contributing to it. That's awesome. I definitely want to ask you, just from an educator's perspective, about how you approach that task of choosing C to teach art students. So we'll get to that later on. But for now, I guess to settle on Raylib before we get into all of the details, I guess for folks who aren't aware, can you run us briefly through how Raylib works, what it is and what it does and what it's used for? Kind of a high level introduction to the library, I guess.
Ramon Santa Maria
Yeah. Actually the library itself is quite simple in terms of programming. I mean not internally, but the API, it's quite simple. It's just C library. So there is no any kind of abstraction like object oriented programming or anything. It's just functions, procedural programming and structures with data. Mostly all the structures are completely transparent. I mean they are not pointers to some internal structure. So you can, when you create an image or a texture, you just define it like any other kind of variable and you have directly access to my image, point width, height, format and everything. So it's all the library itself is kept or I try to keep it as much simple as possible. Always thinking in those first uses of the library, the students and not any kind of students, students that mostly have an art profile and they usually start not interested in code. But many of them actually after some courses have end up working as a programmer in different companies. So that's amazing. So simplicity is one of the key points of the library. Beside that, the library tries to cover mostly the basic functionality that you need to make a small or mid sized game. You got functionality to manage the window, the inputs, all kind of inputs. Keyboard, mouse, gamepad. You have functionality to load images, to upload them into gpu as textures, to load models, the meshes, the materials. Well, that's kind of the most about functionality that has been added along the years. Then you have some basic collision detection Functionality. You also got a small math library included that actually it's portable, that can be used outside of Raylib. And you also have some basic functionality to draw textures, models and to play audio, to load audio and to play audio. So it covers most of the basic functionalities that you need for video games. Development about the architecture of the library since the beginning, it was designed in a way that it was very, very modular. I always thought, okay, it only has seven modules and that means seven C files. So that's intended to simplify the build system. Because in the past I struggled a lot with build systems and I decided to simplify that. Actually when I was at ea I was in charge of build pipelines and text pipelines, audio pipelines. And I know how complex can it be actually? And I try to simplify building at maximum. So I try to keep all the libraries very small and self contained in terms of architectures. But I also try to make all the modules independent from each other and being able to use them as much as possible as an independent library that you can take out from raylib and include into your engine or into your program to just do some of the functionality that you need. For example, the audio module, it's completely self contained. That so you can just pick up the audio module that are a C file with some headers, dependencies in the audio device, load some audio file, multiple formats are supported, it's configurable, also play the audio and close the audio device. So it's focused on that kind of simplicity. The same for the shapes module. In the shapes module it's quite self contained. It only depends on a bunch of functions to create Vertex. Vertex. Well, I think it depends on 6, 7 basic functions to define the vertex data. But then the module is self contained. So if you want a model to create shapes or kind of shapes like circles, rings, rectangles, rounded border rectangles. Well, lots, lots of types of shapes. You can just pick that module and again it's the same. Okay, you have to provide like seven functions, but mostly any engine already gives you those seven functions. And what? Well, that's the same with every module. Then another of the important parts of the library, it's an abstraction layer over OpenGL. That's why it's one of the key parts of the library. It's called rgirlgl and it's a kind of a mapping of multiple OpenGL versions from legacy OpenGL to modern OpenGL into immediate mode. OpenGL, kind of okay. You also have all the extra functionality to load the meshes and the vertex buffer and everything. But it has a small set of functions that let you just use the library, like the immediate mode, OpenGL 1.1. Actually, that proved to be very, very, very useful because in this latest release I saw that some people ported Rylee to work on all consoles, on retro consoles and homebrew consoles. And that was thanks to that Support for the OpenGL 1.1. Well, backend, because it's one of the backends. It's not the default one. By Default it uses OpenGL 3.3 and OpenGL ES 2.0 on web, Android and Raspberry PI or embedded devices. But yeah, that was one of the modules that I think it's more useful. But well, summarize it all together because I think I am going into many topics. The library itself, it's intended to basically draw anything on any kind of display. It could be a game, it could be a demo, it could be some kind of multimedia application, it could be a tool or. Yeah, anything. And considering it's C and it supports a really wide number of platforms. Yeah, actually I've seen the library used for many, many, many kinds of applications, not only games. And actually I'm an electronic engineer and I love seeing the library running on embedded devices for some kind of display or anything. And yeah, I love every time I see that running in an embedded device.
Joe Nash
Yeah, that's always exciting. I always think of, you know, I think that the classic example is like people putting doom on silly things, right? And whenever there's like that on a new. On a new thing, I always get excited by it. So I can only imagine when it's your library that ends up being on, you know, like a practice pregnancy test or whatever it is people are putting stuff on. That's awesome. Okay. God, so much to talk about. So I want to come back to things like the console support and some of the features of the library that you mentioned, like collision detection. But I guess to start with, you started at the beginning talking about your principles of the API design and wanting to keep things simple. Given the background of the project, that totally makes sense. But it's been 11 years, you've had loads of different users come the library, the audience has really grown. So I'm really interested in how you approach API design. There's what, 350, 380 functions? There was an update in 5.5, there's a lot of functions now. There's a big API surface area. So how do you think about the design of that API now with the past, present and future audiences.
Ramon Santa Maria
Well, that's a good question actually at the moment. Raylib 1.0 start with 80 functions. Only 80 functions? I thought that was enough to make many kinds of games, but Riley 5.5 has reached the 580 functions.
Joe Nash
It was a little bit off. Yeah, that's great, that's awesome.
Ramon Santa Maria
But I also have to say that a couple of years ago I did an analysis of the market and I looked for all the open source GitHub repos using Rylib that I could farm and I compiled like 200 repos or so and I did some text analysis, text scrapping, and I listed the most used Raylib functions in all the source files found in those 200 repos. And guess what? What was the surprise? Were the most used functions actually were the 81st.
Joe Nash
That's such a cool idea as well.
Ramon Santa Maria
Yeah. Init, window, close window, draw rectangle, begin drawing and drawing, draw circle. I mean low texture, draw texture. I mean the simple ones were the most used ones. I mean also there is some BS here obviously because at that moment the library has been in the market for eight years and yeah, people start and they use the first function, so. So there is some BS in data analysis obviously, but many of the advanced functions added to the AE library were barely used actually there was not many people using them. And yeah, it was surprising. But as I'm answering your question now, how I approach the API, Simplicity is always the key for me and sometimes I have some discussions about that on the discord or with the contributors of the library, because sometimes they try to add more functionality and I have to say no, not because it's not useful, but because it belongs to another level. I try to keep the library at kind of a low level and it's recommended that if you want to use it to make mid game, you build your small engine over it and add that functionality in that level, but not in the low level. So I try to keep the library at low level about things that I always keep in mind. For example, the function names. Function names always follow the same pattern. They try to follow the natural language. So as much as possible do not follow a programmer language because when you code you tend to use the technical terms that you should use to name everything. And sometimes if you think of the people that is going to use the library that maybe is people with not that much experience, it's easier for them to name the functions with some easier names. All the functions you already follow the pattern that verb, subject and object are usually two, three Words, three words at maximum, sometimes maybe four words. But I try to keep it in that way. Always the same. Also in the name of parameters, I try to keep always under five, six parameters. Always. Yeah, that's. That's more it. So I try to keep it simple all the time. That's my objective. Sometimes it's not easy because you have to do things that get complicated. And yeah, it's not easy to always keep it simple, but that's the objective. If things turn to be too complicated or the functionality to add turns to be too complicated, I try to abstract as much as possible. If it's a low level functionality, I try to keep internal of our lib and just expose the minimum required for most of the users and then maybe allow some flags, some build flags or some additional configuration options to configure more advanced functions or otherwise. I evaluate if that functionality maybe belongs to a lower level and then it shouldn't be in Rayleigh, but maybe in an auxiliary library or a secondary library. I actually got some of those secondary libraries. I got writewi that it's a library to create UIs, mostly intended for tooling, but it has a lot of immediate mode UI functionality. Got also erres for resources packaging. That's also another library. Well, I got random number generator. I got several auxiliary libraries that, well, are kind of in that Rylib ecosystem and are intended for users that need that extra functionality for their specific project can use those libraries. Actually last year or so, like one year ago or one year and a half ago, one Rylib developer in the community created a separate organization, a separate repository called ryleextras that has proved to be very, very, very useful. Because for all the people that came to the community asking for advanced functionality, a common answer is oh, maybe not for Riley, but you can add that to Rylib extras and it's usually an additional library or additional template or whatever module that does not need to be in the core library because maybe it's not useful for many, many people, but it could be interesting to have it sometimes. Well, like a binary partition or some kind of additional functionality that for example, in the community there are a lot of people coming wanting to make a Minecraft. Okay, that's very common.
Joe Nash
I did notice that the COVID image in your discord was like a voxel, like rendering.
Ramon Santa Maria
Yeah, there is a lot of users that are starting with Rayleigh and come to the community and oh, I want to make a Minecraft and it's okay. And they start okay, so what we need, we need some kind of Octree and all that. Well, in ryliepextras actually there is a kind of a Minecraft template with everything set up with a lot of extra functionality and it can be used as a reference. So not everything has to be in Raylib.
Joe Nash
Yeah, and we'll come back to community management a bit as well because I think the way you manage the ecosystem is really incredible. But just that concept of like, hey, I'm an open source maintainer with a very well specified focus project and lots of people have lots of enthusiasm, so there's a space where they can have that enthusiasm that's separate. That is a very nifty solution. So going back to one of the things you mentioned, you mentioned parameters. This is one of the areas that I think is really interesting, particularly about, well, API design with C, but also particularly for your audience, which is, you know, when you get to thinking about your data structures in C and teaching beginners and people who aren't programmers and dealing with pointers and dealing with how you parameterize your functions, what is your approach to that? Because that just seems like an area of endless foot guns for library designers in C trying to teach beginners.
Ramon Santa Maria
Well, actually I forgot to mention about that the objective, the beginning was avoiding pointers at all. So the first set of functions for rellib had no pointers at all. All the the data structures were just passed to the different functions by value. That's it. It has some problems related to that, but yeah, they are not that bad. What I tried was minimize the size of all the structures provided. Actually the structures are quite small, usually under 3248 bytes. So it's acceptable to pass them by value. And yeah, that was one of the objectives with the year. The library has kept growing and now obviously you have some more advanced functions that require pointers, but I think they are out maybe 20 or 30 out of 580 and in some cases where you really need pointers because obviously you have to load data. For example in an image, in image you have to load data, then the pointer is just kept inside the structure. So you got the structure with width, height, format, mid maps and the pointer to data or if it's textures, well, the data is already in the gpu, so you got the identifier, so that's easier. But what I tried is to keep it simple for those students later on. In the last few years I've been also teaching programming in the university for computer science students. And yeah, that's a completely different mentality because for them they usually love programming they usually love to go as much technical as possible and go into details. But actually, even though the beginning of this year I was teaching in the university to computer science students, well, actually I was teaching Unity, but I had to teach in the syllabus about programming patterns, solid concepts and all this information. I'm so used to coding C with a procedural way, with just data. It's everything and functions that operate on data that when I was teaching all those concepts, it was called. Oh, really? Yeah, I had to tell that. So I thought that. But I let the students know that that's an option.
Joe Nash
There's another way.
Ramon Santa Maria
Yeah, yeah, that's another way. And actually procedural programming, it's so enjoyable because you really see everything that's happening in the low level. You focus on data, that for me, it's everything. It's the most important thing at the end of the day, it's what you have and then it's just operating over that data. And that's a bit the philosophy of Rylee. You've got data that you move around and you just call functions that operate over that data and sometimes they retard you a value. I think that after many years working in that project, my mentality is so focused on that way of programming that when I look at the different abstractions of generated programming, C, the evolution of C, the solid and the solid concepts and everything, it's kind of, wow. No, no way. I mean, programming can be way simple than that and works, you know.
Joe Nash
Yeah, no, no. It's something we talk about a fair amount with guests on the show, I guess, which is like one of the nice things about game development is sometimes it feels like it gives you an opportunity to get down to like, you know, the lower level and to get down to like simple abstractions and to just like. Because, you know, it just has to render once and render once on the screen and like, you don't have to maintain it for a minute. Million years and this kind of stuff. Right. So, yeah, but it's also. It's really interesting. So, first of all, complete tangent. You taught at upc, right?
Ramon Santa Maria
Not this time.
Joe Nash
Okay, cool.
Ramon Santa Maria
I think in several universities.
Joe Nash
Yeah.
Ramon Santa Maria
Because usually thought for some time, maybe one year, two years, I make some money and then I can be sometimes. Yeah. We're working on Raylib and the tools and all the ecosystem. So this last time I was working in. It's called Techno Campus.
Joe Nash
Cool.
Ramon Santa Maria
That is another university that it's near Barcelona, that they also have a video games degree and a computer science degree. And this Time I was teaching there, but before that I was in the UPC for. For two years.
Joe Nash
Cool.
Ramon Santa Maria
It was 2020 to 2022, something like that.
Joe Nash
Nice. Awesome. Cool. Yeah, they have a. I guess you would have been. The reason I asked is because UPC has a very famous student run hackathon. But I guess it wouldn't have been running when you were there due to Covid. Oh but yeah, they would have been a great audience for Aylib. You mentioned teaching Unity and I think it's. You summarized I guess the challenges of teaching something like Unity to game dev students very well. Which is just like there's so many concepts, so many abstractions but I guess at a more holistic level, a higher level. When you just think about introducing people to game dev, how do you explain to new developers like hey, here is why you would choose Raylib versus why you would choose a unity, a Godot, an unreal. Like a full fledged engine.
Ramon Santa Maria
Well, I think that, I mean Rylib can teach you not only the basis of how things work in the inside, but also well be a guide to start your path. I mean actually those first six, seven years that I was teaching with Raylib, Raylib was a pretty small part of the syllabus. It was like 60 hours in total. Then we jump it into. At that moment it was into monogame and after that we jump into Unity. I thought that was a great part because Riley well's low level was C. Then you jump into monogame that actually Riley is very inspiring in monogames with the naming conventions and destructors and everything. With new monogame you can learn C, you can learn some object oriented programming and some more advanced concepts. And then when you understand that you can jump into Unity because then all the game loop and everything gets abstracted into Unity internal structure. But you can start working in a higher level, just managing the logic of the game and the assets and the data and the different scenes. So I think that's a great path in my opinion. Start in a low level, try to understand how things really work. If possible, try to go a bit deeper because that's another point about Rylee. It's designed in a way that the source code, it's very, very, very simple to read, it has lots of comments, avoids any kind of complex programming techniques. It's very simple in terms of code. So students that want to dig farther. Actually I had many students that had gone inside rydlib and then had sent improvements and have well improve the library. Yeah, that's it. You can go inside and learn a bit deeper, different concepts, maybe about 3D, about models, about animation, about audio, you can go deeper, but after that you can move on and you can move to other upper level frameworks or engines. And I think that's a great path actually.
Joe Nash
Yeah, I agree, that does sound really fantastic. And I guess along that way as well, people, there's this perpetual issue in computer science education where they try to teach the abstractions before the student has encountered the problem that requires the abstraction. I always think about this with git and version control. Universities try to teach version control before. Students have worked on big code bases with lots of people and understand why it's helpful to them. And so it's just another thing in the way. But in that path that you describe, you get to see the low level and then you get introduced to mono game and you see like, okay, that takes away some of the low level. I know how the low level works, but now I know why I want this abstraction. And then you get to the scenes in Unity. So I think that's a really great approach. That's awesome. Yeah.
Ramon Santa Maria
Actually this is another point that didn't mention I got it in the head since the beginning it's about building systems, right? Because usually in my experience that's the point where most students struggle a lot with the build systems. I don't know, in the different places I've been teaching, usually I've seen a lot of problems in the students understanding how everything works in the sense that not how everything works, but how to configure properly a complete development environment. I mean not only maybe starting with compiling in the command line, but then setting up some, I don't know, makefile or some basic script from there try to grow it up. Maybe a. I don't like CMake but maybe CMake or even visual Studio that is standard in the industry. I think how to properly configure a project in Visual Studio and then from there move on and not only use the control version system, but even set up some continuous integration, continuous delivery that nowadays it's quite standard and quite simple to set up these kind of systems. That's one of the problems I found with the students and well, I try to address as better as possible. But yeah, I think it's super important because at the end of the day many students just want to write code and press the play button. That's the easy part actually. Usually if you are in a big company, there are many, many, many other site methods and processes that are as important as just Compiling the code that need to be done and need to be understood. Someone has to do that work.
Joe Nash
Yeah, I mean we could turn this into a whole education episode, but yeah, 100% agree. And I think a lot of that instinct to just wanting to press the play button also comes from like, you know, a lot of the platforms for teaching code nowadays where they give you the fully working cloud environment, you just type the code and press play. You know, I always use the analogy of like it's the difference between learning how to use a tool versus maintain the tool. Right. Like you can learn how to carve a spoon with a sharp knife, but if you don't know how to sharpen the knife, then you're not going to be carving spoons very long. Right. It's going to blunt and you have to start again. Yeah, I think that's a fantastic point.
Ramon Santa Maria
Yeah, but sometimes your spoon can broke maybe and then you have to do something.
Joe Nash
Yeah, absolutely. But you mentioned there, interestingly enough, so talking about the build systems and CI and stuff, I think this is a good time to talk about RateLib 5.5, given that you've got some fantastic new tooling in that, including solving this issue for very new people. So I guess to start with. So 5.5 was a big release, right? You were working on this one for a while?
Ramon Santa Maria
Yeah, well, actually it's been one year of changes, like 800 changes or so. Many, many changes. Yeah, well, I've been working on it for a year, mostly at this moment and actually for the last two years or so, mostly reviewing and merging changes and that's it, mostly done. In the past I was adding features or adding examples or adding content. But for the last two years or so I've been mostly doing the reviews. The reviews and attending the community and helping the community, trying to help in all the initiatives in the community. Organizing game jobs and doing a lot, a lot of community work because actually has grown a lot. It's difficult to manage.
Joe Nash
That must be very exciting. But also I imagine as someone who likes writing code a lot, that must be a really interesting mindset change.
Ramon Santa Maria
Yeah, well, actually I still do, but I do with my tools. I develop tools, I publish the tools and in that site, yeah, I write code a lot.
Joe Nash
You've given the library to your community and you've gone to your little playground in the corner.
Ramon Santa Maria
Yeah, actually, because as all the tools use Raylib as the base library. That's super good because at the same time that I'm developing the tools, if I need a new function I can add it to Raylib or if there is something that is broken in Raylib, I can fix it on the go. That's really cool.
Joe Nash
But see about. Yeah, 5.5. What's new in 5.5?
Ramon Santa Maria
Yeah, that was the question. Yeah, well, yeah, it's been one year with all those changes and for the last two months approximately, it's been the time that I put to this release because I got a checklist with everything that should be done before any release. And it's a long checklist actually. You have to check the compilation for all the platforms, you have to check the examples, you have to check the web, you have to check the different social networks, you have to create the installer, the installer for the new Rylib version, actually it's created with Rylib itself, actually it's one tool that I sell to create installers. So actually there are a lot of things and not all them work at first try actually because yeah, for that last release, the last two nights, it was crazy because the installer was not. I'm about to release a new version of the installer. It was not properly tested and actually right five installer is the test version and there were some things that were not working as expected and it was like, oh, I have to release this day. And well, it was a bit stressful, but yeah, it's out. And about the features of this new release? Well, there are many, so I cannot list all them. But what I consider were some of the key features of the release was the improvement on the addition of two new platform backends. In rally 5.0 there was a big internal redesign of the library that we have a core module that was a C file with 10,000 lines of code in a C file and it was multiple defines to select the platform that it was building the code for. So all that code was modeled into separate modules to have one module for platform desktop, one module for platform Android, one module for platform DRM that it's for embedded systems that run on the kernel. So it was move all the code into separate modules. Not only that, it was created a template module to be able to add new platforms, just overwriting the set of functions required for that. And I kept the core module just like a roper to the different platforms and then at compile time you choose the platform you want and it compiles. So very cool. It worked super good actually. It has pushed the library during this year a lot actually it has pushed it farther than unexpected because. Well, what happened that was some people Pick up and start porting it to consoles to drink CAS. Even Nintendo 64, PS Vita, PS4 Homebrew, PSP lately. So yeah, they only have to write one module like Core PS Vita, Core PS4, put all the window mink inputs code in there, then enable the OpenGL 1.1 backend and link with the platform libraries for the OpenGL 1.1 backend. So we have seen that. That's another of the features of the Findvolt 5. We have seen a lot of porting of Raylib to all consoles, to retro consoles. It was like, wow, unbelievable.
Joe Nash
That's awesome. Yeah, especially Dreamcast. That's wild.
Ramon Santa Maria
Well, actually even a spine is working on Dreamcast. Even you know, the 2D animator system. Wow, it's amazing. But beside that, beside that, porting to multiple consoles, two new backends have been added also thanks to that split. That was a new library that just hit the market, an open source library that it's called. Well, the naming for the graphics libraries are sometimes a bit complex, but it's rgfw.
Joe Nash
Oh yes, I'm familiar with it. Yeah.
Ramon Santa Maria
Yeah, it's a library for Abstract, the windowming and input system, but also supports Windows, Linux, Mac also supports Web lately or it's about to support web and yeah, I love single file header only libraries and this is a single file header only library for me. It's like, wow, that's great. Yeah, okay, it's maybe 7,000 lines, never mind. Yeah, you can just drag and drop that library into your code and yeah, and you got a full backend for multiple operating systems, so that's great. Well, it was added that backend option to RayLib because in the last month I've seen a deceleration in the maintenance of TLFW library, that's another popular library. So just in case for the future it was great to have some alternative supported by Raylib and also in the same line recently it was published or I don't know, it's still in alpha or beta, it's officially published but SDL3 library, that's super popular library for windowing and inputs. Well, it's widely used in many games but it also added a module for support multiple graphics libraries that at the moment is not used but it's interesting to keep an eye on it and well, another of the supported backends was SDL2 was also supported, was already supported so. So thanks to contributors because all that has been done by contributors. So I just reviewed it. Amazon contributor was the support for SDL3 backend that's awesome. Another feature, GPU skinning, that was also requested many, many times. That was when you compute the different positions on the animation, every frame of animation, you have to reposition the vertex of the model. I can see them actually you have to compute that position based on the skeleton of the model. And that process of computing the new positions of the vertex can be done in cpu. It's a lot of matrix operations or it can be done in the GPU. Till now for Rylib it was done in CPU. That's great for small models, up to maybe 2000 Vertex, that's not a problem. But the community was asking for GPU skinning. Well, actually they were asking it because Unity added it and as many. There are many Unity users, probably they sell GPU skinning and so they asked for GPU skinning, but it has been requested many, many times. I was quite reticent to add it because it requires some redesign. And also depending on the technique used to add the GPU skinning, all OpenGL versions like OpenGL ES for Android or Raspberry P devices, or embedded devices or Web. It's not simple, has limitations to implement the GPU skinning because it requires more advanced OpenGL features. But at the end, one animation programming professional, it's Daniel Holden, proposed an implementation that was pretty good and was also supported in all the devices and everything. And yeah, it finally was merged and added to Rylib as an additional option.
Joe Nash
One thing I guess we haven't mentioned, so you mentioned the installer, but as well as the installer you also have the project setup tool. I guess they're all kind of interesting to me because you know, you've got this like low level C header only library and you're starting to build out and include like, you know, ecosystem of tools around it where like I think the install, the installer adds like you get a version of Notepad with it and everything as well, right?
Ramon Santa Maria
Yeah.
Joe Nash
How are you thinking about what's acceptable tooling to wrap around the library without taking you into like a full desktop engine situation? Right, like where's the line?
Ramon Santa Maria
Yeah, well actually that line, it's quite difficult to set because. Okay. The point is that when you are working on a project for so long, usually all the maintenance becomes boring. I mean it's not enjoyable anymore to. Oh, I know there is a bug. What happens here? There are some pixels that are not drawing correctly when you rotate and it takes a long time. Usually there are those kind of bugs that require a long time to investigate to set up an environment just to test the bug properly, the multiple platforms, everything, it becomes boring.
Joe Nash
You must have so many weird emulators installed to test all the weird consoles.
Ramon Santa Maria
No, actually at this point I don't have that.
Joe Nash
Oh, good, good, good.
Ramon Santa Maria
That's true. I never had a Mac, for example, so the Mac back end has only the.
Joe Nash
That's someone else's problem now.
Ramon Santa Maria
Yeah, yeah, yeah. The point is maintenance becomes a boring task. So you are all the time thinking in other ways to make it more entertainment. The process of keep working on railing. The result. In this last release, I also released one month ago or so, a tool that it was intended to build project structures, mostly intended for newcomers. Because what I've seen in the past or along the years is that the new people that start with rileyleaf usually start with the point C file that plays anywhere and they start working with that C file. They compile this C file and they play with the C file. But at some point you need to maybe create other C files or the modules. You need to include some additional libraries, some railib extra library. You need to add the resources and you need to do a more, let's say more professional project setup. What I said at the beginning that what I seen in the university that when students have to do a full setup with the build system, continuous integration, delivery, GitHub licenses, ReadMe, contributors, conventions, all this git ignore all this kind of environment, full environment pieces, they usually struggle, they have problems. So despite I'm a bit against providing a tool to do that automatically because I think that the students should learn to do that. Well, I agree that we will do that.
Joe Nash
Yeah, yeah, I guess it doesn't fully do it. I mean, it sets it up automatically. Right? But then like they're still working with it. It's not like it's abstracted away behind a ui. They get the output and they have.
Ramon Santa Maria
To work with it.
Joe Nash
Right?
Ramon Santa Maria
So yeah, you just define some names, product name, project name, company name, resources, directories. You define some basic properties of the project and then the tool basically pick ups a template that actually the tool is open source and the template is there. You can check that and modify and just renames everything that needs to be renamed to follow the naming that the user has provided. And it creates a project with preconfigure makefile VS code task Visual Studio 220 tasks, a complete continuous integration system for multiple platforms to build the project and to make a release and automatically attach the build project. It configures the resources so it Gives you readme template with something pre configured. It gives you a full structure with many many things already preconfigured and then you can just pick that up, put it somewhere in your computer and upload it to GitHub and you have a full base project to start working in a kind of more professional way to create not only small demos but also some kind of a small mid sized game.
Joe Nash
That's awesome.
Ramon Santa Maria
Yeah, that was a tool. But going back to your question, where is the limit? Okay, I always have clear that the limit is that Rylee is not an engine. It does not pretend to be an engine. Probably a high level framework in the borderline between an engine, but not at that point because I think that an engine in my experience some of the things that need to be provided are some kind of screen manager system, some kind of system to manage the different screens in game, some kind of entities or game object managing system that could be a simple array, but could be something more, a list or something more complex. And the third part that I think every engine should have is the content manager, the resource manager or the asset manager, an integrated system to process all the resources and manage all the resources. So I think those three systems are the three key parts an engine should have and Rylee doesn't have those parts. And actually it's supposed that the user can build those parts by themselves and I think they are not that complex. Actually there is a screen manager example in Rylib as an example that it's a simple switch that can change from one screen to another screen even with some transitions. So it's kind of fancy to manage the object. You can have only a list of an array, so it shouldn't be that dramatic. And for the content manager part, it's probably the more complex part. I created the Ares library with an ERRES packet tool trying to kind of supply that 3 3rd part that would make Rylip more aligned with an engine.
Joe Nash
Interesting.
Ramon Santa Maria
Yeah, that's the line I said. Yeah, but besides the line, I mean even with that line you can do very interesting things like for example the project configurator, the Riley project creator. It's one of those things. It's a tool that set ups all the project and now actually I'm thinking about another tool. I'm thinking I got it designed and I haven't released it yet. Maybe in the future that that's another step that I also seen sometimes could be dramatic for people. Starting with Rylie. That could be like a third tool to do easy the process to build Games to multiple platforms.
Joe Nash
I feel like we talk about it too much on the show, but we talk about, we talk with game developers a lot about porting to other platforms and what a nightmare it is. So I can definitely see how that would be a useful tool.
Ramon Santa Maria
Yeah. For that reason, tools like Unity and Real Godot are so successful. Actually, that's always the most complex part of game development. Besides big games that try to push the graphics to the limits or try to innovate a lot in some aspects, usually building for multiple platforms, it's a drama.
Joe Nash
Yeah. So we've spoken a lot throughout our chat about how big the ecosystem is and the fact that people are contributing more and more. And you're now in a position of being much more in reviewer and maintainer mode. You know, in the lead up to this, I always have a little poke about the projects. Look at the ecosystem, look at what it's doing. I do not understand how you have the time to do a thing you do. I think your Reddit alone is ridiculous, let alone Discord, let alone running your own game jams, let alone all of it. So I guess just straight at the top, like, what is your community management approach to this project? Like, how do you think about managing and growing and nurturing that community as a maintainer?
Ramon Santa Maria
I don't have that much time, actually don't sleep much. Well, six hours per day, so it's okay. But in the last two years, or probably in the last three or four years, my time put into the social networks and the rally community in general has been increasing a lot, day after day. Maybe I remember a story started by 2020 because of the Pandemia that it was at home and, and everything. I, maybe I spent one or two hours a day. At the moment, I'm spending probably five, six hours a day easily. And that's, that's a lot of time. And not only in the computer, but a lot of time in the, in the. With the mobile phone.
Joe Nash
Yeah.
Ramon Santa Maria
And. Well, I got multiple communities. I, X, Blue sky recently, Reddit, YouTube, Discord. Discord is the community where I spend most time because I've seen the community there growing super fast. And actually it's a super nice, super nice community. I've spent a lot of time welcoming new users, trying to help, trying to answer their questions, trying to engage with them. I do a lot of everyone to try to create that engagement. And I also did a lot of actions in X and now in Blue sky, trying to create content and trying to engage the audience in that sense, with Some banner with some images. But yeah, you have to think about it, you have to create it, you have to try to publish it in a certain moment that you think it's going to work. Actually the community management work, it's a full time job if you do it. Also what I've noticed in the last few months is that it's probably taking too much time of my time, the different communities, the different social networks from Relive, from developing for example the tools or separate libraries. I got several tools that have not been published yet and I want to publish the installer that I published with Rylee as installer was supposed to be published one month ago in my timelines. So I'm trying to manage that at the moment some way. But it's so addictive, you know.
Joe Nash
Yeah, yeah, yeah. Very instant feedback, right?
Ramon Santa Maria
Yeah. But it's not only the instant feedback, it's that you have created something that has become super popular and there is a lot of people that maybe send you mails and write you private message and contact you and are using that tool and ask you for help that somewhat you feel like you have to do that, that it makes sense.
Joe Nash
Yeah.
Ramon Santa Maria
And it becomes addictive and. Yeah, yeah. Well, at the moment I'm trying to, to manage, to manage it better and trying to limit the time I put on the social networks and on the community. But for the last two days since I published Riley 5.5, I did connect around big releases.
Joe Nash
It makes sense to be a little bit more online, I guess.
Ramon Santa Maria
Yeah, yeah, yeah. Riley has been released two days ago and there have been like 15 merges already. 15 pull request ranges in those two days. Yeah, no, it's certainly a lot of work for one, one person. It's too much work for one person. Financially, it's not sustainable. That's also.
Joe Nash
That was gonna be my next question because I, I mean I know I've seen you mention interviews in the past that you know, you've gone from. You previously had a cycle of having a full time job and then come back to Raylip having a full time job at Rayla. I know you've received various grants over the years, but I think I saw in a discord ama that I think as much as I think it was recently, I think it was in September that you said, you know, currently the project is not super sustainable and there's. It's hard to do basic maintenance. So how economics of open source is always an issue. How are you currently maintaining this work?
Ramon Santa Maria
Yeah, I wish I had a good answer for you like? Yeah, it's expanded with. Well at the moment I received some donations. I got GitHub sponsors where I got some sponsors and I also got some patrons. All the numbers are open. Okay. So you can Go there on GitHub Sponsor on Patreon and check the numbers. Donations are quite low. I think it's about $700 per month, something like that. Not that much. Yeah, I tried to make some kind of business with all the tools with the Rayleigh Technologies and I publish tools. Some tools are free actually, but some tools are paid and they actually sell, but neither very low numbers. And beside that I maintain really by my punctual contract work that I do here in Barcelona. For example, I collaborate with a game BCN that helps new companies, new startups, video game startups to start and I collaborate with them with consulting different educational like optimization methodologies, processes. I help them with that. And beside that, I work from time to time in the university to teach some subjects for a span of time. At the moment, that's my situation.
Joe Nash
Lots of moving parts.
Ramon Santa Maria
Yeah, it's different moving parts. But yeah, I'm quite concerned about that, you know, because it's not. I have no stability.
Joe Nash
Right.
Ramon Santa Maria
You know, that's, that's not stable in, in the long term and it's neither sustainable.
Joe Nash
Yeah.
Ramon Santa Maria
So I'm just living a bit day to day and my mind thinking what to do next. So it's complicated.
Joe Nash
Yeah, yeah, yeah. Such a. Also just, you know, two industries renowned for being unstable economically, being a video games developer, being an open source developer and there you are in the middle of them. Well, if you're listening to this folks, and you've got some GitHub sponsorship money, you know where to put it. Raylab, I highly recommend. So we are coming towards the end of our time. So there's one last question I wanted to ask you. I know you've just released 5.5 and you're very focused on that, but I guess what's next? Are we talking a 6.0? Is it a 5.6? What's, what's next on the roadmap?
Ramon Santa Maria
The truth is that for the last two years or so I've been saying that, okay, that's the last release.
Joe Nash
Oh really? Wow. Okay.
Ramon Santa Maria
And yeah, I tried to move on and look for something else, but then when the release happens, there is so much engagement in the following weeks and months that I just keep working on it. And also it's true that I see the project and I believe in it, you know, I think, wow, that's a great project and most of the people that have tried Rylee really praise it and really love it. So I hardly ever hear bad reviews about the library of people, really enjoy it. Here I have something that could help a lot of people, but not only in education, but to spread programming, to spread low level programming, to get a better understanding on video games development. I mean, I really believe in the project and that's probably what keeps me pushing it month after month and year after year to try to make it somewhat sustainable at some point. Yeah, so yeah, that's it. So I don't know, I don't know what's next already for the moment, I am focused on a couple of tools that I want to get out. I want to publish maybe before Christmas, I don't know. Then there is one tool that we're talking about that when I created the project, the running project creator, I planned a second tool.
Joe Nash
But.
Ramon Santa Maria
Well, I probably can tell you what's it, that it's a project builder that in a similar way you can just click a button and get an instabil for Windows, for Web or for other platforms. Maybe we release that small tool as a support tool for Raylib. I don't know what's next. I don't know what's next. The community is already pushing to other graphics APIs.
Joe Nash
Actually have seen the endless discussion about.
Ramon Santa Maria
Vulkan, but actually there is already some user because okay, usually the community is always asking for things, but there are not that many people doing the things they ask for. But it seems that there are a user that has created a backend for DirectX 12.
Joe Nash
Oh wow. Okay.
Ramon Santa Maria
And it's already functional.
Joe Nash
That's a big job.
Ramon Santa Maria
That's a big job indeed. And yeah, and I saw that and it was. Oh, that's super interesting. Maybe we can open that box and consider supporting all the graphics APIs other than only OpenGL. But yeah, again the amount of work not only to do that, that it's a big amount of work to do that, to integrate that, to maintain that. It's so big that it's scary. I can't do that alone.
Joe Nash
But then as you say, the fact that someone has gone as far as to start that themselves is a good. Hopefully it's a positive indicator that you won't be doing it alone and that this is someone who's going to get really engaged.
Ramon Santa Maria
Yeah, yeah, yeah, absolutely, absolutely. And actually I got some people in the, in the Riley community shout out for Jeff. It's really pushing Riley community a lot and He's a creator of Rylie Extras and actually is doing a lot, a lot for Rylee. We have to have a discussion. We said the discussion of the Rylieu 5.5. So we probably announce that moment to see what direction can the project go from here now. Yeah. Let's see. So it's an adventure.
Joe Nash
Yeah, absolutely. Fingers crossed. It eventually gets a little bit easier. But for now, thank you very much for your time today. Remember, it's been wonderful. Thanks for spending the time with us and running us through so many amazing details about the API and the community. It's been a pleasure talking to you.
Ramon Santa Maria
Oh, thank you very much to you. Thanks for inviting me. And actually, it's been a pleasure to be here. Thank you.
Podcast Summary: Software Engineering Daily – The Raylib C Library for Game Development with Ramon Santamaria
Introduction
In the January 29, 2025 episode of Software Engineering Daily, host Joe Nash sits down with Ramon Santamaria, the founder and lead developer of Raylib, an open-source C library tailored for game development. The conversation delves deep into the origins, design philosophies, community dynamics, and future prospects of Raylib, offering invaluable insights for both budding and seasoned game developers.
Origins of Raylib and Ramon's Journey
Ramon Santamaria begins by sharing his extensive background in video game development. Prior to creating Raylib, Ramon worked with industry giants like EA and ventured into publishing mobile games for Windows Phone. His transition into academia marked a pivotal moment; as a professor in Spain's first official video game development course, Ramon faced the challenge of teaching programming to primarily art-focused students.
"The first option was using some kind of no-code tool like drag and drop... I decided to go low level and I really tried to teach actual programming to art students," (01:25).
Seeking a simple yet effective tool, Ramon experimented with the old Borland BGI Graphics library, discovering its simplicity resonated well with his students. This experimentation culminated in the creation of Raylib as a weekend project, aiming to modernize BGI with OpenGL support. The initial success with his students, who became actively engaged and contributed feedback, set the foundation for Raylib's evolution.
Design Philosophy and Core Features
Raylib distinguishes itself through its emphasis on simplicity and minimalism. Designed as a procedural C library, Raylib avoids the complexities of object-oriented programming, favoring transparent structures and straightforward functions.
"Simplicity is always the key for me... I try to keep it as much simple as possible," (14:41).
The library offers comprehensive functionalities essential for developing 2D and 3D games, including graphics management, audio handling, input processing, and basic collision detection. Its modular architecture allows developers to use individual components independently, enhancing flexibility and ease of integration.
Ramon further explains the library's architecture:
"All the structures are completely transparent... So you can, when you create an image or a texture, you just define it like any other kind of variable and you have directly access to it," (07:24).
This design choice ensures that users, especially those new to programming, can interact with game elements without grappling with abstracted complexities.
API Design and Evolution
Over the years, Raylib's API has expanded significantly. Starting with merely 80 functions in version 1.0, the library has grown to encompass approximately 580 functions in version 5.5. Despite this growth, Ramon emphasizes maintaining simplicity:
"Simplicity is always the key for me... I try to keep it simple all the time," (14:41).
A notable approach Ramon took was analyzing the most frequently used functions across various Raylib projects. Surprisingly, foundational functions remained the most popular, underscoring the effectiveness of Raylib's initial design.
To manage the expanding API, Raylib remains modular, allowing developers to incorporate only the components they need. Additionally, auxiliary libraries like WriteWi (for UI creation) and Erres (for resource packaging) provide extended functionalities without bloating the core library.
Community Building and Ecosystem Management
Raylib's success is significantly attributed to its vibrant and active community. With over 650 contributors, the library thrives on collaborative growth and continuous improvement. Ramon dedicates substantial time to community management, engaging users across platforms like Discord, Reddit, and YouTube.
"Discord is the community where I spend most time because I've seen the community there growing super fast. It's a super nice community," (50:23).
Despite the rewarding interactions, Ramon acknowledges the challenges of sustaining such engagement single-handedly. The increasing demand for support, coupled with constant feature requests, has made managing the community a full-time endeavor, stretching his resources thin.
Raylib 5.5: A Milestone Release
The recent release of Raylib 5.5 marks a significant milestone, incorporating over 800 changes accumulated over a year. Key features include:
New Platform Backends: Raylib 5.5 introduces support for diverse platforms by modularizing the core code into separate modules for desktop, Android, and embedded systems. This architecture facilitates porting Raylib to retro consoles and homebrew devices with relative ease.
"They only have to write one module like Core PS Vita, Core PS4... that's super useful for porting," (37:19).
GPU Skinning: Addressing community demand, GPU skinning has been integrated, allowing vertex position computations to shift from CPU to GPU. This enhancement optimizes performance, especially for larger models.
Enhanced Build Tools: The release also includes improvements to the installer and project setup tools, simplifying the development workflow for newcomers.
These advancements have propelled Raylib's adoption, enabling it to function seamlessly across an array of platforms, including the Nintendo 64 and PS Vita.
Challenges in Sustainability and Maintenance
Despite Raylib's growing popularity, Ramon faces significant challenges in sustaining its development. The financial aspects of maintaining an open-source project of this magnitude are daunting.
"I received some donations... it's about $700 per month, something like that. Not that much," (55:18).
Ramon's attempts to monetize Raylib through tools and auxiliary libraries have yielded modest returns. Additionally, balancing community management with active development and personal commitments remains a persistent struggle.
Future Roadmap and Vision
Looking ahead, Ramon contemplates various avenues to ensure Raylib's longevity:
Expanding Tooling: Developing additional tools to streamline project setup and platform porting.
Supporting New Graphics APIs: Exploring support for APIs beyond OpenGL, such as DirectX 12, to cater to a broader range of developers and platforms.
Delegating Responsibilities: Given the unsustainable workload, Ramon is considering ways to distribute maintenance tasks, potentially involving more contributors in leadership roles.
Ramon remains optimistic, driven by the positive feedback and unwavering support from the Raylib community. His commitment to fostering an accessible and powerful tool for game developers underscores his dedication to the project.
Conclusion
Ramon Santamaria's journey with Raylib exemplifies the passion and perseverance inherent in open-source development. From its humble beginnings as an educational tool to its current status as a versatile game development library, Raylib's evolution is a testament to effective design, community collaboration, and the enduring spirit of its creator. As Raylib continues to grow, the balance between community engagement and sustainable maintenance remains paramount, shaping the library's future trajectory.
Notable Quotes
“Simplicity is always the key for me… I try to keep it as much simple as possible.” — Ramon Santamaria (07:24)
“Discord is the community where I spend most time because I've seen the community there growing super fast. It's a super nice community.” — Ramon Santamaria (50:23)
“The library itself, it's intended to basically draw anything on any kind of display. It could be a game, it could be a demo, it could be some kind of multimedia application, it could be a tool.” — Ramon Santamaria (07:24)
Key Takeaways
Educational Roots: Raylib was born out of the need to teach programming to art students, emphasizing simplicity and hands-on coding.
Modular and Procedural Design: The library's architecture supports flexibility and ease of use, making it accessible for various applications beyond gaming.
Active Community: Raylib's growth is fueled by a dedicated community, though managing this expansion poses significant challenges.
Sustainability Concerns: Financial and logistical hurdles highlight the complexities of maintaining a successful open-source project.
Future Prospects: Expanding platform support and enhancing tooling are central to Raylib's continued relevance and adoption.
Final Thoughts
Ramon Santamaria's dedication to Raylib serves as an inspiring case study in open-source development and community building. As Raylib navigates its future, the balance between maintaining its core simplicity and accommodating an ever-growing range of functionalities will determine its lasting impact on the game development landscape.