The Raylib C Library for Game Development with Ramon Santamaria

29 Jan 2025 · 1 h 1 min

Ask about this episode

Ask anything about it. ChatGPT or Claude reads this page and answers with the times it was said.

Connect VO and ask about every podcast you hear, including the moments you saved. Add to ChatGPT · Add to Claude

In short

Podcast Summary: The Raylib C Library for Game Development with Ramon Santamaria

Podcast Details

  • Podcast Title: Software Engineering Daily
  • Episode Title: The Raylib C Library for Game Development with Ramon Santamaria
  • Episode Description: Discussion about Raylib, a lightweight and beginner-friendly C library designed for game development. The episode features Ramon Santamaria, Founder and Lead Developer of Raylib.

Key Contributors

  • Ramon Santamaria: Founder and Lead Developer of Raylib.
  • Joe Nash: Developer and educator who co-hosted the episode.

Episode Highlights

Introduction to Raylib

  • Raylib is an open-source C library designed for simplicity and ease of use in game development.
  • It supports both 2D and 3D game creation with an intuitive API for graphics, audio, and input management.
  • Ramon Santamaria shares his journey and the origins of Raylib, which has been in development for over 11 years.

Ramon’s Background

  • Prior experience in video game development includes roles at EA and teaching game programming.
  • Initially used older libraries (like Portland BGI Graphics) to teach programming concepts to art students, leading to the creation of Raylib.
  • Raylib was released as open-source to facilitate education and broader use.

Development Journey

  • Raylib has evolved significantly, starting with a few core functions and growing to approximately 580 functions in the latest release (5.5).
  • The library aims to maintain a low-level procedural programming approach, avoiding complex abstractions that could alienate beginners.

API Design Principles

  • Focus on simplicity for users, particularly those with limited programming experience.
  • Functions are named to follow natural language patterns, and parameters are kept minimal to avoid confusion.
  • The library is modular, allowing developers to use only the necessary components for their projects.

Community Engagement and Growth

  • Raylib's community has grown with contributions from around 650 developers.
  • Ramon actively engages with the community via platforms like Discord, Reddit, and social media, spending considerable time on outreach and support.
  • Organizes game jams and encourages contributions to maintain momentum within the community.

Recent Changes and Features in 5.5

  • Introduction of new backend support for various platforms (including retro consoles), which has facilitated community-driven porting efforts.
  • Added features include GPU skinning and integration with libraries like RGFW and SDL3 for improved functionality.
  • Tools have been developed to ease the project setup process for new users, although they aim to maintain a clear boundary between Raylib as a library and a full-fledged game engine.

Future Directions

  • Ramon remains open to community feedback and future developments, particularly regarding support for additional graphics APIs (like Vulkan and DirectX 12).
  • Plans to release additional tools and continue enhancing the ecosystem around Raylib.

Key Takeaways

  • Simplicity is Key: Raylib's design philosophy prioritizes user-friendliness, making it ideal for beginners in game development.
  • Community-Centric: The growth of Raylib is heavily attributed to its active community, encouraging collaboration and contributions.
  • Educational Impact: Ramon emphasizes the importance of understanding low-level programming concepts, believing it equips students with essential skills for future development.

Conclusion The episode provides a comprehensive look at the evolution of Raylib, its impact on game development education, and the passion behind its ongoing development. Ramon Santamaria’s dedication to fostering a supportive community and simplifying the learning process for aspiring game developers is evident throughout the discussion.

Written by AI. May contain mistakes. Listen to the episode to check what was said.

Hear the part that matters, and keep it.Open this episode in VO. Double tap your headphones to save a moment as you listen.
Get VO free

Transcript

Automatic transcript. May contain errors.

0:00Raylib 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 intuitive API for managing graphics, audio, and input. Ramon Santamaria is the founder and lead developer of Raylib. 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 Gary's mod.

0:39And game development remains his favorite way to experience and explore new technologies and concepts.

0:58Ray, welcome to the show. Thank you for joining me today. Hello, Joe. Thanks for having me. It's a pleasure. too. 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 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? Well, actually before Raylib, I was working in video games development.

1:29I worked in EA for some years and also work 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. That was a challenge because 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.

2:17At 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 and after some months of trying different approaches I found one that actually worked that was a very, very old library called Portland 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 VGI but more adapted to modern times.

3:08Well modern times at the moment mean OpenGL and I did so. It was a weekend project, actually, really. 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 Pong. 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.

3:56And 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.

4:35The previous one that I had published, Windows Phone Games. But at that moment, I just started working in the library with fewer students. The plan was to keep working on games in this development. Actually, we released a PS Vita game at that time, but most of the day was working in Graylib. So it was like six hours per day working in the school, teaching with Graylib, but then there was another six hours every day working in the office with some students, developing GreyLib. Incredible. Yeah, and it worked for about six years that way, something like that, five, six years. And yeah, and GreyLib kept growing and growing and growing.

5:17And 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 started getting recognition in a 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 Rilead, but also develop an ecosystem around Rilead with some auxiliary libraries and to develop tools focused for video games development. but always using RayLib as the base technology.

6:03So the technology kept growing along all the other products around it also were built. Yeah, that's mostly today. At this moment, RayLib is super big. Yeah, it's unbelievable the point it has reached right now. Yeah, for sure. It's unbelievable that I've been living years doing that. Yeah, it's a huge achievement. I think I saw, so 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? Yeah, about 150 for this release alone. Yeah. But about 650 overall. That's awesome. Of the years. 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 like share the library and start contributing to it.

7:00That's awesome. I definitely want to ask you, you know, just from an educator's perspective about how you approach that task of, you know, choosing C to teach art students. So we'll get to that later on. But for now, I guess I'll 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. Yeah, actually, the library itself is quite simple in terms of programming. I mean, not internally, but the API, it's quite simple.

7:35It's a 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 open pointers to some internal structures. So you can, when you create an image or a text tool, 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 users of the library.

8:16The students are 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 ended 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've got functionality to manage the window, the inputs, all kinds 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.

9:03Well, 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 is 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.

9:50So 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 library very small and self-contained in terms of architecture. 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.

10:34For example, the audio module, it's completely self-contained, decoupled of anything. So you can just pick up the audio module that are a C file with some header dependencies. You need 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. Well, I think it depends on six, seven basic functions to define the vertex data. But then the module itself contains.

11:15So if you want a module 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 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 one of the key parts of the library. It's called RGLLGL. and it's a kind of a mapping of multiple OpenGL versions from legacy OpenGL to modern OpenGL into immediate mode OpenGL kind of.

12:01Okay, 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 that library like the immediate mode OpenGL 1.1. and actually that proved to be very very very useful because in this latest release i saw that some people ported right lip to work on all consoles on retro consoles and on new consoles and that was thanks to that support for the open gl 1.1 well back end because it's one of the back ends it's not the default one by default it uses open gl 3.3 and open gl es 2.0 on web android than Raspberry Pi or embedded devices.

12:47But yeah, that was one of the modules that I think it's more useful. But well, summarizing 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.

13:36and yeah that i love every time i see that running in an event device 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 i 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 pregnancy test or whatever it is people are putting 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 you know your principles of the api design and you know wanting to keep things simple given the background of the project that totally makes sense but you know it's been 11 years you've had like loads of different users come the library the audience has really grown so i'm really interested in, you know, in how you approach API design in design, you know, there's what, 350, 380 functions, there was an update in 5.5, there's like a lot of functions now, there's a big API surface area.

14:36So how do you think about the design of the API now, you know, with the past, present and future audiences? Well, that's a good question. Actually, at the moment, Rayleigh 1.0 started with 80 functions, only 80 functions that I thought that was enough to make many kinds of games but Riley 5.5 has reached the 580 functions so it was a little bit off yeah that's that's great that's awesome but I also have to say that a couple of years ago I did an analysis of the market and I look for all the open source GitHub repos using Rylib that I could found. And I compiled like 200 repos or so. And I did some text analysis, text scrapping, and I listed the most used Rylib functions in all the source files found in those 200 repos.

15:31And guess what? What was the surprise? Were the most used functions. Actually, were the 84th functions from the library. That's such a cool idea as well. Yeah, you need window, closed window, draw rectangle, begin drawing and drawing, draw circle. I mean, load texture, draw texture. I mean, the simple ones were the most used ones. I mean, also there is some bias 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 there is some bias in that analysis, obviously. But many of the advanced functions added to the library were barely used, actually.

16:18There were 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 a mid-game, you build your small engine over it and add that functionality in that level, but not in the low level.

17:05So 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 it's 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.

17:47There are usually two, three words at maximum. Sometimes maybe four words, but I try to keep it in that way always. Always the same. Also, in the name of parameters, I try to keep always under five, six parameters. Always.

18:08Yeah, that's a great thing. That's Malik. 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. 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.

18:51or 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 right with that it's a library to create UIs mostly intended for tooling but it has a lot of immediate mode UI functionality. Got also REST 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 RightLip ecosystem and are intended for users that need that extra functionality for their specific project can use those libraries.

19:34Actually, that's a year or so, like one year ago or one year and a half ago, one RightLib developer in the community created a separate organization, a separate repository called RightLib Extras that has proven to be very, very, very useful. because for all that people that came to the community asking for advanced functionality, a common answer is, oh, maybe not for RightLip, but you can add that to RightLip 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.

20:17Sometimes, 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. I did notice that the cover image in your Discord was like a voxel, like rendering. 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 OCT3 and all that. Well, in Reilip Extras, actually, there is a kind of a Minecraft template with everything set up with a lot of extra functionality.

20:58And it can be used as a reference. So not everything has to be in Reilip. 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 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 and 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.

21:51Well, actually, I forgot to mention about that. The objective, the beginning was avoiding pointers at all. So the first set of functions for Relief had no pointers at all. All the data extractors 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 32, 48 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, yeah, obviously you have some more advanced functions that require pointers.

22:43But I think they are out maybe 20 or 30 out of 580. So it's in some cases where you really need pointers because obviously you have to load data. For example, in an image, you have to load data. Then the pointer is just kept inside the structure. So you've got the structure with width, height, format, midmaps, and the pointer to data. Or if it's textures, well, the data is already in the GPU, so you've got the identifier. So that's easier. But what I try 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.

23:25And yeah, that's a completely different mentality because, I mean, for them, they usually love programming and 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, I actually was teaching Unity. But I had to teach in the syllabus about programming patterns, solid concepts, and all this information. And I'm so used to coding C with a procedural way with just data inside everything and functions that operate on data. That when I was teaching all those concepts, it was kind of, oh, really?

24:15Yeah, I had to tell that. So I told them, but I let the students know that that's an option. There's another way. 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. But 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 right-leaf. 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.

24:51I 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 the programming, C++, the solution 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 yeah no no it's you know 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 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 million years and this kind of stuff right so yeah but it's also it's really interesting so first of all uh complete tangent you taught at upc right not this time okay cool i've been in several universities yeah because i usually tout for some time maybe one year two years i make some money and then i can be sometimes yeah well working on raylib and the tools and all the ecosystem so this last time i was working in it's called techno campus cool that is another university that is 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 cool it was 2020 to 2022 something nice awesome cool yeah they have a I guess you would have been the reason I ask is because UPC has a very famous student-run hackathon but I guess they wouldn't have been running when you were there due to COVID oh but yeah that would they would have been a great audience for Aleb so you know you mentioned teaching unity and I think it's you know 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 a more like holistic level a higher level when you just think about introducing people to game dev like 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 well i think that i mean And RayLib can teach you not only the basis of how things work in the inside, but also, well, be a guide to start your path.

27:18I 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 jumped into, at that moment, it was into monogame. And after that, we jumped into unity. and I thought that was a great path because Riley Wells low level was C then you jump into mono game that actually Riley Pete's very inspiring in mono game with the naming conventions and the structures and everything and with mono game you can learn C sharp 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.

28:12So 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 RightLib. 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 further, actually, I had many students that had gone inside DriveLib and then had sent improvements and have, well, improved 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.

29:01you 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 yeah i agree that does sound really fantastic and i guess along that way as well people there's like this perpetual issue in computer science education where like they try to teach the abstractions before the student has encountered the problem that requires the abstraction i always think about this with like git and version control right like the 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 know you get to see the low level and then you get introduced to monogame 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 actually this is another point that didn't mention i got it in the head since the beginning It's about building systems.

30:01Because 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, make file or some basic script. From there, try to grow it up. Maybe, I don't like CMake, but maybe CMake or even Visual Studio that is kind of a standard in the industry, I think.

30:43How 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 side methods and processes that are as important as just compiling the code that need to be done and need to be understood.

Read the full transcript

31:36Someone has to do that work. Yeah. I mean, we could turn this into a whole education episode, but yeah, I agree. And I think, 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?

32:06It's going to blunt and you have to start again. Yeah, I think it's a fantastic point. Yeah, but sometimes your spoon can broke maybe. Yeah. And then you have to do something. Yeah, absolutely. But you mentioned that, interestingly enough, so talking about the build systems and CI and stuff, I think this is a good time to talk about Raylib 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. Yeah. Well, actually, it's been one year of changes, like 800 changes or so, many, many changes.

32:41Yeah, 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. That's it. Mostly 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 merging and attending the community and helping the community and trying to help in all the initiatives in the community, organizing game jobs and doing a lot, a lot of community work because actually it has grown a lot. It's difficult to manage. That must be very exciting, but also I imagine as someone who likes writing code a lot, there must be a really interesting mindset change.

33:27Yeah, well, actually I still do, but I do with my tools. I develop tools, I publish the tools, and in that side, yeah, I write code a lot. You've given the library to your community and you've gone to your little playground in the corner. 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 great but yeah but yeah 5.5 what's new in 5.5 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 to this release because i got a checklist with everything that That should be done before any release.

34:18And 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 RightLib version, actually, it's created with RightLib itself. Actually, it's one tool that I sell to create installers. So, actually, there are a lot of things. And not all of them work at first try. actually because yeah for that last release the last two nights it was 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 now the 5.5 installer is the test version and there were some things that were not working as expected and and it was like oh i have to release this day and well it was It's a bit stressful, but yeah, it's out.

35:11And about the features of this new release. Well, there are many, so I cannot list all of 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 Riley 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 moved into separate modules to have one module for platform desktop, one module for platform Android, one module for platform DRM that is for embedded systems that run over the kernel.

36:02So it was moved 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 grouper to the different platforms. And then at compile time, you choose the platform you want and it compiles. So it worked super good. Actually, it has pushed the library during this year a lot, Actually, it has pushed it farther than I expected because, well, what happened that was some people pick up and start porting it to consoles, to Dreamcast, even Nintendo 64, PS Vita, PS4 Homebrew, PSP, Lightning.

36:47So yeah, they only have to write one module, like core PSV tab, core PS4, put all the windowing 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's another of the features of the 5.5, we have seen a lot of porting of Raleigh to all consoles, to retro consoles. It was like, wow, unbelievable. That's awesome. Yeah, especially Dreamcast, that's wild. Well, actually, even Spine is working on Dreamcast. Even, you know, the 2D animator system is working on Dreamcast. That's, wow, it's amazing. but besides that besides 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 oh yes I'm familiar with it yeah yeah it's a library for abstract the windowing 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.

38:05And 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 Rayleigh. Because in the last month, I've seen a deceleration in the maintenance of GLFW 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 if it's still in alpha or beta, or it's officially published, but SDL3 library, that's super popular.

38:57a 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 already supported. So thanks to contributors, because all that has been done by contributors. so I just reviewed it was the support for SGL3 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 you have to compute that position based on the skeleton of the model.

39:55And 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 right-lipped, it was done in CPU. That's great for small models up to maybe 2 ,000 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 there are many Unity users, probably they saw 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 Pi devices or embedded devices or web, it's not simple, has limitations to implement the GPU skinning because it requires more advanced OpenGL features.

40:58But at the end, one animation programming professional, Daniel Holden, proposed an implementation that was pretty good and was also supported in all the devices and everything. And yeah, finally it was merged and added to Riley as an additional option. done 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 plus plus with it and everything as well right yeah 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 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 and becomes boring right 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 currently when you rotate well 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 the bug properly the multiple platforms everything it becomes boring you must have so many weird emulators installed to test all the weird consoles no no actually at this point i don't have that oh good good good I never had a Mac, for example.

42:45The Mac back end has more of the community. That's someone else's problem now. 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. Right. Okay. So the result in this last release, I also released one month ago or so, a tool that was intended to build a project structure, mostly intended for newcomers. Because what I've seen in the past or along the years is that the new people that start with RallyV usually start with the.c file that plays anywhere. And they start working with that c file.

43:28They compile this c file and they play with the c file. But at some point, you need to maybe create other C files, other modules. You need to include some additional library, some really 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, what I've seen in the university, that when students have to do a full setup with the build system, continuous integration, continuous delivery, GitHub, licenses, README, contributors conventions all this git ignore all these 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 students should learn to do that well i create that or do that 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 to work yeah right 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 pickups a template that actually the tool is open source and the template is there and you can check that and modify and just renames everything that needs to be renamed to follow the naming that the user has provided.

45:03And it creates a project with pre-configured 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 a readme template with something pre-configured. It gives you a full structure with many, many things already pre-configured. 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.

45:55That's awesome. 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 RightLip 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 of the game, some kind of entities or game object managing system that could be a simple array, but that could be something more at least or something more complex.

46:43And 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 RightLib 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 Rightlib as an example that it's a simple switch that can change from one screen to another screen, even with some transitions.

47:21So 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 AirRest library with an AirRest Packer tool, trying to kind of supply that third part that would make RightLib more aligned with an engine. Interesting. 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 setups all the project.

48:07And now actually I'm thinking about another tool. I'm thinking I got the design and I haven't really seen it yet in the future. That's another step that I've also seen sometimes could be dramatic for people starting with Riley. that could be like a third tool to do easy the process to build games to multiple platforms 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 could definitely see how that would be a useful tool and yeah but for that reason too it's 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 yeah so we've spoken a lot throughout our chat about you know the how big the ecosystem is and the fact that people are contributing more and more and you know you're now in a position of being much more in reviewer and maintainer mode you know in lead up to this i always have a little poke about the projects look at the ecosystem look at what'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 i don't have that much time actually don't sleep much so 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 Riley community in general has been increasing a lot day after day.

49:58Maybe I remember I started by 2020 because of the pandemic that I was at home and everything. 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 a lot of time. And not only in the computer, but a lot of time with the mobile phone. And well, I got multiple communities, X, Blue Sky Wrestling, 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 community. I've spent a lot of time welcoming new users, trying to help, trying to answer their questions, trying to engage with them.

50:51I 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 to engage the audience in that sense with with some buyer 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 gonna work and actually the community management work. It's a full-time job if you do it. And 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 Relip, from developing, for example, the tools or the separate libraries.

51:47I got several tools that have not been published yet and I want to publish. The installer that I published with RightLip 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? Yeah, yeah, yeah. Very instant feedback, right? 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 probably that message and contact you and are using that tool and ask you for help that somewhat you feel like you have to do that yeah that it makes sense yeah and it becomes addictive and yeah yeah well at the moment i'm trying to to manage to try to make it better and trying to limit the time i put on the social networks and on the community but it's true that for the last two days since i published rightly 5.5 i did connect around big releases it makes sense to be a little bit more online i guess yeah yeah yeah rightly has been released two days ago and there have been like 15 merges already 15 in those two days yeah 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 that was gonna be my next question because i i mean i know i've seen you mentioned 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 raylib having a full time coming to raylib 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.

53:47How are you currently maintaining this work? Yeah. I wish I had a good answer for you. Like, yeah, it's funded with... Well, at the moment, I received some donations. I got GitHub sponsors. I got some sponsors and I also got some patrons. All the numbers are open. Okay, so you can go there on GitHub sponsor or on Patreon and check the numbers. Donations are quite low. I think it's about$700 per month, something like that. Ah, I bet you're saying. Not that much. Yeah. I also, I tried to make some kind of business with all the tools, with the RightLib technologies. And I published tools. Some tools are free, actually.

54:32But some tools are paid. And they actually sell, but neither very low numbers. And besides that, I maintain relief by my puntual contract work that I do. Here in Barcelona, for example, I collaborate with GameBCN that helps new companies, new startups, video game startups to start. And I collaborate with them with consulting, different educational optimization, methodologies, processes. I help them with that. And besides 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. Lots of moving parts. Yeah, it's different moving parts.

55:21But yeah, I'm quite concerned about that, you know, because it's not, I have no stability. Right. You know, that's not stable in the long term. And it's never sustainable. Yeah. So I'm just living a bit day to day and I'm thinking what to do next. So it's complicated, yeah. Yeah, yeah. Such a, also just, you know, two industries renowned for being unstable economically, being a video games developer and being an open source developer. And there you are, sat 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. Raylob.

56:03I 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 next on the roadmap? The truth is that for the last two years or so, I've been saying that, okay, that's the last release. Oh, really? Wow. Okay. 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.

56:45You know, I think, wow, that's a great project. And most of the people that have tried RightLip really praise it and really love it. So I hardly ever hear bad reviews about the library. A lot 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.

57:32So I don't know. I don't know what's next. All right. 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 Rally Project Creator, I planned a second tool. but I probably can't tell you what it is, that it's a project builder that in a similar way, you can just click a button and get an InstaBuild 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.

58:14The community is already pushing to other graphics APIs. I have seen the endless discussion about 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. Oh, wow. Okay. And it's already functional. That's a big job. 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 other graphics APIs other than only OpenGL.

59:01But 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. 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. Yeah, absolutely. And actually, I got some people in the Riley community. Shout out for Jeff. It's really pushing the Riley community a lot. and it's a creator of Rylee Extras and actually is doing a lot, a lot for Rylee.

59:43We have to have a discussion. We said the discussion after Rylee 5.5. So probably now it's the moment to see what direction can the project go from here now. Yeah, let's see. So it's an adventure. Yeah, absolutely. Fingers crossed. It eventually gets a little bit easier. But for now, thank you very much for your time today, Remend. It's been wonderful. Paul, 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. Oh, thank you very much to you. Thanks for inviting me. And it's been a pleasure to be here.

1:00:18Thank you.

From the publisher

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 intuitive API for managing graphics, audio, and input. Ramon Santamaria is the Founder and Lead Developer of Raylib. He joins

The post The Raylib C Library for Game Development with Ramon Santamaria appeared first on Software Engineering Daily.

More from Software Engineering Daily

All 195 episodes
The Raylib C Library for Game Development with Ramon SantamariaSoftware Engineering Daily · 1 h 1 min
Listen in VO