Ray

4.6K posts

Ray banner
Ray

Ray

@raysan5

Passionate about gamedev technologies. I create things. Created #raylib, #raygui, #rres and many other tools as @raylibtech. FOSS at: https://t.co/sIUDDNc2tV

Barcelona Katılım Ekim 2010
2.8K Takip Edilen20.7K Takipçiler
Sabitlenmiş Tweet
Ray
Ray@raysan5·
I'm very excited to announce `raylib 6.0`! 😄 With +2000 commits and +200 contributors, this is the biggest release ever!💯 - Release details: github.com/raysan5/raylib… - Discord: discord.gg/raylib - Webpage: raylib.com **code once, play everywhere!**
Ray tweet media
English
60
229
1.9K
91.1K
Ray
Ray@raysan5·
raylib 6.x gamejam just finished and +150 games have been submitted! AMAZING! 🤯 You can play (and rate) all games on Web! 🔥 Check them out: itch.io/jam/raylib-6x-…
Ray tweet media
English
3
9
88
1.9K
Ray
Ray@raysan5·
@SpolchenDev I think you can edit the itchio page but not upload new files.
English
1
0
0
33
Sᴘᴏʟᴄʜᴇɴ
Sᴘᴏʟᴄʜᴇɴ@SpolchenDev·
@raysan5 for the jam, can we still edit the itch page after the submission, just asking to judge if I should focus in the last hours on bug fixes or working on the itch page.
English
1
0
1
51
Ray
Ray@raysan5·
Recently #raylib went through a professional security audit by @ROSecurity. 💯 I decided to make public the final report along all the actions taken and recommendations to address all the reported security concerns. Thanks ROS! GitHub Discussion: github.com/raysan5/raylib…
Ray tweet media
English
5
22
502
18.3K
Ray
Ray@raysan5·
On this day, 13 years ago, I asked in official Khronos forums for a simple and easy-to-use C library to teach videogames programming. I got no answer, so I created #raylib 🔥 If AI/LLMs had existed back then, would raylib exist today? 🤔 Forum: community.khronos.org/t/graphics-h-e…
Ray tweet media
English
33
51
1.1K
27.1K
Ray
Ray@raysan5·
@JKoukourakis @bkaradzic There are way more games, not always better, but I think there is an added complexity to making the game (with any lib or engine): a fierce competition for exposure, that's the real challenge for all independent developers...
English
2
0
5
328
Ioannis Koukourakis
Ioannis Koukourakis@JKoukourakis·
Very true. But contrary to what most people expected, lowering the entry barrier down to that point didn't actually make games any better. The opposite, I’d say. Also, while gamedev became easier to enter, the rising complexity of modern general-purpose engines trying to be everything for everyone makes the final goal much harder to reach compared to smaller, more focused frameworks. That said, I think Raylib is a turn in the right direction.
English
1
0
5
308
Ray
Ray@raysan5·
@bkaradzic I think nowadays most "indies" can not be technically compared from old "indies" (demosceners). Unity lowered the entry barrier so much that many indies do not need to care about mid-low level implementations, also making it difficult to dig down those levels...
English
2
0
34
1.4K
Бранимир Караџић
@raysan5 When I originally released bgfx I thought it would be popular among advanced indies, most of them ignored it, but actual users are companies...
English
5
1
33
2.7K
Ray
Ray@raysan5·
**600** developers joined the raylib 6.x gamejam! 🤯 It almost triplicates last year gamejam devs count. Quite astonished to see that many users interested in a low-level C library like raylib... definitely, it is getting out of my hands... I need more resources... 🥲
Ray tweet media
English
7
3
235
5.8K
Ray
Ray@raysan5·
@scrubmybubs @_rygo6 No plans, I'm afraid there is noone ready to read, understand, align with raylib and maintain it, that's the real challenge. But it's there, feel free to use it if it fits your needs.
English
1
0
5
231
bubby
bubby@scrubmybubs·
@raysan5 @_rygo6 what's your view on adding this backend to the main project?
English
1
0
1
209
rygo6
rygo6@_rygo6·
I had Claude implement a Vulkan backend for raylib that beats the OpenGL backend in runtime speed for every general use case. Except two. I've been pulling off some pretty crazy shit in record time that simply would be impossible pre-AI. A lot of people seem to be struggling with accepting this. Unfortunately, I cannot openly post things related to my real work. So decided to burn some Claude tokens on my personal account over the weekend and apply all I have learned to something which I could openly post. First, I had Claude generate a system to run image equivalence tests on every deterministic raylib example: github.com/rygo6/raylib_t… It goes through and output three images from each deterministic example it equal steps. Also relies on a change in rcore to force the timesteps to be controllable. All the images from the current rlgl implementation are saved in image_equivalence/rlgl_baseline Then I fed Claude the entire Vulkan spec. I also fed it a bunch of pedantic instructions on the style I write Vulkan with a bunch of my personal C Vulkan code. For example, if you look at the generated Vulkan code and say WTF are all the info struct inlined into the Vulkan calls with compound literals!? That's not claude. That's me :) It would produce a very different style on it's own. Also told it to match the naming and comment style of existing rlgl and the try to produce similar file structure to rlgl. Instructed it on how to edit the file, how to build, how verify a test passes, what to do when a test passes, what to do when a test fails. Then let it cook for several hours. The first Vulkan backend it produced was actually slower than rlgl. Largely because I told it to use all of the newest Vulkan extensions it possibly could and it only needs to run on n NVidia 4090. Which led it to use the VK_EXT_shader_object extension and avoid VkPipelines entirely. Which turns out VK_EXT_shader_object is 3x-4x slower than the NVidia OpenGL driver for doing the same kind of dynamic renderer. Good to know! I actually didn't know VK_EXT_shader_object sucked so bad until I did this. At which point I then instructed it on how to set up performance tests. Which are in the raylib_tests/performance folder. Taking several of the heaviest examples, and synthesizing a few new ones, to cover a wide range of graphical scenarios. Then I instructed it on how to build, edit, run those performances tests. Also instructed it on how to break out isolated spike projects to test comparable Vulkan features and OpenGL features in isolation to find which specific ones by themselves are faster in Vulkan. Then use those Vulkan features proven in isolation to be faster to then design an entire Vulkan backend which could pass all of the image equivalence test. Then instructed it to iterate on this until every performance was faster the OpenGL backend. Giving it free reign to discern which exact Vulkan features to use so long as the testing showed it to be faster than OpenGL. Then instructed it once it found an architecture that is faster to OpenGL. Then run all the image equivalence tests again to ensure they all still pass. Rinse and repeat until all image equivalence tests are passing and all performance tests are beating opengl. It then cooked for another several hours or so and produced the output I have committed in this branch: github.com/rygo6/raylib/b… Here is the performance test overview: htmlpreview.github.io/?https://raw.g… The one where OpenGL still beats Vulkan by a significant margin is the raymarching example. Not because of Vulkan. But supposedly because the Nvidia OpenGL driver is faster at executing shader code, so when you have a scene where the bottleneck is entirely in the shader fragment section, the Nvidia OpenGL driver can execute that faster than the Nvidia Vulkan driver. Which I also didn't know. Also of note, despite the runtime performance being better, the RAM and VRAM usage is a little worse. Which has to do with the baseline of the Nvidia Vulkan Driver being worse than the Nvidia OpenGL Driver. However, I'd expect this to completely different on Linux and AMD. Aside from being able to autonomously produce a usable backend for raylib. I found this exercise to be significant because, ultimately the performance of raylib rlgl is not so much rooted in rlgl as it is rooted in Nvidia's OpenGL driver. Which is really good. There are a couple decades of careful manual optimization put into the Nvidia OpenGL driver to make it super performant for that style of renderer. Which Claude could figure out how to beat with Vulkan. Now what exactly is the code like? C99 and Vulkan are very formulaic. When everything is structs and methods, there is a lot less room for it to do 'crazy shit' with architecture. Also, between raylib's rlgl which is very well patterned and consistent, and my personal Vulkan code which is also very specifically opinionated, it had a lot of specific, explicit, pattern to follow. Glancing over the resultant generated code I'd say, I'd probably significantly change about a quarter of it manually. Cleanup and rearrange. Rewrite some of the methods. Maybe instruct on some different struct layouts and relationships to use. Give it some different foundational data structures to use. Which, since Claude is aware of everything in here, I could radically rearrange all the struct layouts, and data relationships, and layout new data structures. Then prompt Claude, "I changed all of this ____ make the code work with it", and it would. Reworking all the methods to match the new data design probably in about 10 minutes. Probably the roughest part is where it did reflection on SPIRV to figure out how to wire the existing GLSL OpenGL shaders to Vulkan. There is nothing like that in all of my Vulkan code so it was on its own there. I might spend a day going over that. Which after that, it'd arrive me at about the same result had I done everything manually. But in about 4 days instead of what would have probably been 4 months. Most of which would have been a lot of formulaic boring testing, trial and error which I'd rather not do. Given all of that. If you code generated with Claude is crap and you can do better. Well then by all means, produce some evidence by implementing a vulkan backend for raylib that beats this :) That would be a worthy donation to open source. That is of course if you can actually do it and you aren't just bullshitting everyone when you say you can do better than AI.
English
10
12
198
56.7K
Ray
Ray@raysan5·
rlvk.h: Vulkan backend for raylib, implemented with Claude, aligned with rlgl.h backend, with better performance and only 6.6K locs. Very impressive! 🤯 AI allowed an experienced dev to create somethig that nobody in the raylib community has done in 10 years. Impressive!
rygo6@_rygo6

I had Claude implement a Vulkan backend for raylib that beats the OpenGL backend in runtime speed for every general use case. Except two. I've been pulling off some pretty crazy shit in record time that simply would be impossible pre-AI. A lot of people seem to be struggling with accepting this. Unfortunately, I cannot openly post things related to my real work. So decided to burn some Claude tokens on my personal account over the weekend and apply all I have learned to something which I could openly post. First, I had Claude generate a system to run image equivalence tests on every deterministic raylib example: github.com/rygo6/raylib_t… It goes through and output three images from each deterministic example it equal steps. Also relies on a change in rcore to force the timesteps to be controllable. All the images from the current rlgl implementation are saved in image_equivalence/rlgl_baseline Then I fed Claude the entire Vulkan spec. I also fed it a bunch of pedantic instructions on the style I write Vulkan with a bunch of my personal C Vulkan code. For example, if you look at the generated Vulkan code and say WTF are all the info struct inlined into the Vulkan calls with compound literals!? That's not claude. That's me :) It would produce a very different style on it's own. Also told it to match the naming and comment style of existing rlgl and the try to produce similar file structure to rlgl. Instructed it on how to edit the file, how to build, how verify a test passes, what to do when a test passes, what to do when a test fails. Then let it cook for several hours. The first Vulkan backend it produced was actually slower than rlgl. Largely because I told it to use all of the newest Vulkan extensions it possibly could and it only needs to run on n NVidia 4090. Which led it to use the VK_EXT_shader_object extension and avoid VkPipelines entirely. Which turns out VK_EXT_shader_object is 3x-4x slower than the NVidia OpenGL driver for doing the same kind of dynamic renderer. Good to know! I actually didn't know VK_EXT_shader_object sucked so bad until I did this. At which point I then instructed it on how to set up performance tests. Which are in the raylib_tests/performance folder. Taking several of the heaviest examples, and synthesizing a few new ones, to cover a wide range of graphical scenarios. Then I instructed it on how to build, edit, run those performances tests. Also instructed it on how to break out isolated spike projects to test comparable Vulkan features and OpenGL features in isolation to find which specific ones by themselves are faster in Vulkan. Then use those Vulkan features proven in isolation to be faster to then design an entire Vulkan backend which could pass all of the image equivalence test. Then instructed it to iterate on this until every performance was faster the OpenGL backend. Giving it free reign to discern which exact Vulkan features to use so long as the testing showed it to be faster than OpenGL. Then instructed it once it found an architecture that is faster to OpenGL. Then run all the image equivalence tests again to ensure they all still pass. Rinse and repeat until all image equivalence tests are passing and all performance tests are beating opengl. It then cooked for another several hours or so and produced the output I have committed in this branch: github.com/rygo6/raylib/b… Here is the performance test overview: htmlpreview.github.io/?https://raw.g… The one where OpenGL still beats Vulkan by a significant margin is the raymarching example. Not because of Vulkan. But supposedly because the Nvidia OpenGL driver is faster at executing shader code, so when you have a scene where the bottleneck is entirely in the shader fragment section, the Nvidia OpenGL driver can execute that faster than the Nvidia Vulkan driver. Which I also didn't know. Also of note, despite the runtime performance being better, the RAM and VRAM usage is a little worse. Which has to do with the baseline of the Nvidia Vulkan Driver being worse than the Nvidia OpenGL Driver. However, I'd expect this to completely different on Linux and AMD. Aside from being able to autonomously produce a usable backend for raylib. I found this exercise to be significant because, ultimately the performance of raylib rlgl is not so much rooted in rlgl as it is rooted in Nvidia's OpenGL driver. Which is really good. There are a couple decades of careful manual optimization put into the Nvidia OpenGL driver to make it super performant for that style of renderer. Which Claude could figure out how to beat with Vulkan. Now what exactly is the code like? C99 and Vulkan are very formulaic. When everything is structs and methods, there is a lot less room for it to do 'crazy shit' with architecture. Also, between raylib's rlgl which is very well patterned and consistent, and my personal Vulkan code which is also very specifically opinionated, it had a lot of specific, explicit, pattern to follow. Glancing over the resultant generated code I'd say, I'd probably significantly change about a quarter of it manually. Cleanup and rearrange. Rewrite some of the methods. Maybe instruct on some different struct layouts and relationships to use. Give it some different foundational data structures to use. Which, since Claude is aware of everything in here, I could radically rearrange all the struct layouts, and data relationships, and layout new data structures. Then prompt Claude, "I changed all of this ____ make the code work with it", and it would. Reworking all the methods to match the new data design probably in about 10 minutes. Probably the roughest part is where it did reflection on SPIRV to figure out how to wire the existing GLSL OpenGL shaders to Vulkan. There is nothing like that in all of my Vulkan code so it was on its own there. I might spend a day going over that. Which after that, it'd arrive me at about the same result had I done everything manually. But in about 4 days instead of what would have probably been 4 months. Most of which would have been a lot of formulaic boring testing, trial and error which I'd rather not do. Given all of that. If you code generated with Claude is crap and you can do better. Well then by all means, produce some evidence by implementing a vulkan backend for raylib that beats this :) That would be a worthy donation to open source. That is of course if you can actually do it and you aren't just bullshitting everyone when you say you can do better than AI.

English
17
14
511
37.8K
Ray
Ray@raysan5·
raylib 6.x gamejam has started! 🚀 And the THEMES are: **hex + merge** 🔥 6 DAYS, **+570 participants!**, hard constraints! Biggest raylib gamejam ever!!!🤯 ENJOY IT! ❤️ itch.io/jam/raylib-6x-…
Ray@raysan5

Just 24h left to start the #raylib 6.x gamejam! 😱 +420 participants are waiting for a theme for the jam! YOU can choose the theme(s) that will move +420 developers the following 6 days! The two most voted!!! Choose wisely! 🔥 Still on time to join! --> itch.io/jam/raylib-6x-…

English
3
7
142
10.3K
Ray
Ray@raysan5·
Just 24h left to start the #raylib 6.x gamejam! 😱 +420 participants are waiting for a theme for the jam! YOU can choose the theme(s) that will move +420 developers the following 6 days! The two most voted!!! Choose wisely! 🔥 Still on time to join! --> itch.io/jam/raylib-6x-…
English
7
4
88
15.5K
Ray
Ray@raysan5·
A raylib user ported #raylib to @playdate! 🤯 Port just adds a new rcore_playdate.c and 3 new functions for the crank, it was possible thanks to the new raylib software renderer; definitely, it keeps delivering, best new feature ever! 🚀 Source code: github.com/plaidate/rayli…
Ray tweet media
English
9
15
362
10K
Angus Cheng
Angus Cheng@BallerIndustry·
Lets get this down to zero.
Angus Cheng tweet media
English
2
0
7
2.3K
Ray
Ray@raysan5·
@ExodusPgame I usually work in cafes, usually not connected to internet and I usually leave my phone at home. Definitely the best for focused work.
English
1
0
7
223
Exodus 🇮🇱
Exodus 🇮🇱@ExodusPgame·
@raysan5 Also disconnecting the internet and putting the phone away.
English
1
0
1
217